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

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.15.0
    • SQL Support
    • None
    • Tested on macOS 10.14.6 with Qt 5.15.0. Using a MySql Database
      Also tested on Windows 10 with MinGW64.
    • 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

        For Gerrit Dashboard: QTBUG-88014
        # Subject Branch Project Status CR V

        Activity

          People

            mabrand Mark Brand
            solutions_papillon Eric Lemire
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change