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:
|
public:
|
||||||
QmlProfilerTool m_profilerTool;
|
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)
|
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||||
{
|
{
|
||||||
Q_UNUSED(arguments)
|
Q_UNUSED(arguments)
|
||||||
|
|
||||||
|
setupQmlProfilerRunning();
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
addTest<DebugMessagesModelTest>();
|
addTest<DebugMessagesModelTest>();
|
||||||
addTest<FlameGraphModelTest>();
|
addTest<FlameGraphModelTest>();
|
||||||
|
|||||||
@@ -239,18 +239,33 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
|
|||||||
// Factories
|
// Factories
|
||||||
|
|
||||||
// The bits plugged in in remote setups.
|
// The bits plugged in in remote setups.
|
||||||
QmlProfilerRunWorkerFactory::QmlProfilerRunWorkerFactory()
|
class QmlProfilerRunWorkerFactory final : public RunWorkerFactory
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
QmlProfilerRunWorkerFactory()
|
||||||
|
{
|
||||||
setProduct<QmlProfilerRunner>();
|
setProduct<QmlProfilerRunner>();
|
||||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUNNER);
|
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUNNER);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// The full local profiler.
|
// The full local profiler.
|
||||||
LocalQmlProfilerRunWorkerFactory::LocalQmlProfilerRunWorkerFactory()
|
class LocalQmlProfilerRunWorkerFactory final : public RunWorkerFactory
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
LocalQmlProfilerRunWorkerFactory()
|
||||||
|
{
|
||||||
setProduct<LocalQmlProfilerSupport>();
|
setProduct<LocalQmlProfilerSupport>();
|
||||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||||
addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
|
addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void setupQmlProfilerRunning()
|
||||||
|
{
|
||||||
|
static QmlProfilerRunWorkerFactory theQmlProfilerRunWorkerFactory;
|
||||||
|
static LocalQmlProfilerRunWorkerFactory theLocalQmlProfilerRunWorkerFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // QmlProfiler::Internal
|
} // QmlProfiler::Internal
|
||||||
|
|||||||
@@ -50,18 +50,6 @@ public:
|
|||||||
const QUrl &serverUrl);
|
const QUrl &serverUrl);
|
||||||
};
|
};
|
||||||
|
|
||||||
// The bits plugged in in remote setups.
|
void setupQmlProfilerRunning();
|
||||||
class QmlProfilerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
QmlProfilerRunWorkerFactory();
|
|
||||||
};
|
|
||||||
|
|
||||||
// The full local profiler.
|
|
||||||
class LocalQmlProfilerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
LocalQmlProfilerRunWorkerFactory();
|
|
||||||
};
|
|
||||||
|
|
||||||
} // QmlProfiler::Internal
|
} // QmlProfiler::Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user