forked from qt-creator/qt-creator
Observe the cration of extra compiler
We link into the extra compiler factory and notify the PchManager for every extra compiler creation. It enables to monitor if all extra compiler finished. Change-Id: If8da386c88909abd2e0e651e4336865c9dc5bf34 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "pchmanagerprojectupdater.h"
|
||||
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
#include <projectexplorer/extracompiler.h>
|
||||
|
||||
#include <filecontainerv2.h>
|
||||
|
||||
@@ -49,8 +50,9 @@ CLANGPCHMANAGER_EXPORT std::vector<ClangBackEnd::V2::FileContainer> createGenera
|
||||
CLANGPCHMANAGER_EXPORT std::vector<CppTools::ProjectPart*> createProjectParts(ProjectExplorer::Project *project);
|
||||
}
|
||||
|
||||
template <typename ProjectUpdaterType>
|
||||
class QtCreatorProjectUpdater : public ProjectUpdaterType
|
||||
template<typename ProjectUpdaterType>
|
||||
class QtCreatorProjectUpdater : public ProjectUpdaterType,
|
||||
public ProjectExplorer::ExtraCompilerFactoryObserver
|
||||
{
|
||||
public:
|
||||
template <typename ClientType>
|
||||
@@ -90,6 +92,15 @@ public:
|
||||
ProjectUpdaterType::removeGeneratedFiles({ClangBackEnd::FilePath{filePath}});
|
||||
}
|
||||
|
||||
protected:
|
||||
void newExtraCompiler(const ProjectExplorer::Project *,
|
||||
const Utils::FileName &,
|
||||
const Utils::FileNameList &targets) override
|
||||
{
|
||||
for (const Utils::FileName &target : targets)
|
||||
abstractEditorUpdated(target.toString(), {});
|
||||
}
|
||||
|
||||
private:
|
||||
void connectToCppModelManager()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user