forked from qt-creator/qt-creator
CompilationDatabase: Ask for the root path and scan for headers
Let's use the same approach we have for CMake projects by using the same TreeScanner class. Compilation database does not have a concept of the root directory so let's show a file dialog and ask for it the first time the project is loaded. Next times we open it we take this path from settings. This root path can later be changed from the project tree context menu. Fixes: QTCREATORBUG-22031 Change-Id: I151aed8d0504b2e8aa14aa774cad25f8c86d5c17 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -30,11 +30,11 @@
|
||||
#include "builddirmanager.h"
|
||||
#include "cmakebuildtarget.h"
|
||||
#include "cmakeprojectimporter.h"
|
||||
#include "treescanner.h"
|
||||
|
||||
#include <projectexplorer/extracompiler.h>
|
||||
#include <projectexplorer/projectmacro.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectmacro.h>
|
||||
#include <projectexplorer/treescanner.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
CppTools::CppProjectUpdater *m_cppCodeModelUpdater = nullptr;
|
||||
QList<ProjectExplorer::ExtraCompiler *> m_extraCompilers;
|
||||
|
||||
Internal::TreeScanner m_treeScanner;
|
||||
ProjectExplorer::TreeScanner m_treeScanner;
|
||||
Internal::BuildDirManager m_buildDirManager;
|
||||
|
||||
bool m_waitingForScan = false;
|
||||
|
||||
Reference in New Issue
Block a user