ClangTools: Remove BasicSettingsWidget

This removes the

  [ ] Build the project before Analysis

from the run dialog as it seems unlikely that this option is useful per
project.

Change-Id: I65f2ae8d1e936883f27c360d5b7b518fd31cdf07
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-08-29 15:10:32 +02:00
parent 58a724b489
commit 1fad60153e
14 changed files with 36 additions and 239 deletions

View File

@@ -29,7 +29,6 @@
#include "clangtidyclazytool.h"
#include "clangtool.h"
#include "clangtoolslogfilereader.h"
#include "clangtoolsprojectsettings.h"
#include "clangtoolssettings.h"
#include "clangtoolsutils.h"
@@ -247,13 +246,7 @@ ClangToolRunWorker::ClangToolRunWorker(RunControl *runControl,
if (!preventBuild) {
m_projectBuilder = new ProjectBuilder(runControl);
addStartDependency(m_projectBuilder);
ClangToolsProjectSettings *projectSettings = ClangToolsProjectSettingsManager::getSettings(
runControl->project());
if (projectSettings->useGlobalSettings())
m_projectBuilder->setEnabled(ClangToolsSettings::instance()->savedBuildBeforeAnalysis());
else
m_projectBuilder->setEnabled(projectSettings->buildBeforeAnalysis());
m_projectBuilder->setEnabled(ClangToolsSettings::instance()->savedBuildBeforeAnalysis());
}
Target *target = runControl->target();
@@ -510,8 +503,7 @@ void ClangToolRunWorker::finalize()
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
Target *target = runControl()->target();
if (target && !target->activeBuildConfiguration()->buildDirectory().exists()
&& !ClangToolsProjectSettingsManager::getSettings(target->project())
->buildBeforeAnalysis()) {
&& !ClangToolsSettings::instance()->savedBuildBeforeAnalysis()) {
msg = tr("%1: You might need to build the project to generate or update source "
"files. To build automatically, enable \"Build the project before starting "
"analysis\".")