forked from qt-creator/qt-creator
RemoteLinux: Rename IRemoteLinuxRunSupport to AbstractRemoteLinuxRunSupport
Change-Id: Idee11afe23fd6fa271a0776a460d227ced9b7916 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -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 \
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user