Reset the QItemSelectionModel when its model is reset.

Change-Id: I12af41adb18a2ecf8825b23d5715766dcae55436
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
bb10
Stephen Kelly 2013-08-12 16:19:20 +02:00 committed by The Qt Project
parent faea8d1056
commit 45e5a6ff7c
1 changed files with 2 additions and 0 deletions

View File

@ -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()));
}
}