ClangTools: Move run settings to projects mode

Make the global run settings available per project in project mode and
thus remove the diagnostic config selection from the
selectable-files-dialog:

 * Extract the classes RunSettings and RunSettingsWidget instead of
   duplicating stuff.
 * Ensure to pick up the old settings
 * Add some convenience buttons/links in projects mode allowing to
   restore the global settings, to open the global settings and to
   navigate (back) to the analyzer mode.

Change-Id: I1b91b6f8e58a87a025774e4643c46e176b2a8885
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-09-13 10:49:14 +02:00
parent bdea56794f
commit 4750969c2b
24 changed files with 630 additions and 508 deletions

View File

@@ -26,6 +26,7 @@
#pragma once
#include "clangfileinfo.h"
#include "clangtoolssettings.h"
#include <cpptools/clangdiagnosticconfig.h>
#include <cpptools/projectinfo.h>
@@ -66,7 +67,7 @@ class ClangToolRunWorker : public ProjectExplorer::RunWorker
public:
ClangToolRunWorker(ProjectExplorer::RunControl *runControl,
const CppTools::ClangDiagnosticConfig &diagnosticConfig,
const RunSettings &runSettings,
const FileInfos &fileInfos,
bool preventBuild);
@@ -93,15 +94,15 @@ private:
void finalize();
protected:
private:
RunSettings m_runSettings;
CppTools::ClangDiagnosticConfig m_diagnosticConfig;
FileInfos m_fileInfos;
ProjectBuilder *m_projectBuilder = nullptr;
Utils::Environment m_environment;
Utils::TemporaryDirectory m_temporaryDir;
private:
CppTools::ClangDiagnosticConfig m_diagnosticConfig;
FileInfos m_fileInfos;
CppTools::ProjectInfo m_projectInfoBeforeBuild;
CppTools::ProjectInfo m_projectInfo;
QString m_targetTriple;