forked from qt-creator/qt-creator
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:
@@ -44,6 +44,7 @@
|
|||||||
#include <projectexplorer/kitinformation.h>
|
#include <projectexplorer/kitinformation.h>
|
||||||
#include <projectexplorer/kitmanager.h>
|
#include <projectexplorer/kitmanager.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
#include <projectexplorer/session.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
#include <qtsupport/baseqtversion.h>
|
#include <qtsupport/baseqtversion.h>
|
||||||
@@ -109,6 +110,10 @@ QmlProject::QmlProject(const Utils::FilePath &fileName)
|
|||||||
setBuildSystemCreator([](Target *t) { return new QmlBuildSystem(t); });
|
setBuildSystemCreator([](Target *t) { return new QmlBuildSystem(t); });
|
||||||
|
|
||||||
if (QmlProject::isQtDesignStudio()) {
|
if (QmlProject::isQtDesignStudio()) {
|
||||||
|
|
||||||
|
EditorManager::closeAllDocuments();
|
||||||
|
SessionManager::closeAllProjects();
|
||||||
|
|
||||||
m_openFileConnection
|
m_openFileConnection
|
||||||
= connect(this,
|
= connect(this,
|
||||||
&QmlProject::anyParsingFinished,
|
&QmlProject::anyParsingFinished,
|
||||||
|
Reference in New Issue
Block a user