Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-68383

QCoreApplicationPrivate::theMainThread initialization before main()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.0 Beta3
    • 5.9.5
    • Sensors
    • None
    • 21
    • Qt6_Foundation_Sprint 40

    Description

      When Sensors module is included in project, the CoreApplicationPrivate::theMainThread field is initialized before calling of main() function and therefore QApplication object creation because static QLoggingCategory variable in src/sensors/qsensormanager.cpp. It is potential conflict which may cause "QApplication was not created in the main() thread" situation.
      I think it needs to hide this sensorsCategory variable into static function to prevent it early initialization (see attach).

      PS. The QTBUG-66235 bug may be related.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vuokko Juha Vuolle
            abs62 Dmitry Ivanov
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes