Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.5
-
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.