RemoteLinux: Rename IRemoteLinuxRunSupport to AbstractRemoteLinuxRunSupport

Change-Id: Idee11afe23fd6fa271a0776a460d227ced9b7916
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
Aurindam Jana
2013-05-07 14:35:02 +02:00
parent c8cf56f459
commit a85db647c2
7 changed files with 54 additions and 54 deletions

View File

@@ -27,7 +27,7 @@
** **
****************************************************************************/ ****************************************************************************/
#include "iremotelinuxrunsupport.h" #include "abstractremotelinuxrunsupport.h"
#include "remotelinuxrunconfiguration.h" #include "remotelinuxrunconfiguration.h"
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
@@ -42,11 +42,11 @@ using namespace ProjectExplorer;
namespace RemoteLinux { namespace RemoteLinux {
namespace Internal { namespace Internal {
class IRemoteLinuxRunSupportPrivate class AbstractRemoteLinuxRunSupportPrivate
{ {
public: public:
IRemoteLinuxRunSupportPrivate(const RemoteLinuxRunConfiguration *runConfig) AbstractRemoteLinuxRunSupportPrivate(const RemoteLinuxRunConfiguration *runConfig)
: state(IRemoteLinuxRunSupport::Inactive), : state(AbstractRemoteLinuxRunSupport::Inactive),
device(DeviceKitInformation::device(runConfig->target()->kit())), device(DeviceKitInformation::device(runConfig->target()->kit())),
remoteFilePath(runConfig->remoteExecutableFilePath()), remoteFilePath(runConfig->remoteExecutableFilePath()),
arguments(runConfig->arguments()), arguments(runConfig->arguments()),
@@ -54,7 +54,7 @@ public:
{ {
} }
IRemoteLinuxRunSupport::State state; AbstractRemoteLinuxRunSupport::State state;
DeviceApplicationRunner appRunner; DeviceApplicationRunner appRunner;
DeviceUsedPortsGatherer portsGatherer; DeviceUsedPortsGatherer portsGatherer;
const ProjectExplorer::IDevice::ConstPtr device; const ProjectExplorer::IDevice::ConstPtr device;
@@ -68,39 +68,39 @@ public:
using namespace Internal; using namespace Internal;
IRemoteLinuxRunSupport::IRemoteLinuxRunSupport(RemoteLinuxRunConfiguration *runConfig, QObject *parent) AbstractRemoteLinuxRunSupport::AbstractRemoteLinuxRunSupport(RemoteLinuxRunConfiguration *runConfig, QObject *parent)
: QObject(parent), : QObject(parent),
d(new IRemoteLinuxRunSupportPrivate(runConfig)) d(new AbstractRemoteLinuxRunSupportPrivate(runConfig))
{ {
} }
IRemoteLinuxRunSupport::~IRemoteLinuxRunSupport() AbstractRemoteLinuxRunSupport::~AbstractRemoteLinuxRunSupport()
{ {
setFinished(); setFinished();
delete d; delete d;
} }
void IRemoteLinuxRunSupport::setApplicationRunnerPreRunAction(DeviceApplicationHelperAction *action) void AbstractRemoteLinuxRunSupport::setApplicationRunnerPreRunAction(DeviceApplicationHelperAction *action)
{ {
d->appRunner.setPreRunAction(action); d->appRunner.setPreRunAction(action);
} }
void IRemoteLinuxRunSupport::setApplicationRunnerPostRunAction(DeviceApplicationHelperAction *action) void AbstractRemoteLinuxRunSupport::setApplicationRunnerPostRunAction(DeviceApplicationHelperAction *action)
{ {
d->appRunner.setPostRunAction(action); d->appRunner.setPostRunAction(action);
} }
void IRemoteLinuxRunSupport::setState(IRemoteLinuxRunSupport::State state) void AbstractRemoteLinuxRunSupport::setState(AbstractRemoteLinuxRunSupport::State state)
{ {
d->state = state; d->state = state;
} }
IRemoteLinuxRunSupport::State IRemoteLinuxRunSupport::state() const AbstractRemoteLinuxRunSupport::State AbstractRemoteLinuxRunSupport::state() const
{ {
return d->state; return d->state;
} }
void IRemoteLinuxRunSupport::handleRemoteSetupRequested() void AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested()
{ {
QTC_ASSERT(d->state == Inactive, return); QTC_ASSERT(d->state == Inactive, return);
d->state = GatheringPorts; d->state = GatheringPorts;
@@ -109,13 +109,13 @@ void IRemoteLinuxRunSupport::handleRemoteSetupRequested()
d->portsGatherer.start(d->device); d->portsGatherer.start(d->device);
} }
void IRemoteLinuxRunSupport::handlePortsGathererError(const QString &message) void AbstractRemoteLinuxRunSupport::handlePortsGathererError(const QString &message)
{ {
QTC_ASSERT(d->state == GatheringPorts, return); QTC_ASSERT(d->state == GatheringPorts, return);
handleAdapterSetupFailed(message); handleAdapterSetupFailed(message);
} }
void IRemoteLinuxRunSupport::handlePortListReady() void AbstractRemoteLinuxRunSupport::handlePortListReady()
{ {
QTC_ASSERT(d->state == GatheringPorts, return); QTC_ASSERT(d->state == GatheringPorts, return);
@@ -123,37 +123,37 @@ void IRemoteLinuxRunSupport::handlePortListReady()
startExecution(); 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(); setFinished();
} }
void IRemoteLinuxRunSupport::handleAdapterSetupDone() void AbstractRemoteLinuxRunSupport::handleAdapterSetupDone()
{ {
d->state = Running; d->state = Running;
} }
void IRemoteLinuxRunSupport::setFinished() void AbstractRemoteLinuxRunSupport::setFinished()
{ {
if (d->state == Inactive) if (d->state == Inactive)
return; return;
@@ -167,7 +167,7 @@ void IRemoteLinuxRunSupport::setFinished()
d->state = Inactive; d->state = Inactive;
} }
bool IRemoteLinuxRunSupport::setPort(int &port) bool AbstractRemoteLinuxRunSupport::setPort(int &port)
{ {
port = d->portsGatherer.getNextFreePort(&d->portList); port = d->portsGatherer.getNextFreePort(&d->portList);
if (port == -1) { if (port == -1) {
@@ -177,27 +177,27 @@ bool IRemoteLinuxRunSupport::setPort(int &port)
return true; return true;
} }
QString IRemoteLinuxRunSupport::arguments() const QString AbstractRemoteLinuxRunSupport::arguments() const
{ {
return d->arguments; return d->arguments;
} }
QString IRemoteLinuxRunSupport::commandPrefix() const QString AbstractRemoteLinuxRunSupport::commandPrefix() const
{ {
return d->commandPrefix; return d->commandPrefix;
} }
QString IRemoteLinuxRunSupport::remoteFilePath() const QString AbstractRemoteLinuxRunSupport::remoteFilePath() const
{ {
return d->remoteFilePath; return d->remoteFilePath;
} }
const IDevice::ConstPtr IRemoteLinuxRunSupport::device() const const IDevice::ConstPtr AbstractRemoteLinuxRunSupport::device() const
{ {
return d->device; return d->device;
} }
DeviceApplicationRunner *IRemoteLinuxRunSupport::appRunner() const DeviceApplicationRunner *AbstractRemoteLinuxRunSupport::appRunner() const
{ {
return &d->appRunner; return &d->appRunner;
} }

View File

@@ -27,8 +27,8 @@
** **
****************************************************************************/ ****************************************************************************/
#ifndef IREMOTELINUXRUNSUPPORT_H #ifndef ABSTRACTREMOTELINUXRUNSUPPORT_H
#define IREMOTELINUXRUNSUPPORT_H #define ABSTRACTREMOTELINUXRUNSUPPORT_H
#include "remotelinux_export.h" #include "remotelinux_export.h"
@@ -45,9 +45,9 @@ namespace RemoteLinux {
class RemoteLinuxRunConfiguration; class RemoteLinuxRunConfiguration;
namespace Internal { class IRemoteLinuxRunSupportPrivate; } namespace Internal { class AbstractRemoteLinuxRunSupportPrivate; }
class REMOTELINUX_EXPORT IRemoteLinuxRunSupport : public QObject class REMOTELINUX_EXPORT AbstractRemoteLinuxRunSupport : public QObject
{ {
Q_OBJECT Q_OBJECT
protected: protected:
@@ -59,9 +59,9 @@ protected:
Running Running
}; };
public: public:
IRemoteLinuxRunSupport(RemoteLinuxRunConfiguration *runConfig, AbstractRemoteLinuxRunSupport(RemoteLinuxRunConfiguration *runConfig,
QObject *parent = 0); QObject *parent = 0);
~IRemoteLinuxRunSupport(); ~AbstractRemoteLinuxRunSupport();
void setApplicationRunnerPreRunAction(ProjectExplorer::DeviceApplicationHelperAction *action); void setApplicationRunnerPreRunAction(ProjectExplorer::DeviceApplicationHelperAction *action);
void setApplicationRunnerPostRunAction(ProjectExplorer::DeviceApplicationHelperAction *action); void setApplicationRunnerPostRunAction(ProjectExplorer::DeviceApplicationHelperAction *action);
@@ -97,10 +97,10 @@ private slots:
void handlePortListReady(); void handlePortListReady();
private: private:
friend class Internal::IRemoteLinuxRunSupportPrivate; friend class Internal::AbstractRemoteLinuxRunSupportPrivate;
Internal::IRemoteLinuxRunSupportPrivate * const d; Internal::AbstractRemoteLinuxRunSupportPrivate * const d;
}; };
} // namespace RemoteLinux } // namespace RemoteLinux
#endif // IREMOTELINUXRUNSUPPORT_H #endif // ABSTRACTREMOTELINUXRUNSUPPORT_H

View File

@@ -47,8 +47,8 @@ HEADERS += \
remotelinuxcheckforfreediskspaceservice.h \ remotelinuxcheckforfreediskspaceservice.h \
remotelinuxcheckforfreediskspacestep.h \ remotelinuxcheckforfreediskspacestep.h \
remotelinuxdeploymentdatamodel.h \ remotelinuxdeploymentdatamodel.h \
iremotelinuxrunsupport.h \ remotelinuxanalyzesupport.h \
remotelinuxanalyzesupport.h abstractremotelinuxrunsupport.h
SOURCES += \ SOURCES += \
embeddedlinuxqtversion.cpp \ embeddedlinuxqtversion.cpp \
@@ -93,8 +93,8 @@ SOURCES += \
remotelinuxcheckforfreediskspaceservice.cpp \ remotelinuxcheckforfreediskspaceservice.cpp \
remotelinuxcheckforfreediskspacestep.cpp \ remotelinuxcheckforfreediskspacestep.cpp \
remotelinuxdeploymentdatamodel.cpp \ remotelinuxdeploymentdatamodel.cpp \
iremotelinuxrunsupport.cpp \ remotelinuxanalyzesupport.cpp \
remotelinuxanalyzesupport.cpp abstractremotelinuxrunsupport.cpp
FORMS += \ FORMS += \
genericlinuxdeviceconfigurationwizardsetuppage.ui \ genericlinuxdeviceconfigurationwizardsetuppage.ui \

View File

@@ -90,7 +90,7 @@ AnalyzerStartParameters RemoteLinuxAnalyzeSupport::startParameters(const RemoteL
RemoteLinuxAnalyzeSupport::RemoteLinuxAnalyzeSupport(RemoteLinuxRunConfiguration *runConfig, RemoteLinuxAnalyzeSupport::RemoteLinuxAnalyzeSupport(RemoteLinuxRunConfiguration *runConfig,
IAnalyzerEngine *engine, RunMode runMode) IAnalyzerEngine *engine, RunMode runMode)
: IRemoteLinuxRunSupport(runConfig, engine), : AbstractRemoteLinuxRunSupport(runConfig, engine),
d(new RemoteLinuxAnalyzeSupportPrivate(engine, runMode)) d(new RemoteLinuxAnalyzeSupportPrivate(engine, runMode))
{ {
connect(d->engine, SIGNAL(starting(const Analyzer::IAnalyzerEngine*)), connect(d->engine, SIGNAL(starting(const Analyzer::IAnalyzerEngine*)),
@@ -114,7 +114,7 @@ void RemoteLinuxAnalyzeSupport::handleRemoteSetupRequested()
QTC_ASSERT(state() == Inactive, return); QTC_ASSERT(state() == Inactive, return);
showMessage(tr("Checking available ports...\n"), Utils::NormalMessageFormat); showMessage(tr("Checking available ports...\n"), Utils::NormalMessageFormat);
IRemoteLinuxRunSupport::handleRemoteSetupRequested(); AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested();
} }
void RemoteLinuxAnalyzeSupport::startExecution() void RemoteLinuxAnalyzeSupport::startExecution()
@@ -186,13 +186,13 @@ void RemoteLinuxAnalyzeSupport::handleProgressReport(const QString &progressOutp
void RemoteLinuxAnalyzeSupport::handleAdapterSetupFailed(const QString &error) void RemoteLinuxAnalyzeSupport::handleAdapterSetupFailed(const QString &error)
{ {
IRemoteLinuxRunSupport::handleAdapterSetupFailed(error); AbstractRemoteLinuxRunSupport::handleAdapterSetupFailed(error);
showMessage(tr("Initial setup failed: %1").arg(error), Utils::NormalMessageFormat); showMessage(tr("Initial setup failed: %1").arg(error), Utils::NormalMessageFormat);
} }
void RemoteLinuxAnalyzeSupport::handleAdapterSetupDone() void RemoteLinuxAnalyzeSupport::handleAdapterSetupDone()
{ {
IRemoteLinuxRunSupport::handleAdapterSetupDone(); AbstractRemoteLinuxRunSupport::handleAdapterSetupDone();
d->engine->notifyRemoteSetupDone(d->qmlPort); d->engine->notifyRemoteSetupDone(d->qmlPort);
} }

View File

@@ -30,7 +30,7 @@
#ifndef REMOTELINUXANALYZESUPPORT_H #ifndef REMOTELINUXANALYZESUPPORT_H
#define REMOTELINUXANALYZESUPPORT_H #define REMOTELINUXANALYZESUPPORT_H
#include "iremotelinuxrunsupport.h" #include "abstractremotelinuxrunsupport.h"
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <utils/outputformat.h> #include <utils/outputformat.h>
@@ -45,7 +45,7 @@ class RemoteLinuxRunConfiguration;
namespace Internal { class RemoteLinuxAnalyzeSupportPrivate; } namespace Internal { class RemoteLinuxAnalyzeSupportPrivate; }
class REMOTELINUX_EXPORT RemoteLinuxAnalyzeSupport : public IRemoteLinuxRunSupport class REMOTELINUX_EXPORT RemoteLinuxAnalyzeSupport : public AbstractRemoteLinuxRunSupport
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@@ -120,7 +120,7 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin
LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RemoteLinuxRunConfiguration *runConfig, LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RemoteLinuxRunConfiguration *runConfig,
DebuggerEngine *engine) DebuggerEngine *engine)
: IRemoteLinuxRunSupport(runConfig, engine), : AbstractRemoteLinuxRunSupport(runConfig, engine),
d(new LinuxDeviceDebugSupportPrivate(static_cast<RemoteLinuxRunConfiguration *>(runConfig), engine)) d(new LinuxDeviceDebugSupportPrivate(static_cast<RemoteLinuxRunConfiguration *>(runConfig), engine))
{ {
connect(d->engine, SIGNAL(requestRemoteSetup()), this, SLOT(handleRemoteSetupRequested())); connect(d->engine, SIGNAL(requestRemoteSetup()), this, SLOT(handleRemoteSetupRequested()));
@@ -142,7 +142,7 @@ void LinuxDeviceDebugSupport::handleRemoteSetupRequested()
QTC_ASSERT(state() == Inactive, return); QTC_ASSERT(state() == Inactive, return);
showMessage(tr("Checking available ports...\n"), LogStatus); showMessage(tr("Checking available ports...\n"), LogStatus);
IRemoteLinuxRunSupport::handleRemoteSetupRequested(); AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested();
} }
void LinuxDeviceDebugSupport::startExecution() void LinuxDeviceDebugSupport::startExecution()
@@ -239,13 +239,13 @@ void LinuxDeviceDebugSupport::handleProgressReport(const QString &progressOutput
void LinuxDeviceDebugSupport::handleAdapterSetupFailed(const QString &error) void LinuxDeviceDebugSupport::handleAdapterSetupFailed(const QString &error)
{ {
IRemoteLinuxRunSupport::handleAdapterSetupFailed(error); AbstractRemoteLinuxRunSupport::handleAdapterSetupFailed(error);
d->engine->notifyEngineRemoteSetupFailed(tr("Initial setup failed: %1").arg(error)); d->engine->notifyEngineRemoteSetupFailed(tr("Initial setup failed: %1").arg(error));
} }
void LinuxDeviceDebugSupport::handleAdapterSetupDone() void LinuxDeviceDebugSupport::handleAdapterSetupDone()
{ {
IRemoteLinuxRunSupport::handleAdapterSetupDone(); AbstractRemoteLinuxRunSupport::handleAdapterSetupDone();
d->engine->notifyEngineRemoteSetupDone(d->gdbServerPort, d->qmlPort); d->engine->notifyEngineRemoteSetupDone(d->gdbServerPort, d->qmlPort);
} }

View File

@@ -30,7 +30,7 @@
#ifndef REMOTELINUXDEBUGSUPPORT_H #ifndef REMOTELINUXDEBUGSUPPORT_H
#define REMOTELINUXDEBUGSUPPORT_H #define REMOTELINUXDEBUGSUPPORT_H
#include "iremotelinuxrunsupport.h" #include "abstractremotelinuxrunsupport.h"
namespace Debugger { namespace Debugger {
class DebuggerEngine; class DebuggerEngine;
@@ -42,7 +42,7 @@ class RemoteLinuxRunConfiguration;
namespace Internal { class LinuxDeviceDebugSupportPrivate; } namespace Internal { class LinuxDeviceDebugSupportPrivate; }
class REMOTELINUX_EXPORT LinuxDeviceDebugSupport : public IRemoteLinuxRunSupport class REMOTELINUX_EXPORT LinuxDeviceDebugSupport : public AbstractRemoteLinuxRunSupport
{ {
Q_OBJECT Q_OBJECT
public: public: