From d0c8dea5c70d299f4c19c007633415f4e3706d5b Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 9 Oct 2024 12:51:20 +0200 Subject: [PATCH] QtSupport: Reorder clear() and beginResetModel() Since clear() internally calls begin/endResetModel(), we are having nested invocation of begin/endResetModel. This fix prevents the warning message about calling beginResetModel without calling endResetModel first and vice versa. The messages appear on startup when compiled against Qt 6.8. Follows 2ea3abed0125d81ca4f3bacb9650db7314657332 Change-Id: If1d707fcff514a85d86964b66569503e22dae9f3 Reviewed-by: Eike Ziller --- src/plugins/qtsupport/exampleslistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index a599206493a..f2619070071 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -116,8 +116,8 @@ ExampleSetModel::ExampleSetModel() void ExampleSetModel::recreateModel(const QtVersions &qtVersionsIn) { - beginResetModel(); clear(); + beginResetModel(); QHash extraManifestDirs; for (int i = 0; i < m_extraExampleSets.size(); ++i)