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

QSqlDatabase depends on QCoreApplication

    XMLWordPrintable

Details

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

    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

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes