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

QIdentityProxyModel not working when chained with a QSortFilterProxyModel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.8.0
    • 5.0.0, 5.6.0
    • Widgets: Itemviews
    • None
    • Qt: Qt 5.0.0 MSVC2010 32bit
      OS: Windows 7

    Description

      Minimal code: (It can be compiled as-is)

      Qt
          #include <QtGui>
          int main(int argc, char *argv[])
          {
          QApplication app(argc, argv);
          QTreeView myView;
          QFileSystemModel * sourceModel = new QFileSystemModel(&myView);
          QSortFilterProxyModel * proxy1 = new QSortFilterProxyModel(&myView);
          QIdentityProxyModel * proxy2 = new QIdentityProxyModel(&myView);
           
          sourceModel->setRootPath("C:/");
           
          proxy1->setSourceModel(sourceModel);
          proxy2->setSourceModel(proxy1);
           
          myView.setModel(proxy2);
          myView.show();
          return app.exec();
          }
      

      After clicking quickly in the tree view a few times to expand folders in order to stress the software, the application crashes and give a read access violation error.

      Note: There is no problem if the proxies are chained the other way around or if they are used alone.

      Attachments

        Issue Links

          Activity

            People

              dfaure_kdab David Faure
              guett_31 gaetan cravero
              Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: