From 938612c35e82bec69868e1bf6490c1b331085d82 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 20 Sep 2012 10:31:34 +0200 Subject: Do not use QAbstractItemModel::reset(). Change-Id: Ie49bdf576a6d3543aef6df133b27c8827775c935 Rationale: a) It is conceptually cleaner to do the changes to the model in between calls to beginResetModel() and endResetModel, respectively. b) The function is deprecated in Qt 5, for exactly that reason. Reviewed-by: hjk --- src/plugins/debugger/moduleshandler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins/debugger/moduleshandler.cpp') diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp index 645e944f2d..10786d29df 100644 --- a/src/plugins/debugger/moduleshandler.cpp +++ b/src/plugins/debugger/moduleshandler.cpp @@ -195,15 +195,17 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const void ModulesModel::setModules(const Modules &m) { + beginResetModel(); m_modules = m; - reset(); + endResetModel(); } void ModulesModel::clearModel() { if (!m_modules.isEmpty()) { + beginResetModel(); m_modules.clear(); - reset(); + endResetModel(); } } -- cgit v1.2.1