aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2024-01-18 10:14:05 +0100
committerhjk <[email protected]>2024-01-18 09:29:16 +0000
commitd86ec67f31517a4b34918101d33c66cc5181e41b (patch)
tree7a13971ce5c152c8034157dc87fb2b0b843cf679 /src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
parent800007297f45df995cacecab97e81620a3bc5a6e (diff)
QmlProjectManager: Delay construction of some run worker factories
... until the base factories are there. Change-Id: I0b3541c32eb7f7bbc24461a0fc9c1be85fc4f29b Reviewed-by: Dominik Holland <[email protected]>
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlprojectplugin.cpp')
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectplugin.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
index 956079820ae..021c0e2a730 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
@@ -6,6 +6,7 @@
#include "qdslandingpage.h"
#include "qmlproject.h"
#include "qmlprojectconstants.h"
+#include "qmlprojectmanagerconstants.h"
#include "qmlprojectmanagertr.h"
#include "qmlprojectrunconfiguration.h"
#include "projectfilecontenttools.h"
@@ -102,9 +103,6 @@ class QmlProjectPluginPrivate
{
public:
QmlProjectRunConfigurationFactory runConfigFactory;
- SimpleTargetRunnerFactory runWorkerFactory{{runConfigFactory.runConfigurationId()}};
- SimpleDebugRunnerFactory debugRunWorkerFactory{{runConfigFactory.runConfigurationId()}};
- SimpleQmlProfilerRunnerFactory qmlProfilerRunWorkerFactory{{runConfigFactory.runConfigurationId()}};
QPointer<QMessageBox> lastMessageBox;
QdsLandingPage *landingPage = nullptr;
QdsLandingPageWidget *landingPageWidget = nullptr;
@@ -258,6 +256,15 @@ public slots:
private:
void initialize() final;
+
+ void extensionsInitialized() final
+ {
+ // These rely on the base tool factories being present:
+ static SimpleTargetRunnerFactory runWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
+ static SimpleQmlProfilerRunnerFactory qmlProfilerRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
+ static SimpleDebugRunnerFactory debugRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
+ }
+
void displayQmlLandingPage();
void hideQmlLandingPage();
void updateQmlLandingPageProjectInfo(const Utils::FilePath &projectFile);