QmlProfiler: Use new setup for runworker

Change-Id: I3be81b59a0f9426909cd6dc3df2e0bacc8aea1be
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2023-11-21 18:09:22 +01:00
parent 00e3c59981
commit da0f308bea
3 changed files with 26 additions and 26 deletions

View File

@@ -56,17 +56,14 @@ class QmlProfilerPluginPrivate
{
public:
QmlProfilerTool m_profilerTool;
// The full local profiler.
LocalQmlProfilerRunWorkerFactory localQmlProfilerRunWorkerFactory;
// The bits plugged in in remote setups.
QmlProfilerRunWorkerFactory qmlProfilerRunWorkerFactory;
};
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
{
Q_UNUSED(arguments)
setupQmlProfilerRunning();
#ifdef WITH_TESTS
addTest<DebugMessagesModelTest>();
addTest<FlameGraphModelTest>();

View File

@@ -239,18 +239,33 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
// Factories
// The bits plugged in in remote setups.
QmlProfilerRunWorkerFactory::QmlProfilerRunWorkerFactory()
class QmlProfilerRunWorkerFactory final : public RunWorkerFactory
{
public:
QmlProfilerRunWorkerFactory()
{
setProduct<QmlProfilerRunner>();
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUNNER);
}
};
// The full local profiler.
LocalQmlProfilerRunWorkerFactory::LocalQmlProfilerRunWorkerFactory()
class LocalQmlProfilerRunWorkerFactory final : public RunWorkerFactory
{
public:
LocalQmlProfilerRunWorkerFactory()
{
setProduct<LocalQmlProfilerSupport>();
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
}
};
void setupQmlProfilerRunning()
{
static QmlProfilerRunWorkerFactory theQmlProfilerRunWorkerFactory;
static LocalQmlProfilerRunWorkerFactory theLocalQmlProfilerRunWorkerFactory;
}
} // QmlProfiler::Internal

View File

@@ -50,18 +50,6 @@ public:
const QUrl &serverUrl);
};
// The bits plugged in in remote setups.
class QmlProfilerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
{
public:
QmlProfilerRunWorkerFactory();
};
// The full local profiler.
class LocalQmlProfilerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
{
public:
LocalQmlProfilerRunWorkerFactory();
};
void setupQmlProfilerRunning();
} // QmlProfiler::Internal