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

QSortFilterProxyModel: inconsistent mappings can cause ASSERT/crash/qWarning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.5, 5.13.2, 5.14.0 Beta2
    • Fix Version/s: None
    • Component/s: Core: Item Models
    • Labels:
      None

      Description

      The attached example application (based on Qt's TreeModel example) does some model transformations (moving items, removing items) with indexes filtered-out by the proxy. This can trigger two problems with QSortFilterProxyModel:

      • an ASSERT when using Qt Debug build (possibly a crash with a release build)
      • a misleading qWarning about an inconsistent model

      Both cases can be triggered by activating/deactivating the FORCE_ASSERT macro in MyFilterModel::filterAcceptsRow.

        Attachments

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

          Activity

            People

            Assignee:
            dfaure_kdab David Faure
            Reporter:
            njeisecke Nils Jeisecke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change