diff --git a/src/plugins/qmlprofiler/qmlprofilerplugin.cpp b/src/plugins/qmlprofiler/qmlprofilerplugin.cpp index 23655eff885..31a4999b657 100644 --- a/src/plugins/qmlprofiler/qmlprofilerplugin.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerplugin.cpp @@ -51,8 +51,7 @@ using namespace ProjectExplorer; -namespace QmlProfiler { -namespace Internal { +namespace QmlProfiler::Internal { Q_GLOBAL_STATIC(QmlProfilerSettings, qmlProfilerGlobalSettings) @@ -64,20 +63,9 @@ public: QmlProfilerActions m_actions; // The full local profiler. - RunWorkerFactory localQmlProfilerFactory { - RunWorkerFactory::make(), - {ProjectExplorer::Constants::QML_PROFILER_RUN_MODE}, - {}, - {ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE} - }; - + LocalQmlProfilerRunWorkerFactory localQmlProfilerRunWorkerFactory; // The bits plugged in in remote setups. - RunWorkerFactory qmlProfilerWorkerFactory { - RunWorkerFactory::make(), - {ProjectExplorer::Constants::QML_PROFILER_RUNNER}, - {}, - {} - }; + QmlProfilerRunWorkerFactory qmlProfilerRunWorkerFactory; }; bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString) @@ -140,5 +128,4 @@ QVector QmlProfiler::Internal::QmlProfilerPlugin::createTestObjects() return tests; } -} // namespace Internal -} // namespace QmlProfiler +} // QmlProfiler::Internal diff --git a/src/plugins/qmlprofiler/qmlprofilerplugin.h b/src/plugins/qmlprofiler/qmlprofilerplugin.h index 89b1d32f38b..262fd73bc73 100644 --- a/src/plugins/qmlprofiler/qmlprofilerplugin.h +++ b/src/plugins/qmlprofiler/qmlprofilerplugin.h @@ -5,8 +5,7 @@ #include -namespace QmlProfiler { -namespace Internal { +namespace QmlProfiler::Internal { class QmlProfilerSettings; @@ -27,5 +26,4 @@ private: class QmlProfilerPluginPrivate *d = nullptr; }; -} // namespace Internal -} // namespace QmlProfiler +} // QmlProfiler::Internal diff --git a/src/plugins/qmlprofiler/qmlprofilerrunconfigurationaspect.cpp b/src/plugins/qmlprofiler/qmlprofilerrunconfigurationaspect.cpp index 1d7ea3e0e4e..ac3056d3da3 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrunconfigurationaspect.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerrunconfigurationaspect.cpp @@ -9,8 +9,7 @@ #include -namespace QmlProfiler { -namespace Internal { +namespace QmlProfiler::Internal { QmlProfilerRunConfigurationAspect::QmlProfilerRunConfigurationAspect(ProjectExplorer::Target *) { @@ -23,5 +22,4 @@ QmlProfilerRunConfigurationAspect::QmlProfilerRunConfigurationAspect(ProjectExpl setConfigWidgetCreator([this] { return new Debugger::AnalyzerRunConfigWidget(this); }); } -} // Internal -} // QmlProfiler +} // QmlProfiler::Internal diff --git a/src/plugins/qmlprofiler/qmlprofilerrunconfigurationaspect.h b/src/plugins/qmlprofiler/qmlprofilerrunconfigurationaspect.h index 6d34126e5c1..2d3212287c5 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrunconfigurationaspect.h +++ b/src/plugins/qmlprofiler/qmlprofilerrunconfigurationaspect.h @@ -5,8 +5,7 @@ #include -namespace QmlProfiler { -namespace Internal { +namespace QmlProfiler::Internal { class QmlProfilerRunConfigurationAspect : public ProjectExplorer::GlobalOrProjectAspect { @@ -14,5 +13,4 @@ public: QmlProfilerRunConfigurationAspect(ProjectExplorer::Target *); }; -} // Internal -} // QmlProfiler +} // QmlProfiler::Internal diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index 7cc3ca658ec..f5c45789d8f 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -29,10 +29,9 @@ using namespace Core; using namespace ProjectExplorer; -namespace QmlProfiler { -namespace Internal { +namespace QmlProfiler::Internal { -static QString QmlServerUrl = "QmlServerUrl"; +const QString QmlServerUrl = "QmlServerUrl"; // // QmlProfilerRunControlPrivate @@ -237,5 +236,21 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q }); } -} // namespace Internal -} // namespace QmlProfiler +// Factories + +// The bits plugged in in remote setups. +QmlProfilerRunWorkerFactory::QmlProfilerRunWorkerFactory() +{ + setProduct(); + addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUNNER); +} + +// The full local profiler. +LocalQmlProfilerRunWorkerFactory::LocalQmlProfilerRunWorkerFactory() +{ + setProduct(); + addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); + addSupportedDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE); +} + +} // QmlProfiler::Internal diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h index a9b20deb9f8..f23e59666e1 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h @@ -12,8 +12,7 @@ #include -namespace QmlProfiler { -namespace Internal { +namespace QmlProfiler::Internal { class QmlProfilerRunner : public ProjectExplorer::RunWorker { @@ -51,5 +50,18 @@ public: const QUrl &serverUrl); }; -} // namespace Internal -} // namespace QmlProfiler +// 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(); +}; + +} // QmlProfiler::Internal