aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-03-30 11:54:23 +0200
committerhjk <hjk@qt.io>2017-04-05 13:47:53 +0000
commit112e32228aa41bf356604e099c807ebb14bf8e5e (patch)
tree1df8bbc75a982b58a2d4d2bf34e8ab2ed1437b72
parent43fc2ebeb06d0e0c820ec6316e8dc67df6ad4db1 (diff)
ProjectExplorer: Merge AnalyzerRunControl into RunControl
The change is "conceptually wrong", the AnalyzerRunControl derived classes' functionality should be provided by ToolRunners based classes encapsulating/"being" the current Analyzer*Runner classes. However, the AnalyzerRunControl is only three (empty even) virtual functions, but a big obstacle in merging attempt due to a lot of mechanical followup changes in downstream users. The current construction mechanism of analyzer run controls is actually two different mechanisms (locally direct RunControlFactories, and a "generic" createAnalyzerRunControl wrapper for remote cases). The generic createAnalyzerRunControl makes it difficult to migrated them one-by-one, due to the various downstream users. So instead of merging the per-analyzer two uses directly reduce the "indirection" distance by removing the AnalyzerRunControl intermediate layer. After that the createAnalyzerRunControl mechanism can be dissolved by using normal RunControlFactories also for the remote cases. After that, porting to ToolRunner, and combining with ther local equivalent can be done one by one. Change-Id: I0ddace33fcce210cf3a547ac5bb23b3d85013934 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r--src/plugins/android/androidanalyzesupport.cpp28
-rw-r--r--src/plugins/android/androidanalyzesupport.h2
-rw-r--r--src/plugins/baremetal/baremetalruncontrolfactory.cpp12
-rw-r--r--src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h2
-rw-r--r--src/plugins/debugger/analyzer/analyzer.pri2
-rw-r--r--src/plugins/debugger/analyzer/analyzermanager.h10
-rw-r--r--src/plugins/debugger/analyzer/analyzerruncontrol.cpp37
-rw-r--r--src/plugins/debugger/analyzer/analyzerruncontrol.h54
-rw-r--r--src/plugins/debugger/debugger.qbs2
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp3
-rw-r--r--src/plugins/ios/iosanalyzesupport.cpp10
-rw-r--r--src/plugins/ios/iosanalyzesupport.h6
-rw-r--r--src/plugins/ios/iosrunfactories.cpp3
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h5
-rw-r--r--src/plugins/qmlprofiler/localqmlprofilerrunner.cpp12
-rw-r--r--src/plugins/qmlprofiler/localqmlprofilerrunner.h6
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerruncontrol.h4
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp1
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp3
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.h3
-rw-r--r--src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp1
-rw-r--r--src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h2
-rw-r--r--src/plugins/qnx/qnxanalyzesupport.cpp6
-rw-r--r--src/plugins/qnx/qnxanalyzesupport.h3
-rw-r--r--src/plugins/qnx/qnxruncontrolfactory.cpp3
-rw-r--r--src/plugins/remotelinux/remotelinuxanalyzesupport.cpp11
-rw-r--r--src/plugins/remotelinux/remotelinuxanalyzesupport.h2
-rw-r--r--src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp1
-rw-r--r--src/plugins/valgrind/callgrindtool.cpp2
-rw-r--r--src/plugins/valgrind/memchecktool.cpp6
-rw-r--r--src/plugins/valgrind/valgrindengine.cpp2
-rw-r--r--src/plugins/valgrind/valgrindengine.h4
33 files changed, 55 insertions, 195 deletions
diff --git a/src/plugins/android/androidanalyzesupport.cpp b/src/plugins/android/androidanalyzesupport.cpp
index ea3a187437..bf5579c867 100644
--- a/src/plugins/android/androidanalyzesupport.cpp
+++ b/src/plugins/android/androidanalyzesupport.cpp
@@ -29,11 +29,12 @@
#include "androidmanager.h"
#include <debugger/analyzer/analyzermanager.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <debugger/analyzer/analyzerstartparameters.h>
-#include <projectexplorer/target.h>
#include <projectexplorer/project.h>
+#include <projectexplorer/runconfiguration.h>
+#include <projectexplorer/target.h>
+
#include <qtsupport/qtkitinformation.h>
#include <QDir>
@@ -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<AnalyzerRunControl *>(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 338376dd6d..887796153d 100644
--- a/src/plugins/android/androidanalyzesupport.h
+++ b/src/plugins/android/androidanalyzesupport.h
@@ -31,8 +31,6 @@
#include <qmldebug/qmloutputparser.h>
-namespace Debugger { class AnalyzerRunControl; }
-
namespace Android {
namespace Internal {
diff --git a/src/plugins/baremetal/baremetalruncontrolfactory.cpp b/src/plugins/baremetal/baremetalruncontrolfactory.cpp
index 5f04770f52..647978881a 100644
--- a/src/plugins/baremetal/baremetalruncontrolfactory.cpp
+++ b/src/plugins/baremetal/baremetalruncontrolfactory.cpp
@@ -36,15 +36,17 @@
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerkitinformation.h>
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/toolchain.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/buildconfiguration.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/analyzer/analyzermanager.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
+
+#include <projectexplorer/buildconfiguration.h>
+#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/project.h>
+#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/target.h>
+#include <projectexplorer/toolchain.h>
+
#include <utils/portlist.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h
index 7faf3c311a..fca11e6c48 100644
--- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h
+++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.h
@@ -25,7 +25,7 @@
#pragma once
-#include <debugger/analyzer/analyzerruncontrol.h>
+#include <projectexplorer/runconfiguration.h>
#include <cpptools/projectinfo.h>
#include <utils/environment.h>
diff --git a/src/plugins/debugger/analyzer/analyzer.pri b/src/plugins/debugger/analyzer/analyzer.pri
index dc2d12eff6..7fa5582dc7 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 1fd6fa72db..947a0e6d01 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<AnalyzerRunControl *(ProjectExplorer::RunConfiguration *runConfiguration,
- Core::Id runMode)> RunControlCreator;
+ typedef std::function<ProjectExplorer::RunControl *(ProjectExplorer::RunConfiguration *runConfiguration,
+ Core::Id runMode)> 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 6d5b83e51e..0000000000
--- 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 f2f6eaf363..0000000000
--- 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 <debugger/debugger_global.h>
-
-#include <projectexplorer/runconfiguration.h>
-
-#include <utils/port.h>
-
-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 eb080f93cb..6e6b4d441d 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 4223065c14..aeee0a03bd 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 <coreplugin/actionmanager/actioncontainer.h>
@@ -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 eb009e3e7b..5bdb9a2da7 100644
--- a/src/plugins/ios/iosanalyzesupport.cpp
+++ b/src/plugins/ios/iosanalyzesupport.cpp
@@ -26,9 +26,6 @@
#include "iosanalyzesupport.h"
#include "iosrunner.h"
-#include <debugger/analyzer/analyzerruncontrol.h>
-
-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<AnalyzerRunControl *>(ToolRunner::runControl());
-}
-
} // namespace Internal
} // namespace Ios
diff --git a/src/plugins/ios/iosanalyzesupport.h b/src/plugins/ios/iosanalyzesupport.h
index 8beec30571..6c3677d1a7 100644
--- a/src/plugins/ios/iosanalyzesupport.h
+++ b/src/plugins/ios/iosanalyzesupport.h
@@ -29,14 +29,9 @@
#include <projectexplorer/runconfiguration.h>
-#include <utils/port.h>
-
-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 ba4943ae0a..b331fdb9f4 100644
--- a/src/plugins/ios/iosrunfactories.cpp
+++ b/src/plugins/ios/iosrunfactories.cpp
@@ -33,7 +33,6 @@
#include "iosanalyzesupport.h"
#include <debugger/analyzer/analyzermanager.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/debuggerconstants.h>
@@ -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 4628db219a..3a13351a49 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 <utils/port.h>
#include <utils/processhandle.h>
#include <utils/qtcassert.h>
#include <utils/icon.h>
@@ -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 4f71863566..ec686bfaf5 100644
--- a/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
+++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.cpp
@@ -31,8 +31,8 @@
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
+
#include <qmldebug/qmldebugcommandlinearguments.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <utils/temporaryfile.h>
@@ -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 bcbd996af8..62e8c26d61 100644
--- a/src/plugins/qmlprofiler/localqmlprofilerrunner.h
+++ b/src/plugins/qmlprofiler/localqmlprofilerrunner.h
@@ -32,10 +32,6 @@
#include <projectexplorer/runnables.h>
#include <qmldebug/qmloutputparser.h>
-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 b87093b8e1..1ecfa45335 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 464b7f1047..f142994feb 100644
--- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h
+++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h
@@ -27,14 +27,14 @@
#include "qmlprofilerstatemanager.h"
-#include <debugger/analyzer/analyzerruncontrol.h>
+#include <projectexplorer/runconfiguration.h>
#include <utils/outputformat.h>
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 5803d23957..e489c3b5aa 100644
--- a/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerruncontrolfactory.cpp
@@ -29,7 +29,6 @@
#include "qmlprofilerrunconfigurationaspect.h"
#include <debugger/analyzer/analyzermanager.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/debuggerrunconfigurationaspect.h>
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 79d53d1591..971f04259c 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -40,7 +40,6 @@
#include <debugger/debuggericons.h>
#include <debugger/analyzer/analyzermanager.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <utils/fancymainwindow.h>
@@ -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 12e7784ad5..e0d7cbabfd 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.h
+++ b/src/plugins/qmlprofiler/qmlprofilertool.h
@@ -30,7 +30,6 @@
#include "qmlprofilereventtypes.h"
#include <debugger/analyzer/analyzermanager.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
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 2656c4bb9d..4859e29237 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 <debugger/analyzer/analyzermanager.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <QtTest>
#include <QTcpServer>
diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.h
index 8f89378147..de538e70a8 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 0ff9df37b4..59ee41810d 100644
--- a/src/plugins/qnx/qnxanalyzesupport.cpp
+++ b/src/plugins/qnx/qnxanalyzesupport.cpp
@@ -29,7 +29,6 @@
#include "qnxrunconfiguration.h"
#include "slog2inforunner.h"
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
@@ -111,11 +110,6 @@ void QnxAnalyzeSupport::startExecution()
appRunner()->start(r, device());
}
-Debugger::AnalyzerRunControl *QnxAnalyzeSupport::runControl()
-{
- return qobject_cast<Debugger::AnalyzerRunControl *>(QnxAbstractRunSupport::runControl());
-}
-
void QnxAnalyzeSupport::handleRemoteProcessFinished(bool success)
{
if (!success)
diff --git a/src/plugins/qnx/qnxanalyzesupport.h b/src/plugins/qnx/qnxanalyzesupport.h
index 1667727ce7..bd665c8436 100644
--- a/src/plugins/qnx/qnxanalyzesupport.h
+++ b/src/plugins/qnx/qnxanalyzesupport.h
@@ -31,8 +31,6 @@
#include <utils/outputformat.h>
#include <qmldebug/qmloutputparser.h>
-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 c5c53dec60..86fa9ced2a 100644
--- a/src/plugins/qnx/qnxruncontrolfactory.cpp
+++ b/src/plugins/qnx/qnxruncontrolfactory.cpp
@@ -39,7 +39,6 @@
#include <debugger/debuggerkitinformation.h>
#include <debugger/analyzer/analyzermanager.h>
#include <debugger/analyzer/analyzerstartparameters.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
@@ -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 93328fe8d9..cda8462065 100644
--- a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp
@@ -27,8 +27,6 @@
#include "remotelinuxrunconfiguration.h"
-#include <debugger/analyzer/analyzerruncontrol.h>
-
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
@@ -44,7 +42,6 @@
#include <QPointer>
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<AnalyzerRunControl *>(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<AnalyzerRunControl *>(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 21160b316e..f2b35b02f7 100644
--- a/src/plugins/remotelinux/remotelinuxanalyzesupport.h
+++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.h
@@ -32,8 +32,6 @@
#include <utils/outputformat.h>
-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 f18284a5a5..8ca1e6657d 100644
--- a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
+++ b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
@@ -31,7 +31,6 @@
#include "remotelinuxrunconfiguration.h"
#include <debugger/analyzer/analyzermanager.h>
-#include <debugger/analyzer/analyzerruncontrol.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/debuggerruncontrol.h>
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp
index 5558b01ccf..67dfd9b66b 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 5c2b1d184d..9c3c06544c 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 b2224f0a16..8c56bd782c 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 5b71e94a1a..76f9e57311 100644
--- a/src/plugins/valgrind/valgrindengine.h
+++ b/src/plugins/valgrind/valgrindengine.h
@@ -26,7 +26,7 @@
#pragma once
-#include <debugger/analyzer/analyzerruncontrol.h>
+#include <projectexplorer/runconfiguration.h>
#include <utils/environment.h>
#include <valgrind/valgrindrunner.h>
#include <valgrind/valgrindsettings.h>
@@ -37,7 +37,7 @@
namespace Valgrind {
namespace Internal {
-class ValgrindRunControl : public Debugger::AnalyzerRunControl
+class ValgrindRunControl : public ProjectExplorer::RunControl
{
Q_OBJECT