QmlProject: Allow only one project in QDS

This keeps project management simple. Having multiple projects
open often leads to confusion.

Change-Id: If6344732cf2813ea8ccf6a1a790229d1038ec240
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2022-07-11 15:22:42 +02:00
parent 1b4c3552c6
commit 086de6f896

View File

@@ -44,6 +44,7 @@
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
#include <qtsupport/baseqtversion.h>
@@ -109,6 +110,10 @@ QmlProject::QmlProject(const Utils::FilePath &fileName)
setBuildSystemCreator([](Target *t) { return new QmlBuildSystem(t); });
if (QmlProject::isQtDesignStudio()) {
EditorManager::closeAllDocuments();
SessionManager::closeAllProjects();
m_openFileConnection
= connect(this,
&QmlProject::anyParsingFinished,