Commit 112e3222 authored by hjk's avatar hjk

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's avatarUlf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 43fc2ebe
......@@ -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);
});
}
......
......@@ -31,8 +31,6 @@
#include <qmldebug/qmloutputparser.h>
namespace Debugger { class AnalyzerRunControl; }
namespace Android {
namespace Internal {
......
......@@ -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>
......
......@@ -25,7 +25,7 @@
#pragma once
#include <debugger/analyzer/analyzerruncontrol.h>
#include <projectexplorer/runconfiguration.h>
#include <cpptools/projectinfo.h>
#include <utils/environment.h>
......
......@@ -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 \
......
......@@ -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
/****************************************************************************
**
** 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
/****************************************************************************
**
** 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
......@@ -239,8 +239,6 @@ Project {
"analyzermanager.h",
"analyzerrunconfigwidget.cpp",
"analyzerrunconfigwidget.h",
"analyzerruncontrol.cpp",
"analyzerruncontrol.h",
"analyzerstartparameters.h",
"analyzerutils.cpp",
"analyzerutils.h",
......
......@@ -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)
......
......@@ -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
......@@ -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;
......
......@@ -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())
......
......@@ -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);
......
......@@ -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);
......
......@@ -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();
......
......@@ -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);
......
......@@ -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
......
......@@ -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>
......
......@@ -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) {
......
......@@ -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();
......
......@@ -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>
......
......@@ -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;
};
......
......@@ -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)
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -32,8 +32,6 @@
#include <utils/outputformat.h>
namespace Debugger { class AnalyzerRunControl; }
namespace RemoteLinux {
namespace Internal { class RemoteLinuxAnalyzeSupportPrivate; }
......
......@@ -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>
......
......@@ -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);
......
......@@ -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()));
......
......@@ -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);
......
......@@ -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
......