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

[Qt 5.11] Sql Query from QThread

    XMLWordPrintable

Details

    Description

      Migrating to 5.11 version (from Arch Linux repository) caused a regression in my application.

      I have a main thread (the QMainWindow), which establishes a connection to a sqlite database, the class SqlQueries, a collection of static functions, and a QThread class, used to export data to a file.

      Previously to 5.11 I was able to call a SqlQueries static method from the QThread class.

      After upgrading to 5.11 calling a  query from the thread class I got the following error:

      QSqlDatabasePrivate::database: requested database does not belong to the calling thread.
      QSqlQuery::prepare: database not open
      static QString SqlQueries::getName(const int&) ERROR:  ""  :  QSqlError("", "Driver not loaded", "Driver not loaded")

      Downgrading to 5.10.1 solves the problem.

      Is this a bug or anything changed in API?

      Thanks

      Attachments

        Issue Links

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

          Activity

            People

              andysh Andy Shaw
              gcala Giuseppe Calà
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes