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

QSqlError has broken move semantics

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.15, 6.0.0
    • Fix Version/s: None
    • Component/s: SQL Support
    • Labels:
    • Technical Risk:
      Normal

      Description

      QSqlError is a value type with broken move semantics. A value that's been moved-from via assignment operator will be valid (it will have the d-pointer of the assignee), while a value that's been moved from via move-construction will be invalid (d-pointer will be nullptr).

      Getters don't check the d-pointer for being a valid pointer. That is is ok as per QUIP-19.

      The class should generally use implicit sharing to avoid these inconsistencies.

        Attachments

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

          Activity

            People

            Assignee:
            mabrand Mark Brand
            Reporter:
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes