ClangTools: Add UI for specifying executables

Add a new group box "Executables" for this. Hide the UI for
clazy-standalone unless QTC_USE_CLAZY_STANDALONE_PATH is set as there is
no released version with the needed -export-fixes option.

Rename the previous group box from "General" to "Run Options".

Change-Id: Ia9daf66c40d3a7eea98b31d9c086886d29466490
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-28 08:56:22 +02:00
parent 8890a7412c
commit fc37ea4276
12 changed files with 279 additions and 7 deletions

View File

@@ -310,7 +310,7 @@ void ClangToolRunWorker::start()
m_queue.clear();
for (const AnalyzeUnit &unit : unitsToProcess) {
for (auto creator : runnerCreators())
for (const RunnerCreator &creator : runnerCreators())
m_queue << QueueItem{unit, creator};
}
m_initialQueueSize = m_queue.count();
@@ -378,6 +378,18 @@ void ClangToolRunWorker::analyzeNextFile()
ClangToolRunner *runner = queueItem.runnerCreator();
m_runners.insert(runner);
const QString executable = runner->executable();
if (!isFileExecutable(executable)) {
const QString errorMessage = tr("%1: Invalid executable \"%2\", stop.")
.arg(runner->name(), executable);
TaskHub::addTask(Task::Error, errorMessage, Debugger::Constants::ANALYZERTASK_ID);
TaskHub::requestPopup();
reportFailure(errorMessage);
stop();
return;
}
QTC_ASSERT(runner->run(unit.file, unit.arguments), return);
appendMessage(tr("Analyzing \"%1\" [%2].")