Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.5.3
-
None
Description
The QSqlDatabase started depending on the QCoreApplication from Qt v6.5.3. The change was made here.
Would be possible to change the Q_APPLICATION_STATIC(DriverDict, qtDriverDict) to Q_GLOBAL_STATIC(DriverDict, qtDriverDict)?
I don't think that it is a good idea to use the Q_APPLICATION_STATIC here, depending on the QCoreApplication to destroy one global variable is unnecessary.
Application logs the following error to the console if the QCoreApplication instance is not created:
qt.core.qobject.connect: QObject::connect(QObject, Unknown): invalid nullptr parameter
I have a few applications where I'm using the QSqlDatabase but I don't use the QCoreApplication and because of this change I must instantiate the QCoreApplication everywhere even if I don't need it.
Attachments
Issue Links
- relates to
-
QTBUG-117621 Reg->6.7: QSqlDatabase::drivers() requires a QCoreApplication to work
- Closed