forked from qt-creator/qt-creator
PerfProfiler: Use named classes for run worker factories
Change-Id: Ib91f307c69bd2b85626aedf958799417cdd354ee Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -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<PerfRunConfigurationAspect>();
|
||||
}
|
||||
|
||||
RunWorkerFactory profilerWorkerFactory{
|
||||
RunWorkerFactory::make<PerfProfilerRunner>(),
|
||||
{ProjectExplorer::Constants::PERFPROFILER_RUN_MODE}
|
||||
};
|
||||
|
||||
PerfProfilerRunWorkerFactory profilerWorkerFactory;
|
||||
PerfOptionsPage optionsPage{perfGlobalSettings()};
|
||||
PerfProfilerTool profilerTool;
|
||||
};
|
||||
@@ -84,5 +79,4 @@ QVector<QObject *> PerfProfilerPlugin::createTestObjects() const
|
||||
return tests;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace PerfProfiler
|
||||
} // PerfProfiler::Internal
|
||||
|
@@ -7,8 +7,7 @@
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
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
|
||||
|
@@ -10,9 +10,12 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QAction>
|
||||
@@ -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<PerfProfilerRunner>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::PERFPROFILER_RUN_MODE);
|
||||
}
|
||||
|
||||
} // PerfProfiler::Internal
|
||||
|
||||
#include "perfprofilerruncontrol.moc"
|
||||
|
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user