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:
Vlad Zagorodniy 2019-07-10 15:34:35 +03:00
parent cc6d2c2d1b
commit 2b3e679b0f

View file

@ -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)