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;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace PerfProfiler {
|
namespace PerfProfiler::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
Q_GLOBAL_STATIC(PerfSettings, perfGlobalSettings)
|
Q_GLOBAL_STATIC(PerfSettings, perfGlobalSettings)
|
||||||
|
|
||||||
@@ -46,11 +45,7 @@ public:
|
|||||||
RunConfiguration::registerAspect<PerfRunConfigurationAspect>();
|
RunConfiguration::registerAspect<PerfRunConfigurationAspect>();
|
||||||
}
|
}
|
||||||
|
|
||||||
RunWorkerFactory profilerWorkerFactory{
|
PerfProfilerRunWorkerFactory profilerWorkerFactory;
|
||||||
RunWorkerFactory::make<PerfProfilerRunner>(),
|
|
||||||
{ProjectExplorer::Constants::PERFPROFILER_RUN_MODE}
|
|
||||||
};
|
|
||||||
|
|
||||||
PerfOptionsPage optionsPage{perfGlobalSettings()};
|
PerfOptionsPage optionsPage{perfGlobalSettings()};
|
||||||
PerfProfilerTool profilerTool;
|
PerfProfilerTool profilerTool;
|
||||||
};
|
};
|
||||||
@@ -84,5 +79,4 @@ QVector<QObject *> PerfProfilerPlugin::createTestObjects() const
|
|||||||
return tests;
|
return tests;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // PerfProfiler::Internal
|
||||||
} // namespace PerfProfiler
|
|
||||||
|
@@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
namespace PerfProfiler {
|
namespace PerfProfiler::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class PerfProfilerPlugin : public ExtensionSystem::IPlugin
|
class PerfProfilerPlugin : public ExtensionSystem::IPlugin
|
||||||
{
|
{
|
||||||
@@ -26,5 +25,4 @@ public:
|
|||||||
class PerfProfilerPluginPrivate *d = nullptr;
|
class PerfProfilerPluginPrivate *d = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // PerfProfiler::Internal
|
||||||
} // namespace PerfProfiler
|
|
||||||
|
@@ -10,9 +10,12 @@
|
|||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/messagemanager.h>
|
#include <coreplugin/messagemanager.h>
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
#include <projectexplorer/kitinformation.h>
|
#include <projectexplorer/kitinformation.h>
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
@@ -22,8 +25,7 @@
|
|||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace PerfProfiler {
|
namespace PerfProfiler::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class PerfParserWorker : public RunWorker
|
class PerfParserWorker : public RunWorker
|
||||||
{
|
{
|
||||||
@@ -204,7 +206,14 @@ void PerfProfilerRunner::start()
|
|||||||
reportStarted();
|
reportStarted();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
// PerfProfilerRunWorkerFactory
|
||||||
} // namespace PerfProfiler
|
|
||||||
|
PerfProfilerRunWorkerFactory::PerfProfilerRunWorkerFactory()
|
||||||
|
{
|
||||||
|
setProduct<PerfProfilerRunner>();
|
||||||
|
addSupportedRunMode(ProjectExplorer::Constants::PERFPROFILER_RUN_MODE);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // PerfProfiler::Internal
|
||||||
|
|
||||||
#include "perfprofilerruncontrol.moc"
|
#include "perfprofilerruncontrol.moc"
|
||||||
|
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
#include <projectexplorer/runcontrol.h>
|
#include <projectexplorer/runcontrol.h>
|
||||||
|
|
||||||
namespace PerfProfiler {
|
namespace PerfProfiler::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class PerfParserWorker;
|
class PerfParserWorker;
|
||||||
class PerfRecordWorker;
|
class PerfRecordWorker;
|
||||||
@@ -24,5 +23,10 @@ private:
|
|||||||
ProjectExplorer::RunWorker *m_perfRecordWorker = nullptr;
|
ProjectExplorer::RunWorker *m_perfRecordWorker = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
class PerfProfilerRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||||
} // namespace PerfProfiler
|
{
|
||||||
|
public:
|
||||||
|
PerfProfilerRunWorkerFactory();
|
||||||
|
};
|
||||||
|
|
||||||
|
} // PerfProfiler::Internal
|
||||||
|
Reference in New Issue
Block a user