summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppprojectupdater.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppprojectupdater.h')
-rw-r--r--src/plugins/cpptools/cppprojectupdater.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/plugins/cpptools/cppprojectupdater.h b/src/plugins/cpptools/cppprojectupdater.h
index 65eb1522a1..5d95fa087c 100644
--- a/src/plugins/cpptools/cppprojectupdater.h
+++ b/src/plugins/cpptools/cppprojectupdater.h
@@ -25,6 +25,7 @@
#pragma once
+#include "cppprojectupdaterinterface.h"
#include "cpptools_global.h"
#include "projectinfo.h"
@@ -34,9 +35,19 @@
namespace CppTools {
class ProjectInfo;
-class ProjectUpdateInfo;
-class CPPTOOLS_EXPORT CppProjectUpdater : public QObject
+// registered in extensionsystem's object pool for plugins with weak dependency to CppTools
+class CPPTOOLS_EXPORT CppProjectUpdaterFactory : public QObject
+{
+ Q_OBJECT
+public:
+ CppProjectUpdaterFactory();
+
+ // keep the namespace, for the type name in the invokeMethod call
+ Q_INVOKABLE CppTools::CppProjectUpdaterInterface *create();
+};
+
+class CPPTOOLS_EXPORT CppProjectUpdater : public QObject, public CppProjectUpdaterInterface
{
Q_OBJECT
@@ -44,8 +55,8 @@ public:
CppProjectUpdater();
~CppProjectUpdater() override;
- void update(const ProjectUpdateInfo &projectUpdateInfo);
- void cancel();
+ void update(const ProjectExplorer::ProjectUpdateInfo &projectUpdateInfo) override;
+ void cancel() override;
private:
void cancelAndWaitForFinished();
@@ -54,7 +65,7 @@ private:
void onProjectInfoGenerated();
private:
- ProjectUpdateInfo m_projectUpdateInfo;
+ ProjectExplorer::ProjectUpdateInfo m_projectUpdateInfo;
QFutureInterface<void> m_futureInterface;
QFutureWatcher<ProjectInfo> m_generateFutureWatcher;