aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
diff options
context:
space:
mode:
authorDominik Holland <[email protected]>2024-01-30 15:45:35 +0100
committerDominik Holland <[email protected]>2024-02-01 15:58:16 +0000
commit2a6de890c74ef501511da451218fd037744d6a3e (patch)
treef2d0da4779b608e7b8f015666beca2df3dfc39e6 /src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
parent243d063cb9c8d82089f3162186d2b7d6c19b4222 (diff)
Create RunConfiguration specific QmlPreviewWorkerFactories
Instead of relying on the QmlPreviewRunWorkerFactory to match for all RunConfiguration, every plugin needs to create a WorkerFactory for its own RunConfiguration. Similar to the SimpleTargetRunnerFactory there is now a SimpleQmlPreviewRunnerFactory which makes the setup easy. Change-Id: I350e5a047033a259dae91045486d4f41e7f58994 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlprojectplugin.cpp')
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectplugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
index c2f9347080d..cd2910ec7fe 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
@@ -42,6 +42,8 @@
#include <qmljstools/qmljstoolsconstants.h>
+#include <qmlpreview/qmlpreviewruncontrol.h>
+
#include <extensionsystem/pluginmanager.h>
#include <extensionsystem/pluginspec.h>
@@ -59,6 +61,7 @@
#include <QTimer>
using namespace Core;
+using namespace QmlPreview;
using namespace QmlProfiler;
using namespace Debugger;
using namespace ProjectExplorer;
@@ -257,6 +260,7 @@ private:
static SimpleTargetRunnerFactory runWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
static SimpleQmlProfilerRunnerFactory qmlProfilerRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
static SimpleDebugRunnerFactory debugRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
+ static SimplePreviewRunnerFactory previewRunWorkerFactory{{Constants::QML_RUNCONFIG_ID}};
}
void displayQmlLandingPage();