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:
Marco Bubke
2019-02-12 19:49:38 +01:00
parent 2887f5e5a9
commit fbadbd3b0d
6 changed files with 62 additions and 8 deletions

View File

@@ -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()
{