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 <hjk@qt.io>
This commit is contained in:
Dominik Holland
2024-01-30 15:45:35 +01:00
parent 243d063cb9
commit 2a6de890c7
4 changed files with 24 additions and 0 deletions

View File

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