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 <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2024-10-09 12:51:20 +02:00
parent 44dacca31f
commit d0c8dea5c7

View File

@@ -116,8 +116,8 @@ ExampleSetModel::ExampleSetModel()
void ExampleSetModel::recreateModel(const QtVersions &qtVersionsIn)
{
beginResetModel();
clear();
beginResetModel();
QHash<FilePath, int> extraManifestDirs;
for (int i = 0; i < m_extraExampleSets.size(); ++i)