Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.4.0
-
0c9866d6b23062bc08e739b66f41de200b660df4
Description
When QApplication destructs it deletes any Q_GLOBAL_STATIC objects. This happens in an arbitrary order which is a problem because the SQL code uses one of these destructors to close all open databases and code in Qtopia also uses these destructors to release its databases and queries.
As a result, we get this:
QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.
To prevent this madness, the warning should be suppressed when QApplication is destructing (there's a flag that's set). If you're trying to use a Query after QApplication has started destructing... well you're screwed anyway so the warning won't help.