QmlDesigner: Remove check if setIdWithoutRefactoring throws

We don't throw any exception anymore in that case.

Change-Id: I881f22b560081beff6a6275783061228e64cbb28
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2022-10-18 16:18:31 +02:00
parent 4e72e0fd27
commit d554bf5e2a

View File

@@ -1757,13 +1757,6 @@ void tst_TestCore::testModelCreateSubNode()
expectedCalls << TestView::MethodCall("nodeIdChanged", QStringList() << "blah" << "blah" << ""); expectedCalls << TestView::MethodCall("nodeIdChanged", QStringList() << "blah" << "blah" << "");
QCOMPARE(view->methodCalls(), expectedCalls); QCOMPARE(view->methodCalls(), expectedCalls);
try {
childNode.setIdWithoutRefactoring("invalid id");
QFAIL("Setting an invalid id does not throw an exception");
} catch (Exception &exception) {
QCOMPARE(exception.type(), QString("InvalidIdException"));
}
QCOMPARE(childNode.id(), QString("blah")); QCOMPARE(childNode.id(), QString("blah"));
QCOMPARE(view->methodCalls(), expectedCalls); QCOMPARE(view->methodCalls(), expectedCalls);