Menu

#2916 Missing Qt dependency should be caught at compile-time instead of run-time

2020.4
New
nobody
GUI (96)
Low
2024-09-08
2024-09-07
ranguli
No

When building FlightGear from source, CMake does a good job of hunting down dependencies and notifying the developer when packages aren't found. However, in the case of the QtQuick Controls 2 (qml-module-qtquick-controls2 in apt), the missing package is not caught until runtime by QML. It should be declared as a dependency in CMake like any other.

Furthermore, there is a second bug being revealed by this. The application obviously detects the error state that the QML module is missing, as it creates GUI popups and console errors to that effect, but it doesn't terminate the program. Instead (see the third screenshot attached) it just loads a blank window instead.

From a correctness standpoint, if the application has determined a non-recoverable error has occurred, it should terminate instead of attempting to continue. There is likely some conditional logic that is falling through here.

1 Attachments

Discussion

  • ranguli

    ranguli - 2024-09-07

    Seems I am limited to one screenshot at a time on uploads? Here was the first screenshot.

     
  • ranguli

    ranguli - 2024-09-07

    And the second. The screenshot attached to the original ticket is the third screenshot chronologically.

     
  • James Turner

    James Turner - 2024-09-08

    The problem is different distros package Qt differently, I don't think we can express this check at CMake time. (Hence the rather elaborate runtime check)

    I don't think there is a CMake package component for Quick-Controls-2 we can request when inking find(Qt5 COMPONENTS <foo> <blah>)</blah></foo>

     

Log in to post a comment.

MongoDB Logo MongoDB