diff --git a/src/plugins/android/androidanalyzesupport.cpp b/src/plugins/android/androidanalyzesupport.cpp index ea3a1874373..bf5579c867c 100644 --- a/src/plugins/android/androidanalyzesupport.cpp +++ b/src/plugins/android/androidanalyzesupport.cpp @@ -29,11 +29,12 @@ #include "androidmanager.h" #include -#include #include -#include #include +#include +#include + #include #include @@ -47,7 +48,7 @@ namespace Internal { RunControl *AndroidAnalyzeSupport::createAnalyzeRunControl(RunConfiguration *runConfig, Core::Id runMode) { - AnalyzerRunControl *runControl = Debugger::createAnalyzerRunControl(runConfig, runMode); + RunControl *runControl = Debugger::createAnalyzerRunControl(runConfig, runMode); QTC_ASSERT(runControl, return 0); AnalyzerConnection connection; if (runMode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) { @@ -66,17 +67,14 @@ AndroidAnalyzeSupport::AndroidAnalyzeSupport(RunControl *runControl) : ToolRunner(runControl) { auto runner = new AndroidRunner(this, runControl->runConfiguration(), runControl->runMode()); - auto analyzerRunControl = qobject_cast(runControl); - connect(runControl, &AnalyzerRunControl::finished, runner, - [runner]() { runner->stop(); }); + connect(runControl, &RunControl::finished, runner, [runner] { runner->stop(); }); - connect(runControl, &AnalyzerRunControl::starting, runner, - [runner]() { runner->start(); }); + connect(runControl, &RunControl::starting, runner, [runner] { runner->start(); }); connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort, this, - [this, analyzerRunControl](Utils::Port) { - analyzerRunControl->notifyRemoteSetupDone(m_qmlPort); + [this, runControl](Utils::Port) { + runControl->notifyRemoteSetupDone(m_qmlPort); }); connect(runner, &AndroidRunner::remoteProcessStarted, this, @@ -85,20 +83,20 @@ AndroidAnalyzeSupport::AndroidAnalyzeSupport(RunControl *runControl) }); connect(runner, &AndroidRunner::remoteProcessFinished, this, - [this, runControl, analyzerRunControl](const QString &errorMsg) { - analyzerRunControl->notifyRemoteFinished(); - runControl->appendMessage(errorMsg, Utils::NormalMessageFormat); + [this, runControl](const QString &errorMsg) { + runControl->notifyRemoteFinished(); + appendMessage(errorMsg, Utils::NormalMessageFormat); }); connect(runner, &AndroidRunner::remoteErrorOutput, this, [this, runControl](const QString &msg) { - runControl->appendMessage(msg, Utils::StdErrFormatSameLine); + appendMessage(msg, Utils::StdErrFormatSameLine); m_outputParser.processOutput(msg); }); connect(runner, &AndroidRunner::remoteOutput, this, [this, runControl](const QString &msg) { - runControl->appendMessage(msg, Utils::StdOutFormatSameLine); + appendMessage(msg, Utils::StdOutFormatSameLine); m_outputParser.processOutput(msg); }); } diff --git a/src/plugins/android/androidanalyzesupport.h b/src/plugins/android/androidanalyzesupport.h index 338376dd6d7..887796153d7 100644 --- a/src/plugins/android/androidanalyzesupport.h +++ b/src/plugins/android/androidanalyzesupport.h @@ -31,8 +31,6 @@ #include -namespace Debugger { class AnalyzerRunControl; } - namespace Android { namespace Internal { diff --git a/src/plugins/baremetal/baremetalruncontrolfactory.cpp b/src/plugins/baremetal/baremetalruncontrolfactory.cpp index 5f04770f520..647978881af 100644 --- a/src/plugins/baremetal/baremetalruncontrolfactory.cpp +++ b/src/plugins/baremetal/baremetalruncontrolfactory.cpp @@ -36,15 +36,17 @@ #include #include #include -#include -#include -#include -#include #include #include -#include + +#include +#include #include +#include +#include #include +#include + #include #include diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h index 7faf3c311ac..fca11e6c481 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h @@ -25,7 +25,7 @@ #pragma once -#include +#include #include #include diff --git a/src/plugins/debugger/analyzer/analyzer.pri b/src/plugins/debugger/analyzer/analyzer.pri index dc2d12eff6f..7fa5582dc78 100644 --- a/src/plugins/debugger/analyzer/analyzer.pri +++ b/src/plugins/debugger/analyzer/analyzer.pri @@ -4,7 +4,6 @@ QT += network # AnalyzerBase files SOURCES += \ - $$PWD/analyzerruncontrol.cpp \ $$PWD/analyzerrunconfigwidget.cpp \ $$PWD/analyzerutils.cpp \ $$PWD/detailederrorview.cpp \ @@ -13,7 +12,6 @@ SOURCES += \ HEADERS += \ $$PWD/analyzerconstants.h \ - $$PWD/analyzerruncontrol.h \ $$PWD/analyzermanager.h \ $$PWD/analyzerstartparameters.h \ $$PWD/analyzerrunconfigwidget.h \ diff --git a/src/plugins/debugger/analyzer/analyzermanager.h b/src/plugins/debugger/analyzer/analyzermanager.h index 1fd6fa72db9..947a0e6d016 100644 --- a/src/plugins/debugger/analyzer/analyzermanager.h +++ b/src/plugins/debugger/analyzer/analyzermanager.h @@ -44,12 +44,8 @@ class QDockWidget; class QAction; QT_END_NAMESPACE -namespace ProjectExplorer { class RunConfiguration; } - namespace Debugger { -class AnalyzerRunControl; - /** * The mode in which this tool should preferably be run * @@ -93,8 +89,8 @@ public: /// Returns a new engine for the given start parameters. /// Called each time the tool is launched. - typedef std::function RunControlCreator; + typedef std::function RunControlCreator; RunControlCreator runControlCreator() const { return m_runControlCreator; } void setRunControlCreator(const RunControlCreator &creator) { m_runControlCreator = creator; } @@ -146,7 +142,7 @@ DEBUGGER_EXPORT void showPermanentStatusMessage(const QString &message); DEBUGGER_EXPORT QAction *createStartAction(); DEBUGGER_EXPORT QAction *createStopAction(); -DEBUGGER_EXPORT AnalyzerRunControl *createAnalyzerRunControl( +DEBUGGER_EXPORT ProjectExplorer::RunControl *createAnalyzerRunControl( ProjectExplorer::RunConfiguration *runConfiguration, Core::Id runMode); } // namespace Debugger diff --git a/src/plugins/debugger/analyzer/analyzerruncontrol.cpp b/src/plugins/debugger/analyzer/analyzerruncontrol.cpp deleted file mode 100644 index 6d5b83e51e9..00000000000 --- a/src/plugins/debugger/analyzer/analyzerruncontrol.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Author: Andreas Hartmetz, KDAB (andreas.hartmetz@kdab.com) -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "analyzerruncontrol.h" - -using namespace ProjectExplorer; - -namespace Debugger { - -AnalyzerRunControl::AnalyzerRunControl(RunConfiguration *runConfiguration, Core::Id runMode) - : RunControl(runConfiguration, runMode) -{} - -} // namespace Debugger diff --git a/src/plugins/debugger/analyzer/analyzerruncontrol.h b/src/plugins/debugger/analyzer/analyzerruncontrol.h deleted file mode 100644 index f2f6eaf3631..00000000000 --- a/src/plugins/debugger/analyzer/analyzerruncontrol.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Author: Andreas Hartmetz, KDAB (andreas.hartmetz@kdab.com) -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include - -#include - -#include - -namespace Debugger { - -/** - * An AnalyzerRunControl instance handles the launch of an analyzation tool. - * - * It gets created for each launch and deleted when the launch is stopped or ended. - */ -class DEBUGGER_EXPORT AnalyzerRunControl : public ProjectExplorer::RunControl -{ - Q_OBJECT - -public: - AnalyzerRunControl(ProjectExplorer::RunConfiguration *runConfiguration, Core::Id runMode); - - virtual void notifyRemoteSetupDone(Utils::Port) {} - virtual void notifyRemoteSetupFailed(const QString &) {} - virtual void notifyRemoteFinished() {} -}; - -} // namespace Debugger diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs index eb080f93cb6..6e6b4d441de 100644 --- a/src/plugins/debugger/debugger.qbs +++ b/src/plugins/debugger/debugger.qbs @@ -239,8 +239,6 @@ Project { "analyzermanager.h", "analyzerrunconfigwidget.cpp", "analyzerrunconfigwidget.h", - "analyzerruncontrol.cpp", - "analyzerruncontrol.h", "analyzerstartparameters.h", "analyzerutils.cpp", "analyzerutils.h", diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 4223065c145..aeee0a03bda 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -66,7 +66,6 @@ #include "analyzer/analyzerconstants.h" #include "analyzer/analyzermanager.h" -#include "analyzer/analyzerruncontrol.h" #include "analyzer/analyzerstartparameters.h" #include @@ -3634,7 +3633,7 @@ void showPermanentStatusMessage(const QString &message) dd->m_mainWindow->showStatusMessage(message, -1); } -AnalyzerRunControl *createAnalyzerRunControl(RunConfiguration *runConfiguration, Id runMode) +RunControl *createAnalyzerRunControl(RunConfiguration *runConfiguration, Id runMode) { foreach (const ActionDescription &action, dd->m_descriptions) { if (action.runMode() == runMode) diff --git a/src/plugins/ios/iosanalyzesupport.cpp b/src/plugins/ios/iosanalyzesupport.cpp index eb009e3e7b8..5bdb9a2da77 100644 --- a/src/plugins/ios/iosanalyzesupport.cpp +++ b/src/plugins/ios/iosanalyzesupport.cpp @@ -26,9 +26,6 @@ #include "iosanalyzesupport.h" #include "iosrunner.h" -#include - -using namespace Debugger; using namespace ProjectExplorer; namespace Ios { @@ -79,7 +76,7 @@ void IosAnalyzeSupport::handleGotInferiorPid(qint64 pid, Utils::Port qmlPort) void IosAnalyzeSupport::handleRemoteProcessFinished(bool cleanEnd) { if (!cleanEnd) - runControl()->appendMessage(tr("Run ended with error."), Utils::ErrorMessageFormat); + appendMessage(tr("Run ended with error."), Utils::ErrorMessageFormat); else appendMessage(tr("Run ended."), Utils::NormalMessageFormat); runControl()->notifyRemoteFinished(); @@ -97,10 +94,5 @@ void IosAnalyzeSupport::handleRemoteErrorOutput(const QString &output) m_outputParser.processOutput(output); } -AnalyzerRunControl *IosAnalyzeSupport::runControl() -{ - return qobject_cast(ToolRunner::runControl()); -} - } // namespace Internal } // namespace Ios diff --git a/src/plugins/ios/iosanalyzesupport.h b/src/plugins/ios/iosanalyzesupport.h index 8beec305716..6c3677d1a75 100644 --- a/src/plugins/ios/iosanalyzesupport.h +++ b/src/plugins/ios/iosanalyzesupport.h @@ -29,14 +29,9 @@ #include -#include - -namespace Debugger { class AnalyzerRunControl; } - namespace Ios { namespace Internal { -class IosRunConfiguration; class IosRunner; class IosAnalyzeSupport : public ProjectExplorer::ToolRunner @@ -55,7 +50,6 @@ private: void handleRemoteOutput(const QString &output); void handleRemoteErrorOutput(const QString &output); - Debugger::AnalyzerRunControl *runControl(); IosRunner * const m_runner; QmlDebug::QmlOutputParser m_outputParser; Utils::Port m_qmlPort; diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp index ba4943ae0a1..b331fdb9f46 100644 --- a/src/plugins/ios/iosrunfactories.cpp +++ b/src/plugins/ios/iosrunfactories.cpp @@ -33,7 +33,6 @@ #include "iosanalyzesupport.h" #include -#include #include #include @@ -185,7 +184,7 @@ RunControl *IosRunControlFactory::create(RunConfiguration *runConfig, if (mode == ProjectExplorer::Constants::NORMAL_RUN_MODE) res = new Ios::Internal::IosRunControl(rc); else if (mode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) { - AnalyzerRunControl *runControl = Debugger::createAnalyzerRunControl(runConfig, mode); + RunControl *runControl = Debugger::createAnalyzerRunControl(runConfig, mode); QTC_ASSERT(runControl, return 0); IDevice::ConstPtr device = DeviceKitInformation::device(target->kit()); if (device.isNull()) diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 4628db219aa..3a13351a494 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -30,6 +30,7 @@ #include "applicationlauncher.h" #include "devicesupport/idevice.h" +#include #include #include #include @@ -407,6 +408,10 @@ public: virtual void appendMessage(const QString &msg, Utils::OutputFormat format); virtual void bringApplicationToForeground(); + virtual void notifyRemoteSetupDone(Utils::Port) {} // FIXME: Replace by ToolRunner functionality + virtual void notifyRemoteSetupFailed(const QString &) {} // Same. + virtual void notifyRemoteFinished() {} // Same. + signals: void appendMessageRequested(ProjectExplorer::RunControl *runControl, const QString &msg, Utils::OutputFormat format); diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp index 4f71863566e..ec686bfaf5a 100644 --- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp +++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp @@ -31,8 +31,8 @@ #include #include #include + #include -#include #include @@ -67,24 +67,24 @@ Utils::Port LocalQmlProfilerRunner::findFreePort(QString &host) } LocalQmlProfilerRunner::LocalQmlProfilerRunner(const Configuration &configuration, - Debugger::AnalyzerRunControl *runControl) : + RunControl *runControl) : QObject(runControl), m_configuration(configuration) { connect(&m_launcher, &ApplicationLauncher::appendMessage, this, &LocalQmlProfilerRunner::appendMessage); connect(this, &LocalQmlProfilerRunner::stopped, - runControl, &Debugger::AnalyzerRunControl::notifyRemoteFinished); + runControl, &RunControl::notifyRemoteFinished); connect(this, &LocalQmlProfilerRunner::appendMessage, - runControl, &Debugger::AnalyzerRunControl::appendMessage); - connect(runControl, &Debugger::AnalyzerRunControl::starting, + runControl, &RunControl::appendMessage); + connect(runControl, &RunControl::starting, this, &LocalQmlProfilerRunner::start); connect(runControl, &RunControl::finished, this, &LocalQmlProfilerRunner::stop); m_outputParser.setNoOutputText(ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput()); - connect(runControl, &Debugger::AnalyzerRunControl::appendMessageRequested, + connect(runControl, &RunControl::appendMessageRequested, this, [this](RunControl *runControl, const QString &msg, Utils::OutputFormat format) { Q_UNUSED(runControl); Q_UNUSED(format); diff --git a/src/plugins/qmlprofiler/localqmlprofilerrunner.h b/src/plugins/qmlprofiler/localqmlprofilerrunner.h index bcbd996af89..62e8c26d619 100644 --- a/src/plugins/qmlprofiler/localqmlprofilerrunner.h +++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.h @@ -32,10 +32,6 @@ #include #include -namespace Debugger { -class AnalyzerRunControl; -} - namespace QmlProfiler { class QMLPROFILER_EXPORT LocalQmlProfilerRunner : public QObject @@ -50,7 +46,7 @@ public: }; LocalQmlProfilerRunner(const Configuration &configuration, - Debugger::AnalyzerRunControl *runControl); + ProjectExplorer::RunControl *runControl); static Utils::Port findFreePort(QString &host); static QString findFreeSocket(); diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index b87093b8e12..1ecfa453353 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -78,7 +78,7 @@ public: QmlProfilerRunControl::QmlProfilerRunControl(RunConfiguration *runConfiguration, Internal::QmlProfilerTool *tool) - : AnalyzerRunControl(runConfiguration, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) + : RunControl(runConfiguration, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) , d(new QmlProfilerRunControlPrivate) { setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR); diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h index 464b7f1047a..f142994febf 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h @@ -27,14 +27,14 @@ #include "qmlprofilerstatemanager.h" -#include +#include #include namespace QmlProfiler { namespace Internal { class QmlProfilerTool; } -class QmlProfilerRunControl : public Debugger::AnalyzerRunControl +class QmlProfilerRunControl : public ProjectExplorer::RunControl { Q_OBJECT diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp index 5803d239576..e489c3b5aa8 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp @@ -29,7 +29,6 @@ #include "qmlprofilerrunconfigurationaspect.h" #include -#include #include #include diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 79d53d1591f..971f04259c4 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -40,7 +40,6 @@ #include #include -#include #include #include @@ -318,7 +317,7 @@ void QmlProfilerTool::updateRunActions() } } -AnalyzerRunControl *QmlProfilerTool::createRunControl(RunConfiguration *runConfiguration) +RunControl *QmlProfilerTool::createRunControl(RunConfiguration *runConfiguration) { d->m_toolBusy = true; if (runConfiguration) { diff --git a/src/plugins/qmlprofiler/qmlprofilertool.h b/src/plugins/qmlprofiler/qmlprofilertool.h index 12e7784ad51..e0d7cbabfdd 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.h +++ b/src/plugins/qmlprofiler/qmlprofilertool.h @@ -30,7 +30,6 @@ #include "qmlprofilereventtypes.h" #include -#include QT_BEGIN_NAMESPACE class QMessageBox; @@ -50,7 +49,7 @@ public: explicit QmlProfilerTool(QObject *parent); ~QmlProfilerTool(); - Debugger::AnalyzerRunControl *createRunControl(ProjectExplorer::RunConfiguration *runConfiguration = 0); + ProjectExplorer::RunControl *createRunControl(ProjectExplorer::RunConfiguration *runConfiguration = 0); void finalizeRunControl(QmlProfilerRunControl *runControl); bool prepareTool(); diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp index 2656c4bb9d8..4859e292371 100644 --- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp +++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp @@ -25,7 +25,6 @@ #include "localqmlprofilerrunner_test.h" #include -#include #include #include #include diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h index 8f893781473..de538e70a89 100644 --- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h +++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h @@ -52,7 +52,7 @@ private: bool running = false; int runCount = 0; - Debugger::AnalyzerRunControl *rc = nullptr; + ProjectExplorer::RunControl *rc = nullptr; Debugger::AnalyzerConnection connection; LocalQmlProfilerRunner::Configuration configuration; }; diff --git a/src/plugins/qnx/qnxanalyzesupport.cpp b/src/plugins/qnx/qnxanalyzesupport.cpp index 0ff9df37b4e..59ee41810db 100644 --- a/src/plugins/qnx/qnxanalyzesupport.cpp +++ b/src/plugins/qnx/qnxanalyzesupport.cpp @@ -29,7 +29,6 @@ #include "qnxrunconfiguration.h" #include "slog2inforunner.h" -#include #include #include @@ -111,11 +110,6 @@ void QnxAnalyzeSupport::startExecution() appRunner()->start(r, device()); } -Debugger::AnalyzerRunControl *QnxAnalyzeSupport::runControl() -{ - return qobject_cast(QnxAbstractRunSupport::runControl()); -} - void QnxAnalyzeSupport::handleRemoteProcessFinished(bool success) { if (!success) diff --git a/src/plugins/qnx/qnxanalyzesupport.h b/src/plugins/qnx/qnxanalyzesupport.h index 1667727ce78..bd665c84362 100644 --- a/src/plugins/qnx/qnxanalyzesupport.h +++ b/src/plugins/qnx/qnxanalyzesupport.h @@ -31,8 +31,6 @@ #include #include -namespace Debugger { class AnalyzerRunControl; } - namespace Qnx { namespace Internal { @@ -58,7 +56,6 @@ private: void remoteIsRunning(); void startExecution() override; - Debugger::AnalyzerRunControl *runControl(); ProjectExplorer::StandardRunnable m_runnable; QmlDebug::QmlOutputParser m_outputParser; diff --git a/src/plugins/qnx/qnxruncontrolfactory.cpp b/src/plugins/qnx/qnxruncontrolfactory.cpp index c5c53dec60e..86fa9ced2a7 100644 --- a/src/plugins/qnx/qnxruncontrolfactory.cpp +++ b/src/plugins/qnx/qnxruncontrolfactory.cpp @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -141,7 +140,7 @@ RunControl *QnxRunControlFactory::create(RunConfiguration *runConfig, Core::Id m const IDevice::ConstPtr device = DeviceKitInformation::device(kit); if (device.isNull()) return 0; - AnalyzerRunControl *runControl = Debugger::createAnalyzerRunControl(runConfig, mode); + RunControl *runControl = Debugger::createAnalyzerRunControl(runConfig, mode); QTC_ASSERT(runControl, return 0); runControl->setRunnable(runConfig->runnable()); AnalyzerConnection connection; diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp index 93328fe8d98..cda84620658 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp +++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp @@ -27,8 +27,6 @@ #include "remotelinuxrunconfiguration.h" -#include - #include #include #include @@ -44,7 +42,6 @@ #include using namespace QSsh; -using namespace Debugger; using namespace ProjectExplorer; using namespace Utils; @@ -198,9 +195,7 @@ void RemoteLinuxAnalyzeSupport::handleAppRunnerFinished(bool success) reset(); if (!success) showMessage(tr("Failure running remote process."), Utils::NormalMessageFormat); - auto rc = qobject_cast(runControl()); - QTC_ASSERT(rc, return); - rc->notifyRemoteFinished(); + runControl()->notifyRemoteFinished(); } void RemoteLinuxAnalyzeSupport::handleProfilingFinished() @@ -210,9 +205,7 @@ void RemoteLinuxAnalyzeSupport::handleProfilingFinished() void RemoteLinuxAnalyzeSupport::remoteIsRunning() { - auto rc = qobject_cast(runControl()); - QTC_ASSERT(rc, return); - rc->notifyRemoteSetupDone(d->qmlPort); + runControl()->notifyRemoteSetupDone(d->qmlPort); } void RemoteLinuxAnalyzeSupport::handleRemoteOutput(const QByteArray &output) diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.h b/src/plugins/remotelinux/remotelinuxanalyzesupport.h index 21160b316e1..f2b35b02f75 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.h +++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.h @@ -32,8 +32,6 @@ #include -namespace Debugger { class AnalyzerRunControl; } - namespace RemoteLinux { namespace Internal { class RemoteLinuxAnalyzeSupportPrivate; } diff --git a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp index f18284a5a57..8ca1e6657d4 100644 --- a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp +++ b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp @@ -31,7 +31,6 @@ #include "remotelinuxrunconfiguration.h" #include -#include #include #include diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index 5558b01ccf7..67dfd9b66b6 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -748,7 +748,7 @@ ValgrindRunControl *CallgrindTool::createRunControl(RunConfiguration *runConfigu auto runControl = new CallgrindRunControl(runConfiguration, runMode); connect(runControl, &CallgrindRunControl::parserDataReady, this, &CallgrindTool::takeParserDataFromRunControl); - connect(runControl, &AnalyzerRunControl::starting, this, &CallgrindTool::engineStarting); + connect(runControl, &RunControl::starting, this, &CallgrindTool::engineStarting); connect(runControl, &RunControl::finished, this, &CallgrindTool::engineFinished); connect(this, &CallgrindTool::dumpRequested, runControl, &CallgrindRunControl::dump); diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index 5c2b1d184dd..9c3c06544cb 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -242,7 +242,7 @@ class MemcheckTool : public QObject public: MemcheckTool(QObject *parent); - AnalyzerRunControl *createRunControl(RunConfiguration *runConfiguration, Core::Id runMode); + RunControl *createRunControl(RunConfiguration *runConfiguration, Core::Id runMode); private: void updateRunActions(); @@ -421,7 +421,7 @@ MemcheckTool::MemcheckTool(QObject *parent) StartRemoteDialog dlg; if (dlg.exec() != QDialog::Accepted) return; - AnalyzerRunControl *rc = createRunControl(runConfig, MEMCHECK_RUN_MODE); + RunControl *rc = createRunControl(runConfig, MEMCHECK_RUN_MODE); QTC_ASSERT(rc, return); const auto runnable = dlg.runnable(); rc->setRunnable(runnable); @@ -531,7 +531,7 @@ void MemcheckTool::maybeActiveRunConfigurationChanged() updateFromSettings(); } -AnalyzerRunControl *MemcheckTool::createRunControl(RunConfiguration *runConfiguration, Core::Id runMode) +RunControl *MemcheckTool::createRunControl(RunConfiguration *runConfiguration, Core::Id runMode) { m_errorModel.setRelevantFrameFinder(makeFrameFinder(runConfiguration ? runConfiguration->target()->project()->files(Project::AllFiles) : QStringList())); diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp index b2224f0a16d..8c56bd782c3 100644 --- a/src/plugins/valgrind/valgrindengine.cpp +++ b/src/plugins/valgrind/valgrindengine.cpp @@ -54,7 +54,7 @@ namespace Valgrind { namespace Internal { ValgrindRunControl::ValgrindRunControl(RunConfiguration *runConfiguration, Core::Id runMode) - : AnalyzerRunControl(runConfiguration, runMode) + : RunControl(runConfiguration, runMode) { setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR); QTC_ASSERT(runConfiguration, return); diff --git a/src/plugins/valgrind/valgrindengine.h b/src/plugins/valgrind/valgrindengine.h index 5b71e94a1a8..76f9e573118 100644 --- a/src/plugins/valgrind/valgrindengine.h +++ b/src/plugins/valgrind/valgrindengine.h @@ -26,7 +26,7 @@ #pragma once -#include +#include #include #include #include @@ -37,7 +37,7 @@ namespace Valgrind { namespace Internal { -class ValgrindRunControl : public Debugger::AnalyzerRunControl +class ValgrindRunControl : public ProjectExplorer::RunControl { Q_OBJECT