ProjectExplorer: Promote CppProjectUpdaterInterface

... to ProjectExplorer::ProjectUpdaterInterface and generalize it
regarding language, but create a convience function for the C++
case, as that's the only user right now.

Also add the self-registering factory boilerplate and adapt all
buildsystems.

Change-Id: If928512609d41c25fad2aa58633c8bffabc4c48f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-10-19 10:42:45 +02:00
parent 0fa16f8489
commit b89baec2c1
23 changed files with 165 additions and 96 deletions

View File

@@ -24,12 +24,12 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <cppeditor/cppeditorconstants.h>
#include <cppeditor/cppprojectupdater.h>
#include <projectexplorer/extracompiler.h>
#include <projectexplorer/kitaspects.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectupdater.h>
#include <projectexplorer/target.h>
#include <projectexplorer/taskhub.h>
@@ -71,7 +71,7 @@ static Q_LOGGING_CATEGORY(cmakeBuildSystemLog, "qtc.cmake.buildsystem", QtWarnin
CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
: BuildSystem(bc)
, m_cppCodeModelUpdater(new CppEditor::CppProjectUpdater)
, m_cppCodeModelUpdater(ProjectUpdaterFactory::createCppProjectUpdater())
{
// TreeScanner:
connect(&m_treeScanner, &TreeScanner::finished,

View File

@@ -10,14 +10,14 @@
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildsystem.h>
#include <utils/fileutils.h>
#include <utils/temporarydirectory.h>
namespace CppEditor { class CppProjectUpdater; }
namespace ProjectExplorer {
class ExtraCompiler;
class FolderNode;
class ProjectUpdater;
}
namespace Utils {
class Process;
class Link;
@@ -225,7 +225,7 @@ private:
ParseGuard m_currentGuard;
CppEditor::CppProjectUpdater *m_cppCodeModelUpdater = nullptr;
ProjectExplorer::ProjectUpdater *m_cppCodeModelUpdater = nullptr;
QList<ProjectExplorer::ExtraCompiler *> m_extraCompilers;
QList<CMakeBuildTarget> m_buildTargets;
QSet<CMakeFileInfo> m_cmakeFiles;