Reset the QItemSelectionModel when its model is reset.

Change-Id: I12af41adb18a2ecf8825b23d5715766dcae55436
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Stephen Kelly 2013-08-12 16:19:20 +02:00 committed by The Qt Project
parent faea8d1056
commit 45e5a6ff7c

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