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.
Attachments
For Gerrit Dashboard: QTBUG-68383 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
365326,3 | Fix potential initialization order problem | dev | qt/qtsensors | Status: MERGED | +2 | 0 |
365656,2 | Fix potential initialization order problem | 6.2 | qt/qtsensors | Status: MERGED | +2 | 0 |