From 2b3e679b0f741caa1bdb0fb2deda664476856cf3 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Wed, 10 Jul 2019 15:34:35 +0300 Subject: [PATCH] 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 --- tabbox/clientmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tabbox/clientmodel.cpp b/tabbox/clientmodel.cpp index abd0c90b98..19741fb2a5 100644 --- a/tabbox/clientmodel.cpp +++ b/tabbox/clientmodel.cpp @@ -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)