summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel.cpp
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-08-12 16:19:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-13 16:34:06 +0200
commit45e5a6ff7c6165aa8dfa0cb4f0e8f54cbef45f6e (patch)
treeac7a89df063d06a16b35760e6ed6c0c630083922 /src/corelib/itemmodels/qitemselectionmodel.cpp
parentfaea8d1056e4b034404febd0ef44a00e7784018d (diff)
Reset the QItemSelectionModel when its model is reset.
Change-Id: I12af41adb18a2ecf8825b23d5715766dcae55436 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.cpp')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp
index a4d73ea480..ea4d9b44c3 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.cpp
+++ b/src/corelib/itemmodels/qitemselectionmodel.cpp
@@ -622,6 +622,8 @@ void QItemSelectionModelPrivate::initModel(QAbstractItemModel *model)
q, SLOT(_q_layoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)));
QObject::connect(model, SIGNAL(layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)),
q, SLOT(_q_layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)));
+ QObject::connect(model, SIGNAL(modelReset()),
+ q, SLOT(reset()));
}
}