From a85db647c2ea895bcaffd30447be66bd1197d5bc Mon Sep 17 00:00:00 2001 From: Aurindam Jana <aurindam.jana@digia.com> Date: Tue, 7 May 2013 14:35:02 +0200 Subject: [PATCH] RemoteLinux: Rename IRemoteLinuxRunSupport to AbstractRemoteLinuxRunSupport Change-Id: Idee11afe23fd6fa271a0776a460d227ced9b7916 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com> --- ....cpp => abstractremotelinuxrunsupport.cpp} | 58 +++++++++---------- ...port.h => abstractremotelinuxrunsupport.h} | 18 +++--- src/plugins/remotelinux/remotelinux.pro | 8 +-- .../remotelinux/remotelinuxanalyzesupport.cpp | 8 +-- .../remotelinux/remotelinuxanalyzesupport.h | 4 +- .../remotelinux/remotelinuxdebugsupport.cpp | 8 +-- .../remotelinux/remotelinuxdebugsupport.h | 4 +- 7 files changed, 54 insertions(+), 54 deletions(-) rename src/plugins/remotelinux/{iremotelinuxrunsupport.cpp => abstractremotelinuxrunsupport.cpp} (65%) rename src/plugins/remotelinux/{iremotelinuxrunsupport.h => abstractremotelinuxrunsupport.h} (86%) diff --git a/src/plugins/remotelinux/iremotelinuxrunsupport.cpp b/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp similarity index 65% rename from src/plugins/remotelinux/iremotelinuxrunsupport.cpp rename to src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp index ed18d0dc78..0ae6c72439 100644 --- a/src/plugins/remotelinux/iremotelinuxrunsupport.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxrunsupport.cpp @@ -27,7 +27,7 @@ ** ****************************************************************************/ -#include "iremotelinuxrunsupport.h" +#include "abstractremotelinuxrunsupport.h" #include "remotelinuxrunconfiguration.h" #include <projectexplorer/target.h> @@ -42,11 +42,11 @@ using namespace ProjectExplorer; namespace RemoteLinux { namespace Internal { -class IRemoteLinuxRunSupportPrivate +class AbstractRemoteLinuxRunSupportPrivate { public: - IRemoteLinuxRunSupportPrivate(const RemoteLinuxRunConfiguration *runConfig) - : state(IRemoteLinuxRunSupport::Inactive), + AbstractRemoteLinuxRunSupportPrivate(const RemoteLinuxRunConfiguration *runConfig) + : state(AbstractRemoteLinuxRunSupport::Inactive), device(DeviceKitInformation::device(runConfig->target()->kit())), remoteFilePath(runConfig->remoteExecutableFilePath()), arguments(runConfig->arguments()), @@ -54,7 +54,7 @@ public: { } - IRemoteLinuxRunSupport::State state; + AbstractRemoteLinuxRunSupport::State state; DeviceApplicationRunner appRunner; DeviceUsedPortsGatherer portsGatherer; const ProjectExplorer::IDevice::ConstPtr device; @@ -68,39 +68,39 @@ public: using namespace Internal; -IRemoteLinuxRunSupport::IRemoteLinuxRunSupport(RemoteLinuxRunConfiguration *runConfig, QObject *parent) +AbstractRemoteLinuxRunSupport::AbstractRemoteLinuxRunSupport(RemoteLinuxRunConfiguration *runConfig, QObject *parent) : QObject(parent), - d(new IRemoteLinuxRunSupportPrivate(runConfig)) + d(new AbstractRemoteLinuxRunSupportPrivate(runConfig)) { } -IRemoteLinuxRunSupport::~IRemoteLinuxRunSupport() +AbstractRemoteLinuxRunSupport::~AbstractRemoteLinuxRunSupport() { setFinished(); delete d; } -void IRemoteLinuxRunSupport::setApplicationRunnerPreRunAction(DeviceApplicationHelperAction *action) +void AbstractRemoteLinuxRunSupport::setApplicationRunnerPreRunAction(DeviceApplicationHelperAction *action) { d->appRunner.setPreRunAction(action); } -void IRemoteLinuxRunSupport::setApplicationRunnerPostRunAction(DeviceApplicationHelperAction *action) +void AbstractRemoteLinuxRunSupport::setApplicationRunnerPostRunAction(DeviceApplicationHelperAction *action) { d->appRunner.setPostRunAction(action); } -void IRemoteLinuxRunSupport::setState(IRemoteLinuxRunSupport::State state) +void AbstractRemoteLinuxRunSupport::setState(AbstractRemoteLinuxRunSupport::State state) { d->state = state; } -IRemoteLinuxRunSupport::State IRemoteLinuxRunSupport::state() const +AbstractRemoteLinuxRunSupport::State AbstractRemoteLinuxRunSupport::state() const { return d->state; } -void IRemoteLinuxRunSupport::handleRemoteSetupRequested() +void AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested() { QTC_ASSERT(d->state == Inactive, return); d->state = GatheringPorts; @@ -109,13 +109,13 @@ void IRemoteLinuxRunSupport::handleRemoteSetupRequested() d->portsGatherer.start(d->device); } -void IRemoteLinuxRunSupport::handlePortsGathererError(const QString &message) +void AbstractRemoteLinuxRunSupport::handlePortsGathererError(const QString &message) { QTC_ASSERT(d->state == GatheringPorts, return); handleAdapterSetupFailed(message); } -void IRemoteLinuxRunSupport::handlePortListReady() +void AbstractRemoteLinuxRunSupport::handlePortListReady() { QTC_ASSERT(d->state == GatheringPorts, return); @@ -123,37 +123,37 @@ void IRemoteLinuxRunSupport::handlePortListReady() startExecution(); } -void IRemoteLinuxRunSupport::handleAppRunnerError(const QString &) +void AbstractRemoteLinuxRunSupport::handleAppRunnerError(const QString &) { } -void IRemoteLinuxRunSupport::handleRemoteOutput(const QByteArray &) +void AbstractRemoteLinuxRunSupport::handleRemoteOutput(const QByteArray &) { } -void IRemoteLinuxRunSupport::handleRemoteErrorOutput(const QByteArray &) +void AbstractRemoteLinuxRunSupport::handleRemoteErrorOutput(const QByteArray &) { } -void IRemoteLinuxRunSupport::handleAppRunnerFinished(bool) +void AbstractRemoteLinuxRunSupport::handleAppRunnerFinished(bool) { } -void IRemoteLinuxRunSupport::handleProgressReport(const QString &) +void AbstractRemoteLinuxRunSupport::handleProgressReport(const QString &) { } -void IRemoteLinuxRunSupport::handleAdapterSetupFailed(const QString &) +void AbstractRemoteLinuxRunSupport::handleAdapterSetupFailed(const QString &) { setFinished(); } -void IRemoteLinuxRunSupport::handleAdapterSetupDone() +void AbstractRemoteLinuxRunSupport::handleAdapterSetupDone() { d->state = Running; } -void IRemoteLinuxRunSupport::setFinished() +void AbstractRemoteLinuxRunSupport::setFinished() { if (d->state == Inactive) return; @@ -167,7 +167,7 @@ void IRemoteLinuxRunSupport::setFinished() d->state = Inactive; } -bool IRemoteLinuxRunSupport::setPort(int &port) +bool AbstractRemoteLinuxRunSupport::setPort(int &port) { port = d->portsGatherer.getNextFreePort(&d->portList); if (port == -1) { @@ -177,27 +177,27 @@ bool IRemoteLinuxRunSupport::setPort(int &port) return true; } -QString IRemoteLinuxRunSupport::arguments() const +QString AbstractRemoteLinuxRunSupport::arguments() const { return d->arguments; } -QString IRemoteLinuxRunSupport::commandPrefix() const +QString AbstractRemoteLinuxRunSupport::commandPrefix() const { return d->commandPrefix; } -QString IRemoteLinuxRunSupport::remoteFilePath() const +QString AbstractRemoteLinuxRunSupport::remoteFilePath() const { return d->remoteFilePath; } -const IDevice::ConstPtr IRemoteLinuxRunSupport::device() const +const IDevice::ConstPtr AbstractRemoteLinuxRunSupport::device() const { return d->device; } -DeviceApplicationRunner *IRemoteLinuxRunSupport::appRunner() const +DeviceApplicationRunner *AbstractRemoteLinuxRunSupport::appRunner() const { return &d->appRunner; } diff --git a/src/plugins/remotelinux/iremotelinuxrunsupport.h b/src/plugins/remotelinux/abstractremotelinuxrunsupport.h similarity index 86% rename from src/plugins/remotelinux/iremotelinuxrunsupport.h rename to src/plugins/remotelinux/abstractremotelinuxrunsupport.h index 1d234d71a3..3e8ee6276d 100644 --- a/src/plugins/remotelinux/iremotelinuxrunsupport.h +++ b/src/plugins/remotelinux/abstractremotelinuxrunsupport.h @@ -27,8 +27,8 @@ ** ****************************************************************************/ -#ifndef IREMOTELINUXRUNSUPPORT_H -#define IREMOTELINUXRUNSUPPORT_H +#ifndef ABSTRACTREMOTELINUXRUNSUPPORT_H +#define ABSTRACTREMOTELINUXRUNSUPPORT_H #include "remotelinux_export.h" @@ -45,9 +45,9 @@ namespace RemoteLinux { class RemoteLinuxRunConfiguration; -namespace Internal { class IRemoteLinuxRunSupportPrivate; } +namespace Internal { class AbstractRemoteLinuxRunSupportPrivate; } -class REMOTELINUX_EXPORT IRemoteLinuxRunSupport : public QObject +class REMOTELINUX_EXPORT AbstractRemoteLinuxRunSupport : public QObject { Q_OBJECT protected: @@ -59,9 +59,9 @@ protected: Running }; public: - IRemoteLinuxRunSupport(RemoteLinuxRunConfiguration *runConfig, + AbstractRemoteLinuxRunSupport(RemoteLinuxRunConfiguration *runConfig, QObject *parent = 0); - ~IRemoteLinuxRunSupport(); + ~AbstractRemoteLinuxRunSupport(); void setApplicationRunnerPreRunAction(ProjectExplorer::DeviceApplicationHelperAction *action); void setApplicationRunnerPostRunAction(ProjectExplorer::DeviceApplicationHelperAction *action); @@ -97,10 +97,10 @@ private slots: void handlePortListReady(); private: - friend class Internal::IRemoteLinuxRunSupportPrivate; - Internal::IRemoteLinuxRunSupportPrivate * const d; + friend class Internal::AbstractRemoteLinuxRunSupportPrivate; + Internal::AbstractRemoteLinuxRunSupportPrivate * const d; }; } // namespace RemoteLinux -#endif // IREMOTELINUXRUNSUPPORT_H +#endif // ABSTRACTREMOTELINUXRUNSUPPORT_H diff --git a/src/plugins/remotelinux/remotelinux.pro b/src/plugins/remotelinux/remotelinux.pro index e108242bb4..311cb6d127 100644 --- a/src/plugins/remotelinux/remotelinux.pro +++ b/src/plugins/remotelinux/remotelinux.pro @@ -47,8 +47,8 @@ HEADERS += \ remotelinuxcheckforfreediskspaceservice.h \ remotelinuxcheckforfreediskspacestep.h \ remotelinuxdeploymentdatamodel.h \ - iremotelinuxrunsupport.h \ - remotelinuxanalyzesupport.h + remotelinuxanalyzesupport.h \ + abstractremotelinuxrunsupport.h SOURCES += \ embeddedlinuxqtversion.cpp \ @@ -93,8 +93,8 @@ SOURCES += \ remotelinuxcheckforfreediskspaceservice.cpp \ remotelinuxcheckforfreediskspacestep.cpp \ remotelinuxdeploymentdatamodel.cpp \ - iremotelinuxrunsupport.cpp \ - remotelinuxanalyzesupport.cpp + remotelinuxanalyzesupport.cpp \ + abstractremotelinuxrunsupport.cpp FORMS += \ genericlinuxdeviceconfigurationwizardsetuppage.ui \ diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp index a487e0224e..1e4adc1ba5 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp +++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp @@ -90,7 +90,7 @@ AnalyzerStartParameters RemoteLinuxAnalyzeSupport::startParameters(const RemoteL RemoteLinuxAnalyzeSupport::RemoteLinuxAnalyzeSupport(RemoteLinuxRunConfiguration *runConfig, IAnalyzerEngine *engine, RunMode runMode) - : IRemoteLinuxRunSupport(runConfig, engine), + : AbstractRemoteLinuxRunSupport(runConfig, engine), d(new RemoteLinuxAnalyzeSupportPrivate(engine, runMode)) { connect(d->engine, SIGNAL(starting(const Analyzer::IAnalyzerEngine*)), @@ -114,7 +114,7 @@ void RemoteLinuxAnalyzeSupport::handleRemoteSetupRequested() QTC_ASSERT(state() == Inactive, return); showMessage(tr("Checking available ports...\n"), Utils::NormalMessageFormat); - IRemoteLinuxRunSupport::handleRemoteSetupRequested(); + AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested(); } void RemoteLinuxAnalyzeSupport::startExecution() @@ -186,13 +186,13 @@ void RemoteLinuxAnalyzeSupport::handleProgressReport(const QString &progressOutp void RemoteLinuxAnalyzeSupport::handleAdapterSetupFailed(const QString &error) { - IRemoteLinuxRunSupport::handleAdapterSetupFailed(error); + AbstractRemoteLinuxRunSupport::handleAdapterSetupFailed(error); showMessage(tr("Initial setup failed: %1").arg(error), Utils::NormalMessageFormat); } void RemoteLinuxAnalyzeSupport::handleAdapterSetupDone() { - IRemoteLinuxRunSupport::handleAdapterSetupDone(); + AbstractRemoteLinuxRunSupport::handleAdapterSetupDone(); d->engine->notifyRemoteSetupDone(d->qmlPort); } diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.h b/src/plugins/remotelinux/remotelinuxanalyzesupport.h index bfe8118833..cfbb1a7ff3 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.h +++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.h @@ -30,7 +30,7 @@ #ifndef REMOTELINUXANALYZESUPPORT_H #define REMOTELINUXANALYZESUPPORT_H -#include "iremotelinuxrunsupport.h" +#include "abstractremotelinuxrunsupport.h" #include <projectexplorer/projectexplorerconstants.h> #include <utils/outputformat.h> @@ -45,7 +45,7 @@ class RemoteLinuxRunConfiguration; namespace Internal { class RemoteLinuxAnalyzeSupportPrivate; } -class REMOTELINUX_EXPORT RemoteLinuxAnalyzeSupport : public IRemoteLinuxRunSupport +class REMOTELINUX_EXPORT RemoteLinuxAnalyzeSupport : public AbstractRemoteLinuxRunSupport { Q_OBJECT public: diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index fa7d5f3ef0..1bbc26892a 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -120,7 +120,7 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RemoteLinuxRunConfiguration *runConfig, DebuggerEngine *engine) - : IRemoteLinuxRunSupport(runConfig, engine), + : AbstractRemoteLinuxRunSupport(runConfig, engine), d(new LinuxDeviceDebugSupportPrivate(static_cast<RemoteLinuxRunConfiguration *>(runConfig), engine)) { connect(d->engine, SIGNAL(requestRemoteSetup()), this, SLOT(handleRemoteSetupRequested())); @@ -142,7 +142,7 @@ void LinuxDeviceDebugSupport::handleRemoteSetupRequested() QTC_ASSERT(state() == Inactive, return); showMessage(tr("Checking available ports...\n"), LogStatus); - IRemoteLinuxRunSupport::handleRemoteSetupRequested(); + AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested(); } void LinuxDeviceDebugSupport::startExecution() @@ -239,13 +239,13 @@ void LinuxDeviceDebugSupport::handleProgressReport(const QString &progressOutput void LinuxDeviceDebugSupport::handleAdapterSetupFailed(const QString &error) { - IRemoteLinuxRunSupport::handleAdapterSetupFailed(error); + AbstractRemoteLinuxRunSupport::handleAdapterSetupFailed(error); d->engine->notifyEngineRemoteSetupFailed(tr("Initial setup failed: %1").arg(error)); } void LinuxDeviceDebugSupport::handleAdapterSetupDone() { - IRemoteLinuxRunSupport::handleAdapterSetupDone(); + AbstractRemoteLinuxRunSupport::handleAdapterSetupDone(); d->engine->notifyEngineRemoteSetupDone(d->gdbServerPort, d->qmlPort); } diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.h b/src/plugins/remotelinux/remotelinuxdebugsupport.h index 49047e3427..4be8234932 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.h +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.h @@ -30,7 +30,7 @@ #ifndef REMOTELINUXDEBUGSUPPORT_H #define REMOTELINUXDEBUGSUPPORT_H -#include "iremotelinuxrunsupport.h" +#include "abstractremotelinuxrunsupport.h" namespace Debugger { class DebuggerEngine; @@ -42,7 +42,7 @@ class RemoteLinuxRunConfiguration; namespace Internal { class LinuxDeviceDebugSupportPrivate; } -class REMOTELINUX_EXPORT LinuxDeviceDebugSupport : public IRemoteLinuxRunSupport +class REMOTELINUX_EXPORT LinuxDeviceDebugSupport : public AbstractRemoteLinuxRunSupport { Q_OBJECT public: -- GitLab