diff --git a/src/plugins/perfprofiler/perfprofilerplugin.cpp b/src/plugins/perfprofiler/perfprofilerplugin.cpp index 2125b6e6ec5..3d236d66539 100644 --- a/src/plugins/perfprofiler/perfprofilerplugin.cpp +++ b/src/plugins/perfprofiler/perfprofilerplugin.cpp @@ -33,8 +33,7 @@ using namespace ProjectExplorer; -namespace PerfProfiler { -namespace Internal { +namespace PerfProfiler::Internal { Q_GLOBAL_STATIC(PerfSettings, perfGlobalSettings) @@ -46,11 +45,7 @@ public: RunConfiguration::registerAspect(); } - RunWorkerFactory profilerWorkerFactory{ - RunWorkerFactory::make(), - {ProjectExplorer::Constants::PERFPROFILER_RUN_MODE} - }; - + PerfProfilerRunWorkerFactory profilerWorkerFactory; PerfOptionsPage optionsPage{perfGlobalSettings()}; PerfProfilerTool profilerTool; }; @@ -84,5 +79,4 @@ QVector PerfProfilerPlugin::createTestObjects() const return tests; } -} // namespace Internal -} // namespace PerfProfiler +} // PerfProfiler::Internal diff --git a/src/plugins/perfprofiler/perfprofilerplugin.h b/src/plugins/perfprofiler/perfprofilerplugin.h index 62fac15807f..35f8899a108 100644 --- a/src/plugins/perfprofiler/perfprofilerplugin.h +++ b/src/plugins/perfprofiler/perfprofilerplugin.h @@ -7,8 +7,7 @@ #include -namespace PerfProfiler { -namespace Internal { +namespace PerfProfiler::Internal { class PerfProfilerPlugin : public ExtensionSystem::IPlugin { @@ -26,5 +25,4 @@ public: class PerfProfilerPluginPrivate *d = nullptr; }; -} // namespace Internal -} // namespace PerfProfiler +} // PerfProfiler::Internal diff --git a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp index b558aaa8bad..cb1e3b1966a 100644 --- a/src/plugins/perfprofiler/perfprofilerruncontrol.cpp +++ b/src/plugins/perfprofiler/perfprofilerruncontrol.cpp @@ -10,9 +10,12 @@ #include #include + #include #include +#include #include + #include #include @@ -22,8 +25,7 @@ using namespace ProjectExplorer; using namespace Utils; -namespace PerfProfiler { -namespace Internal { +namespace PerfProfiler::Internal { class PerfParserWorker : public RunWorker { @@ -204,7 +206,14 @@ void PerfProfilerRunner::start() reportStarted(); } -} // namespace Internal -} // namespace PerfProfiler +// PerfProfilerRunWorkerFactory + +PerfProfilerRunWorkerFactory::PerfProfilerRunWorkerFactory() +{ + setProduct(); + addSupportedRunMode(ProjectExplorer::Constants::PERFPROFILER_RUN_MODE); +} + +} // PerfProfiler::Internal #include "perfprofilerruncontrol.moc" diff --git a/src/plugins/perfprofiler/perfprofilerruncontrol.h b/src/plugins/perfprofiler/perfprofilerruncontrol.h index 2fe1c4abbcd..dfadff2ff09 100644 --- a/src/plugins/perfprofiler/perfprofilerruncontrol.h +++ b/src/plugins/perfprofiler/perfprofilerruncontrol.h @@ -5,8 +5,7 @@ #include -namespace PerfProfiler { -namespace Internal { +namespace PerfProfiler::Internal { class PerfParserWorker; class PerfRecordWorker; @@ -24,5 +23,10 @@ private: ProjectExplorer::RunWorker *m_perfRecordWorker = nullptr; }; -} // namespace Internal -} // namespace PerfProfiler +class PerfProfilerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory +{ +public: + PerfProfilerRunWorkerFactory(); +}; + +} // PerfProfiler::Internal