remotelinux: use base classes when appropriate

Change-Id: I9951c7470239e524f1bebb77f22b8ee59eab5183
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
hjk
2012-06-05 15:36:38 +02:00
committed by hjk
parent d5420d3dc2
commit c12a7a224f
4 changed files with 11 additions and 12 deletions

View File

@@ -60,9 +60,9 @@ enum State { Inactive, StartingRunner, StartingRemoteProcess, Debugging };
class AbstractRemoteLinuxDebugSupportPrivate class AbstractRemoteLinuxDebugSupportPrivate
{ {
public: public:
AbstractRemoteLinuxDebugSupportPrivate(RemoteLinuxRunConfiguration *runConfig, AbstractRemoteLinuxDebugSupportPrivate(RunConfiguration *runConfig,
DebuggerEngine *engine) DebuggerEngine *engine)
: engine(engine), deviceConfig(runConfig->deviceConfig()), : engine(engine),
qmlDebugging(runConfig->debuggerAspect()->useQmlDebugger()), qmlDebugging(runConfig->debuggerAspect()->useQmlDebugger()),
cppDebugging(runConfig->debuggerAspect()->useCppDebugger()), cppDebugging(runConfig->debuggerAspect()->useCppDebugger()),
state(Inactive), state(Inactive),
@@ -71,7 +71,6 @@ public:
} }
const QPointer<Debugger::DebuggerEngine> engine; const QPointer<Debugger::DebuggerEngine> engine;
const LinuxDeviceConfiguration::ConstPtr deviceConfig;
bool qmlDebugging; bool qmlDebugging;
bool cppDebugging; bool cppDebugging;
QByteArray gdbserverOutput; QByteArray gdbserverOutput;
@@ -95,7 +94,7 @@ using namespace Internal;
DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const RemoteLinuxRunConfiguration *runConfig) DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const RemoteLinuxRunConfiguration *runConfig)
{ {
DebuggerStartParameters params; DebuggerStartParameters params;
const LinuxDeviceConfiguration::ConstPtr &devConf = runConfig->deviceConfig(); const IDevice::ConstPtr &devConf = runConfig->deviceConfig();
if (runConfig->debuggerAspect()->useQmlDebugger()) { if (runConfig->debuggerAspect()->useQmlDebugger()) {
params.languages |= QmlLanguage; params.languages |= QmlLanguage;
params.qmlServerAddress = runConfig->deviceConfig()->sshParameters().host; params.qmlServerAddress = runConfig->deviceConfig()->sshParameters().host;
@@ -135,7 +134,7 @@ DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const R
return params; return params;
} }
AbstractRemoteLinuxDebugSupport::AbstractRemoteLinuxDebugSupport(RemoteLinuxRunConfiguration *runConfig, AbstractRemoteLinuxDebugSupport::AbstractRemoteLinuxDebugSupport(RunConfiguration *runConfig,
DebuggerEngine *engine) DebuggerEngine *engine)
: QObject(engine), d(new AbstractRemoteLinuxDebugSupportPrivate(runConfig, engine)) : QObject(engine), d(new AbstractRemoteLinuxDebugSupportPrivate(runConfig, engine))
{ {

View File

@@ -40,7 +40,11 @@ namespace Debugger {
class DebuggerEngine; class DebuggerEngine;
class DebuggerStartParameters; class DebuggerStartParameters;
} }
namespace ProjectExplorer { class RunControl; }
namespace ProjectExplorer {
class RunControl;
class RunConfiguration;
}
namespace RemoteLinux { namespace RemoteLinux {
class RemoteLinuxRunConfiguration; class RemoteLinuxRunConfiguration;
@@ -58,7 +62,8 @@ class REMOTELINUX_EXPORT AbstractRemoteLinuxDebugSupport : public QObject
public: public:
static Debugger::DebuggerStartParameters startParameters(const RemoteLinuxRunConfiguration *runConfig); static Debugger::DebuggerStartParameters startParameters(const RemoteLinuxRunConfiguration *runConfig);
AbstractRemoteLinuxDebugSupport(RemoteLinuxRunConfiguration *runConfig, Debugger::DebuggerEngine *engine); AbstractRemoteLinuxDebugSupport(ProjectExplorer::RunConfiguration *runConfig,
Debugger::DebuggerEngine *engine);
~AbstractRemoteLinuxDebugSupport(); ~AbstractRemoteLinuxDebugSupport();
private slots: private slots:

View File

@@ -141,10 +141,6 @@ void RemoteLinuxRunConfiguration::init()
this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool))); this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
} }
RemoteLinuxRunConfiguration::~RemoteLinuxRunConfiguration()
{
}
Qt4BaseTarget *RemoteLinuxRunConfiguration::qt4Target() const Qt4BaseTarget *RemoteLinuxRunConfiguration::qt4Target() const
{ {
return static_cast<Qt4BaseTarget *>(target()); return static_cast<Qt4BaseTarget *>(target());

View File

@@ -73,7 +73,6 @@ public:
RemoteLinuxRunConfiguration(Qt4ProjectManager::Qt4BaseTarget *parent, const Core::Id id, RemoteLinuxRunConfiguration(Qt4ProjectManager::Qt4BaseTarget *parent, const Core::Id id,
const QString &proFilePath); const QString &proFilePath);
virtual ~RemoteLinuxRunConfiguration();
bool isEnabled() const; bool isEnabled() const;
QString disabledReason() const; QString disabledReason() const;