From 6f7664855b727694c75617ab4fb468d025b72fd3 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 25 Mar 2025 13:24:55 +0200 Subject: [PATCH] QmlDesigner: Do not open extra editor when opening an example Opening an example triggered explicit opening of the editor for the main qml file. Code comment indicated that this was a workaround, which appears to no longer be necessary, as project opens fine without it. This workaround led to a duplicate DesignDocument instance being created. This duplicate was not properly cleaned up at project close, causing crash. Fixes: QDS-15016 Change-Id: I7ea258470399edeffd22ed2d54f79f1779a0f8e7 Reviewed-by: Miikka Heikkinen Reviewed-by: Thomas Hartmann --- src/plugins/studiowelcome/studiowelcomeplugin.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/plugins/studiowelcome/studiowelcomeplugin.cpp b/src/plugins/studiowelcome/studiowelcomeplugin.cpp index 1ad83bf887a..0a8045bda0e 100644 --- a/src/plugins/studiowelcome/studiowelcomeplugin.cpp +++ b/src/plugins/studiowelcome/studiowelcomeplugin.cpp @@ -298,13 +298,6 @@ public: projectFile = exampleFolder + explicitQmlproject; ProjectExplorer::ProjectExplorerPlugin::openProjectWelcomePage(FilePath::fromString(projectFile)); - - const QString qmlFile = QFileInfo(projectFile).dir().absolutePath() + "/" + formFile; - - // This timer should be replaced with a signal send from project loading - QTimer::singleShot(1000, this, [qmlFile]() { - Core::EditorManager::openEditor(Utils::FilePath::fromString(qmlFile)); - }); } Q_INVOKABLE void openExample(const QString &example,