forked from qt-creator/qt-creator
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:
@@ -116,8 +116,8 @@ ExampleSetModel::ExampleSetModel()
|
|||||||
|
|
||||||
void ExampleSetModel::recreateModel(const QtVersions &qtVersionsIn)
|
void ExampleSetModel::recreateModel(const QtVersions &qtVersionsIn)
|
||||||
{
|
{
|
||||||
beginResetModel();
|
|
||||||
clear();
|
clear();
|
||||||
|
beginResetModel();
|
||||||
|
|
||||||
QHash<FilePath, int> extraManifestDirs;
|
QHash<FilePath, int> extraManifestDirs;
|
||||||
for (int i = 0; i < m_extraExampleSets.size(); ++i)
|
for (int i = 0; i < m_extraExampleSets.size(); ++i)
|
||||||
|
Reference in New Issue
Block a user