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

QSqlDriver should not encode possible drivers in enum

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.4.0, 5.8.0 Alpha
    • SQL Support
    • None
    • baf1158c48c3342f4e90d83c3b93236535aac285

    Description

      QSqlDriver contains an enum DbmsType and a method returning a value of that type. This prevents new or modified drivers to be added without modifying Qt itself.

      This "feature" was introduced 5.4, but should be removed again in the next major version. It breaks the idea that a new plugin can provide a new driver, as the list of possible plugins is now limited by the types defined in Qt proper. If an identification of the DBMS type in use is needed, a method that can be implemented by plugins without being implemented by Qt proper should be used. For instance, a string. At the very least, a User type with a large value should be added to DbmsType so that the enum size will be large enough to contain custom values.

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            andre André Somers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes