forked from qt-creator/qt-creator
ClangTools: Hint to "Build the project before starting" option
...if the analysis ends with errors. Task-number: QTCREATORBUG-22382 Change-Id: I59f99947e80f7f4d0e2cac4df2e00f68e385ee01 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -477,6 +477,16 @@ void ClangToolRunControl::finalize()
|
||||
if (m_filesNotAnalyzed != 0) {
|
||||
QString msg = tr("%1: Not all files could be analyzed.").arg(toolName);
|
||||
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
|
||||
if (m_target && !m_target->activeBuildConfiguration()->buildDirectory().exists()
|
||||
&& !ClangToolsProjectSettingsManager::getSettings(m_target->project())
|
||||
->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 "
|
||||
"analysis\".")
|
||||
.arg(toolName);
|
||||
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
|
||||
}
|
||||
|
||||
TaskHub::requestPopup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user