Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-117952

QSqlDatabase depends on QCoreApplication

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 6.5.3
    • SQL Support
    • None
    • All

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            chehrlic Christian Ehrlicher
            silverq Silver Zachara
            Christian Ehrlicher Christian Ehrlicher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes