diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index d1a9f2af869..a26dc987490 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -1084,15 +1084,6 @@ void Project::configureAsExampleProject(Kit * /*kit*/) { } -void Project::buildTarget(const QString &target) -{ - if (!activeTarget() || !activeTarget()->activeBuildConfiguration() - || !activeTarget()->activeBuildConfiguration()->buildSystem()) { - return; - } - activeTarget()->activeBuildConfiguration()->buildSystem()->buildNamedTarget(target); -} - bool Project::hasMakeInstallEquivalent() const { return d->m_hasMakeInstallEquivalent; diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h index fc67acf0a81..9c60aa3ed6c 100644 --- a/src/plugins/projectexplorer/project.h +++ b/src/plugins/projectexplorer/project.h @@ -131,8 +131,6 @@ public: bool needsBuildConfigurations() const; virtual void configureAsExampleProject(ProjectExplorer::Kit *kit); - void buildTarget(const QString &target); - virtual ProjectImporter *projectImporter() const; virtual DeploymentKnowledge deploymentKnowledge() const { return DeploymentKnowledge::Bad; } diff --git a/src/plugins/qmljseditor/qmltaskmanager.cpp b/src/plugins/qmljseditor/qmltaskmanager.cpp index 87cf9efb269..9260e0069ee 100644 --- a/src/plugins/qmljseditor/qmltaskmanager.cpp +++ b/src/plugins/qmljseditor/qmltaskmanager.cpp @@ -113,30 +113,20 @@ void QmlTaskManager::updateMessages() m_updateDelay.start(); } -static void triggerQmllintCMakeTarget() -{ - if (ProjectManager::startupProject()) - ProjectManager::startupProject()->buildTarget(Constants::QMLLINT_BUILD_TARGET); -} - void QmlTaskManager::updateSemanticMessagesNow() { // note: this can only be called for the startup project - Project *project = ProjectManager::startupProject(); - if (!project) - return; - BuildSystem *buildSystem = ProjectManager::startupBuildSystem(); if (!buildSystem) return; const bool isCMake = buildSystem->name() == "cmake"; // heuristic: qmllint will output meaningful warnings if qmlls is enabled - if (isCMake && QmllsSettingsManager::instance()->useQmlls(project)) { + if (isCMake && QmllsSettingsManager::instance()->useQmlls(buildSystem->project())) { // abort any update that's going on already, and remove old codemodel warnings m_messageCollector.cancel(); removeAllTasks(true); - triggerQmllintCMakeTarget(); + buildSystem->buildTarget(Constants::QMLLINT_BUILD_TARGET); return; }