Do not enter edit mode when opening a .qmlproject as QDS

If the user opens a .qmlproject in QDS mode we do not want to
enter the edit mode by default.
We check the startup project after opening and calling
openEditMode() will determine if we keep the default of opening
the edit mode or not.

Change-Id: Ic8a7fbefa007d487ec680099544c07fe007c0b29
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Thomas Hartmann
2022-02-07 10:06:16 +01:00
parent 9185875677
commit 454682ea3f
5 changed files with 18 additions and 3 deletions

View File

@@ -456,6 +456,11 @@ Tasks QmlProject::projectIssues(const Kit *k) const
return result;
}
bool QmlProject::isEditModePreferred() const
{
return !isQtDesignStudio();
}
Project::RestoreResult QmlProject::fromMap(const QVariantMap &map, QString *errorMessage)
{
RestoreResult result = Project::fromMap(map, errorMessage);