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

QSortFilterProxyModel reports inconsistencies in working source model

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.6.2
    • Widgets: Itemviews
    • None
    • Linux Debian/Unstable x86_64
    • 78660bf18ec11e043f1c88d711f62d32237bd0e5

    Description

      QSortFilterProxyModel complains about inconsistent changes from source model if a hidden item is removed

      Steps to reproduce:
      Create a model with two items (root->parent->child)
      Create a QSortFilterProxy filters the top level item (parent)
      Have model emit a dataChanged signal for child
      Have model remove child from parent
      Proxy prints "QSortFilterProxyModel: inconsistent changes reported by source model"

      I have attached a small example program that reproduces the fault by performing the above steps.

      After fault, proxy reloads and continues to work fine. If a view is connected to the proxy, it will still display correct. The printout is the only noticeable fault.

      Attachments

        1. proxyproblem2.cpp
          6 kB
        2. proxyproblem-qt5.cpp
          6 kB
        3. proxyproblem-qt5.pro
          0.1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            flynd Anders Olofsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes