improve code

Change-Id: I06c7274c39f7e369d4cd9bed0c1ef77e4bc08b35
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Tim Jenssen
2019-10-25 19:48:14 +02:00
committed by Tim Jenssen
parent 8866153c2a
commit 0be200e44e
4 changed files with 10 additions and 17 deletions

View File

@@ -495,7 +495,7 @@ void ClangToolRunWorker::finalize()
QString msg = tr("%1: Not all files could be analyzed.").arg(toolName);
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
Target *target = runControl()->target();
if (target && !target->activeBuildConfiguration()->buildDirectory().exists()
if (target && target->activeBuildConfiguration() && !target->activeBuildConfiguration()->buildDirectory().exists()
&& !m_runSettings.buildBeforeAnalysis()) {
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 "