QmlDesigner: Prevent QDS crash during asset import in debug mode

Task-number: QDS-12436
Change-Id: I5ecac614faff58a314ec2886730e4d69f717885b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Shrief Gabr
2024-04-16 15:59:11 +03:00
parent 1f4d1a5820
commit ece3a60cfa

View File

@@ -702,8 +702,10 @@ QGridLayout *ItemLibraryAssetImportDialog::createOptionsGrid(
// and move the remaining member to ungrouped options
// Note: <= 2 instead of < 2 because each group has group label member
if (i != 0 && groupWidgets.size() <= 2) {
widgets[0].prepend(groupWidgets[1]);
groupWidgets[0].first->hide(); // hide group label
if (groupWidgets.size() == 2)
widgets[0].prepend(groupWidgets[1]);
if (groupWidgets.size() >= 1)
groupWidgets[0].first->hide(); // hide group label
groupWidgets.clear();
}
}