forked from qt-creator/qt-creator
CompilationDb: Make use of BuildSystem base class parsing infrastructure
Change-Id: I928e173b35b87c0fcb8fc97785ddfa4a2414740d Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -52,7 +52,6 @@
|
||||
#include <utils/runextensions.h>
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QTimer>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <Windows.h>
|
||||
@@ -339,20 +338,15 @@ void createTree(std::unique_ptr<ProjectNode> &root,
|
||||
CompilationDatabaseBuildSystem::CompilationDatabaseBuildSystem(Target *target)
|
||||
: BuildSystem(target)
|
||||
, m_cppCodeModelUpdater(std::make_unique<CppTools::CppProjectUpdater>())
|
||||
, m_parseDelay(new QTimer(this))
|
||||
, m_deployFileWatcher(new FileSystemWatcher(this))
|
||||
{
|
||||
connect(target->project(), &CompilationDatabaseProject::rootProjectDirectoryChanged,
|
||||
this, [this] {
|
||||
m_projectFileHash.clear();
|
||||
m_parseDelay->start();
|
||||
requestDelayedParse();
|
||||
});
|
||||
|
||||
connect(m_parseDelay, &QTimer::timeout, this, &CompilationDatabaseBuildSystem::reparseProject);
|
||||
|
||||
m_parseDelay->setSingleShot(true);
|
||||
m_parseDelay->setInterval(1000);
|
||||
m_parseDelay->start();
|
||||
requestDelayedParse();
|
||||
|
||||
connect(project(), &Project::projectFileIsDirty, this, &CompilationDatabaseBuildSystem::reparseProject);
|
||||
|
||||
|
@@ -37,10 +37,6 @@
|
||||
|
||||
#include <QFutureWatcher>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTimer;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace CppTools { class CppProjectUpdater; }
|
||||
namespace ProjectExplorer { class Kit; }
|
||||
namespace Utils { class FileSystemWatcher; }
|
||||
@@ -77,7 +73,6 @@ public:
|
||||
std::unique_ptr<CppTools::CppProjectUpdater> m_cppCodeModelUpdater;
|
||||
MimeBinaryCache m_mimeBinaryCache;
|
||||
QByteArray m_projectFileHash;
|
||||
QTimer * const m_parseDelay;
|
||||
CompilationDbParser *m_parser = nullptr;
|
||||
Utils::FileSystemWatcher * const m_deployFileWatcher;
|
||||
};
|
||||
|
Reference in New Issue
Block a user