forked from qt-creator/qt-creator
ClangTools: Create compilation db also for DocumentClangToolRunner
This was forgotten in a360d855ae
.
Fixes: QTCREATORBUG-32098
Change-Id: Iea3b3b61238164d8fb5190131567af2e21a7b7d4
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "documentclangtoolrunner.h"
|
#include "documentclangtoolrunner.h"
|
||||||
|
|
||||||
|
#include "clangtoolscompilationdb.h"
|
||||||
#include "clangtoolsconstants.h"
|
#include "clangtoolsconstants.h"
|
||||||
#include "clangtoolrunner.h"
|
#include "clangtoolrunner.h"
|
||||||
#include "clangtoolsutils.h"
|
#include "clangtoolsutils.h"
|
||||||
@@ -158,6 +159,18 @@ static Environment projectBuildEnvironment(Project *project)
|
|||||||
|
|
||||||
void DocumentClangToolRunner::run()
|
void DocumentClangToolRunner::run()
|
||||||
{
|
{
|
||||||
|
for (const ClangToolType type : {ClangToolType::Tidy, ClangToolType::Clazy}) {
|
||||||
|
ClangToolsCompilationDb &db = ClangToolsCompilationDb::getDb(type);
|
||||||
|
db.disconnect(this);
|
||||||
|
if (db.generateIfNecessary()) {
|
||||||
|
connect(&db, &ClangToolsCompilationDb::generated, this, [this](bool success) {
|
||||||
|
if (success)
|
||||||
|
run();
|
||||||
|
}, Qt::SingleShotConnection);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_projectSettingsUpdate)
|
if (m_projectSettingsUpdate)
|
||||||
disconnect(m_projectSettingsUpdate);
|
disconnect(m_projectSettingsUpdate);
|
||||||
m_taskTreeRunner.reset();
|
m_taskTreeRunner.reset();
|
||||||
|
Reference in New Issue
Block a user