Priority: P4: Low
Affects Version/s: 5.14.2, 5.15.0 RC2
Fix Version/s: None
Component/s: Network: HTTP
Commits:7e5a803c08c38e4fddc4338848768b7cfff4848f, 1304040e5d5af0575cac43aaf1424f72472c7b23, 1304040e5d5af0575cac43aaf1424f72472c7b23
We want to provide our current application as a library that can be initialized and shutdown on demand. It seems it works without problem since we smashed all QObjects on shutdown.
We used the qtHookData <private/qhooks_p.h> to find living QObjects of Qt itself. There are still 2 QThreadPool QObjects after a shutdown so we get a WARNING: QApplication was not created in the main() thread..
If we use the QNetworkAccessManager it will spawn a global QThreadPool. That's fine... but it uses a Q_GLOBAL_STATIC for that.
Our library will run in a new std::thread as MainThread and after the shutdown all QObjects should be dead. That is not possible with Q_GLOBAL_STATIC. If that could be removed everything should be fine. We can shutdown and the caller could spawn a new instance in same process with a new std::thread again.
How can Qt avoid the Q_GLOBAL_STATIC for a QObject here? POD would be ok.
WARNING: QApplication was not created in the main() thread.
|For Gerrit Dashboard: QTBUG-84234|
|301169,7||Fix living QObject after shutdown of QCoreApplication||dev||qt/qtbase||Status: MERGED||+2||0|
|301170,7||Fix living QObject member after shutdown of QCoreApplication||dev||qt/qtbase||Status: MERGED||+2||0|
|305057,3||Fix living QLibrary member after shutdown of QCoreApplication||dev||qt/qtbase||Status: MERGED||+2||0|
|305203,2||Fix living QObject after shutdown of QCoreApplication||5.15||qt/qtbase||Status: MERGED||+2||0|
|305208,2||Fix living QObject member after shutdown of QCoreApplication||5.15||qt/qtbase||Status: MERGED||+2||0|
|305456,2||Fix living QLibrary member after shutdown of QCoreApplication||5.15||qt/qtbase||Status: MERGED||+2||0|