forked from qt-creator/qt-creator
Python: Do not use {begin,end}ResetModel in PythonAspectModel
The setSourceModel() calls should take care of that. Change-Id: Ida568bb4215875097e4e55bcf00a8a8a381c439e Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -31,13 +31,13 @@ public:
|
||||
|
||||
void reset()
|
||||
{
|
||||
beginResetModel();
|
||||
if (QAbstractItemModel * const model = sourceModel())
|
||||
if (QAbstractItemModel * const model = sourceModel()) {
|
||||
setSourceModel(nullptr);
|
||||
model->deleteLater();
|
||||
}
|
||||
ListModel<Interpreter> * const model = createInterpreterModel(this);
|
||||
model->setAllData(model->allData() << Interpreter("none", {}, {}));
|
||||
setSourceModel(model);
|
||||
endResetModel();
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user