Files
qt-creator/src/plugins/qmlprofiler/qmlprofilerruncontrol.h
Jarek Kobus da475f400d QmlProfiler: Simplify QmlProfilerRunner
Remove registerProfilerStateManager() and connect to
state manager's signal directly from the start() function.

Remove Q_OBJECT macro.

Change-Id: Id03486f077c81909fbe0889bb342ee7595631e9d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2025-01-07 11:46:15 +00:00

52 lines
1.4 KiB
C++

// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <projectexplorer/runcontrol.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/outputformat.h>
#include <utils/port.h>
#include <qmldebug/qmloutputparser.h>
namespace QmlProfiler {
namespace Internal {
class QmlProfilerRunner : public ProjectExplorer::RunWorker
{
public:
QmlProfilerRunner(ProjectExplorer::RunControl *runControl);
~QmlProfilerRunner() override;
void cancelProcess();
private:
void start() override;
void stop() override;
class QmlProfilerRunnerPrivate;
QmlProfilerRunnerPrivate *d;
};
ProjectExplorer::RunWorker *createLocalQmlProfilerWorker(ProjectExplorer::RunControl *runControl);
void setupQmlProfilerRunning();
} // QmlProfiler::Internal
class SimpleQmlProfilerRunnerFactory final : public ProjectExplorer::RunWorkerFactory
{
public:
explicit SimpleQmlProfilerRunnerFactory(const QList<Utils::Id> &runConfigs, const QList<Utils::Id> &extraRunModes = {})
{
cloneProduct(ProjectExplorer::Constants::QML_PROFILER_RUN_FACTORY);
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
for (const Utils::Id &id : extraRunModes)
addSupportedRunMode(id);
setSupportedRunConfigs(runConfigs);
}
};
} // QmlProfiler