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

QSqlTableModel::RemoveRows() leaves the model with invalid row when trying to remove an already removed row in the table.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: SQL Support
    • Labels:
      None
    • Environment:
      Tested on macOS 10.14.6 with Qt 5.15.0. Using a MySql Database
      Also tested on Windows 10 with MinGW64.
    • Platform/s:
      All

      Description

      Using removeRows on a QSqlTableModel to remove a row that has been externally deleted from the table (i.e. not using the model) leaves a row in cache with Invalid data for all columns.  This row with invalid data cannot be removed from the model other than a full reselect().

      RemoveRows returns "true" and no error is reported.  It should either properly erase the row from the cache since it is not in the table or report an error.

      Current behavior leaves the model in a non working state and there is no way to detect it.

        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:
            solutions_papillon Eric Lemire
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes