forked from qt-creator/qt-creator
QmlDesigner: Add try/catch block
There seem to be rare cases in which this fails. Change-Id: I229a9a72394ec25dca1a9cdae0b51aa36291be94 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -251,7 +251,11 @@ void ItemLibraryWidget::handleAddImport(int index)
|
||||
imports.append(dependencyImport);
|
||||
}
|
||||
imports.append(import);
|
||||
model->changeImports(imports, {});
|
||||
try {
|
||||
model->changeImports(imports, {});
|
||||
} catch (const Exception &e) {
|
||||
e.showException();
|
||||
}
|
||||
|
||||
switchToComponentsView();
|
||||
updateSearch();
|
||||
|
Reference in New Issue
Block a user