forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/11.0' into qds/dev
Conflicts: src/plugins/qmldesigner/designercore/metainfo/metainfo.cpp src/plugins/qmlprojectmanager/cmakegen/generatecmakelists.cpp tests/auto/qml/qmlprojectmanager/fileformat/fileformat.qbs tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp Change-Id: I257f1908917bcc58805619b53b6866f2f73ca544
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "generatecmakelists.h"
|
||||
|
||||
#include "generatecmakelistsconstants.h"
|
||||
#include "cmakegeneratordialog.h"
|
||||
#include "../qmlprojectmanagertr.h"
|
||||
@@ -10,9 +11,9 @@
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
|
||||
#include <projectexplorer/buildsystem.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectmanager.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qmlprojectmanager/qmlmainfileaspect.h>
|
||||
@@ -86,7 +87,7 @@ const QString MENU_ITEM_GENERATE = Tr::tr("Generate CMake Build Files...");
|
||||
|
||||
const QmlBuildSystem *getBuildSystem()
|
||||
{
|
||||
auto project = ProjectExplorer::SessionManager::startupProject();
|
||||
auto project = ProjectExplorer::ProjectManager::startupProject();
|
||||
if (project && project->activeTarget() && project->activeTarget()->buildSystem()) {
|
||||
return qobject_cast<QmlProjectManager::QmlBuildSystem *>(
|
||||
project->activeTarget()->buildSystem());
|
||||
@@ -114,8 +115,8 @@ void generateMenuEntry(QObject *parent)
|
||||
exportMenu->addAction(cmd, QmlProjectManager::Constants::G_EXPORT_GENERATE);
|
||||
|
||||
action->setEnabled(false);
|
||||
QObject::connect(ProjectExplorer::SessionManager::instance(),
|
||||
&ProjectExplorer::SessionManager::startupProjectChanged,
|
||||
QObject::connect(ProjectExplorer::ProjectManager::instance(),
|
||||
&ProjectExplorer::ProjectManager::startupProjectChanged,
|
||||
[action]() {
|
||||
if (auto buildSystem = getBuildSystem())
|
||||
action->setEnabled(!buildSystem->qtForMCUs());
|
||||
@@ -125,8 +126,7 @@ void generateMenuEntry(QObject *parent)
|
||||
void onGenerateCmakeLists()
|
||||
{
|
||||
trackUsage("generateCMakeProjectDialogOpened");
|
||||
|
||||
FilePath rootDir = ProjectExplorer::SessionManager::startupProject()->projectDirectory();
|
||||
FilePath rootDir = ProjectExplorer::ProjectManager::startupProject()->projectDirectory();
|
||||
|
||||
int projectDirErrors = isProjectCorrectlyFormed(rootDir);
|
||||
if (projectDirErrors != NoError) {
|
||||
@@ -340,7 +340,7 @@ const char ADD_SUBDIR[] = "add_subdirectory(%1)\n";
|
||||
void CmakeFileGenerator::generateMainCmake(const FilePath &rootDir)
|
||||
{
|
||||
//TODO startupProject() may be a terrible way to try to get "current project". It's not necessarily the same thing at all.
|
||||
QString projectName = ProjectExplorer::SessionManager::startupProject()->displayName();
|
||||
QString projectName = ProjectExplorer::ProjectManager::startupProject()->displayName();
|
||||
QString appName = projectName + "App";
|
||||
|
||||
QString fileSection = "";
|
||||
@@ -559,7 +559,7 @@ bool CmakeFileGenerator::isDirBlacklisted(const FilePath &dir)
|
||||
bool CmakeFileGenerator::includeFile(const FilePath &filePath)
|
||||
{
|
||||
if (m_checkFileIsInProject) {
|
||||
ProjectExplorer::Project *project = ProjectExplorer::SessionManager::startupProject();
|
||||
ProjectExplorer::Project *project = ProjectExplorer::ProjectManager::startupProject();
|
||||
if (!project->isKnownFile(filePath))
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user