forked from qt-creator/qt-creator
CompilationDatabase: Show the progress bar while generating
Change-Id: Ie8df9257f92a9dba110847fda2783c6090a23fdf Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||||
#include <coreplugin/actionmanager/actionmanager.h>
|
#include <coreplugin/actionmanager/actionmanager.h>
|
||||||
|
#include <coreplugin/progressmanager/progressmanager.h>
|
||||||
|
|
||||||
#include <cpptools/cppmodelmanager.h>
|
#include <cpptools/cppmodelmanager.h>
|
||||||
|
|
||||||
@@ -71,9 +72,10 @@ void ClangCodeModelPlugin::generateCompilationDB() {
|
|||||||
if (!project || !project->activeTarget())
|
if (!project || !project->activeTarget())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_generatorWatcher.setFuture(
|
QFuture<void> task = QtConcurrent::run(&Utils::generateCompilationDB,
|
||||||
QtConcurrent::run(&Utils::generateCompilationDB,
|
CppModelManager::instance()->projectInfo(project));
|
||||||
CppModelManager::instance()->projectInfo(project)));
|
Core::ProgressManager::addTask(task, tr("Generating Compilation DB"), "generate compilation db");
|
||||||
|
m_generatorWatcher.setFuture(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isDBGenerationEnabled(ProjectExplorer::Project *project)
|
static bool isDBGenerationEnabled(ProjectExplorer::Project *project)
|
||||||
|
Reference in New Issue
Block a user