Don't use deprecated QAbstractItemModel::reset()
Summary: QAbstractItemModel::reset() is deprecated since Qt 5.0. It is strongly advised to use combination of QAbstractItemModel::beginResetModel() and QAbstractItemModel::endResetModel() instead. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D22372
This commit is contained in:
parent
cc6d2c2d1b
commit
2b3e679b0f
1 changed files with 2 additions and 1 deletions
|
@ -173,6 +173,7 @@ void ClientModel::createClientList(int desktop, bool partialReset)
|
|||
}
|
||||
}
|
||||
|
||||
beginResetModel();
|
||||
m_clientList.clear();
|
||||
QList< QWeakPointer< TabBoxClient > > stickyClients;
|
||||
|
||||
|
@ -238,7 +239,7 @@ void ClientModel::createClientList(int desktop, bool partialReset)
|
|||
if (!desktopClient.isNull())
|
||||
m_clientList.append(desktopClient);
|
||||
}
|
||||
reset();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void ClientModel::close(int i)
|
||||
|
|
Loading…
Reference in a new issue