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 ed18d0dc789be0936df6243c97560c295b77f223..0ae6c72439c2e00666711a8d42173a9b1369589e 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 1d234d71a372fee9296a811bcb3d57a15cc8351c..3e8ee6276dbd97218012be8954377780298ae521 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 e108242bb4b6b91442ffaf95809c79bd0b791180..311cb6d12760d3f027492fc63d6bc8129af14ae0 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 a487e0224ed6ece743eef20d2060f94bf5b179f8..1e4adc1ba55bdd12a1d18201f1ca4c52727cf5c1 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 bfe8118833facdd3e3e841b37ce4fa4f86e343e9..cfbb1a7ff3ec8fab74c15a8645580623746eaf36 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 fa7d5f3ef0d01ffaa0e3622e3a9b636c68d7d18c..1bbc26892ad755f8a8bfbae54e0c5f14266dc4d4 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 49047e3427b195cb187f4ed63cfb678f3cb48413..4be823493282e7e328e9945fe9b3143260a98544 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: