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

cloneDatabase() - requested database does not belong to the calling thread.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12.0
    • Fix Version/s: 5.13.0 Alpha 1
    • Component/s: SQL Support
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      f03941e4113e2c8c0a594592be44efc92614ec9d (qt/qtbase/wip/qt6)

      Description

      New qt version forces you to create new connection to database for every thread.

      I was using

      QSqlDatabase cloneDatabase(const QSqlDatabase &other, const QString &connectionName)

      to create new connections from other trheads, and now i can't. This function should be thread safe and allow access to database object because it just copies all the connection parameters. Otherwise this function has no purpose... 

       

        Attachments

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

          Activity

            People

            Assignee:
            andysh Andy Shaw
            Reporter:
            davidovv vasilj davidovic
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes