forked from qt-creator/qt-creator
QmlProfiler: Use new setup for runworker
Change-Id: I3be81b59a0f9426909cd6dc3df2e0bacc8aea1be Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -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>();
|
||||
|
||||
@@ -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
|
||||
{
|
||||
setProduct<QmlProfilerRunner>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUNNER);
|
||||
}
|
||||
public:
|
||||
QmlProfilerRunWorkerFactory()
|
||||
{
|
||||
setProduct<QmlProfilerRunner>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUNNER);
|
||||
}
|
||||
};
|
||||
|
||||
// The full local profiler.
|
||||
LocalQmlProfilerRunWorkerFactory::LocalQmlProfilerRunWorkerFactory()
|
||||
class LocalQmlProfilerRunWorkerFactory final : public RunWorkerFactory
|
||||
{
|
||||
setProduct<LocalQmlProfilerSupport>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user