From 397869c9714e0061c18a6a7df0719c2a0427cae4 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 11 Nov 2010 12:08:13 +0100 Subject: [PATCH] Maemo: Don't hold a reference to a run config in a run control. Save all relevant information at run control creation time, so we can re-run even without a project. Task-number: https://projects.maemo.org/bugzilla/show_bug.cgi?id=203698 --- .../qt-maemo/maemodebugsupport.cpp | 54 ++++++++++---------- .../qt4projectmanager/qt-maemo/maemodebugsupport.h | 9 ++-- .../qt-maemo/maemoremotemounter.cpp | 19 +++++--- .../qt-maemo/maemoremotemounter.h | 12 +++-- .../qt-maemo/maemoremotemountsmodel.h | 1 + .../qt4projectmanager/qt-maemo/maemoruncontrol.cpp | 57 +++++++++------------- .../qt4projectmanager/qt-maemo/maemoruncontrol.h | 5 -- .../qt4projectmanager/qt-maemo/maemosshrunner.cpp | 48 ++++++++++-------- .../qt4projectmanager/qt-maemo/maemosshrunner.h | 13 ++++- 9 files changed, 113 insertions(+), 105 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp index 2eb3fc531d..4b2ac4e5b9 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp @@ -83,7 +83,8 @@ RunControl *MaemoDebugSupport::createDebugRunControl(MaemoRunConfiguration *runC params.executable = runConfig->remoteExecutableFilePath(); params.debuggerCommand = MaemoGlobal::remoteCommandPrefix(runConfig->remoteExecutableFilePath()) - + environment(runConfig) + QLatin1String(" /usr/bin/gdb"); + + environment(runConfig->debuggingType(), runConfig->userEnvironmentChanges()) + + QLatin1String(" /usr/bin/gdb"); params.connParams = devConf.server; params.localMountDir = runConfig->localDirToMountForRemoteGdb(); params.remoteMountPoint @@ -116,9 +117,9 @@ RunControl *MaemoDebugSupport::createDebugRunControl(MaemoRunConfiguration *runC MaemoDebugSupport::MaemoDebugSupport(MaemoRunConfiguration *runConfig, DebuggerRunControl *runControl) : QObject(runControl), m_runControl(runControl), m_runConfig(runConfig), - m_deviceConfig(m_runConfig->deviceConfig()), - m_runner(new MaemoSshRunner(this, m_runConfig, true)), - m_debuggingType(m_runConfig->debuggingType()), + m_runner(new MaemoSshRunner(this, runConfig, true)), + m_debuggingType(runConfig->debuggingType()), + m_dumperLib(runConfig->dumperLib()), m_state(Inactive), m_gdbServerPort(-1), m_qmlPort(-1) { connect(m_runControl, SIGNAL(engineRequestSetup()), this, @@ -136,10 +137,6 @@ void MaemoDebugSupport::handleAdapterSetupRequested() { ASSERT_STATE(Inactive); - if (!m_deviceConfig.isValid()) { - handleAdapterSetupFailed(tr("No device configuration set for run configuration.")); - return; - } setState(StartingRunner); m_runControl->showMessage(tr("Preparing remote side ..."), AppStuff); disconnect(m_runner, 0, this, 0); @@ -178,11 +175,11 @@ void MaemoDebugSupport::startExecution() return; } - const QString &dumperLib = m_runConfig->dumperLib(); if (m_debuggingType != MaemoRunConfiguration::DebugQmlOnly - && !dumperLib.isEmpty() - && m_runConfig->deployStep()->currentlyNeedsDeployment(m_deviceConfig.server.host, - MaemoDeployable(dumperLib, uploadDir(m_deviceConfig)))) { + && !m_dumperLib.isEmpty() + && m_runConfig + && m_runConfig->deployStep()->currentlyNeedsDeployment(m_runner->deviceConfig().server.host, + MaemoDeployable(m_dumperLib, uploadDir(m_runner->deviceConfig())))) { setState(InitializingUploader); m_uploader = m_runner->connection()->createSftpChannel(); connect(m_uploader.data(), SIGNAL(initialized()), this, @@ -205,18 +202,18 @@ void MaemoDebugSupport::handleSftpChannelInitialized() ASSERT_STATE(InitializingUploader); - const QString dumperLib = m_runConfig->dumperLib(); - const QString fileName = QFileInfo(dumperLib).fileName(); - const QString remoteFilePath = uploadDir(m_deviceConfig) + '/' + fileName; - m_uploadJob = m_uploader->uploadFile(dumperLib, remoteFilePath, + const QString fileName = QFileInfo(m_dumperLib).fileName(); + const QString remoteFilePath + = uploadDir(m_runner->deviceConfig()) + '/' + fileName; + m_uploadJob = m_uploader->uploadFile(m_dumperLib, remoteFilePath, SftpOverwriteExisting); if (m_uploadJob == SftpInvalidJob) { handleAdapterSetupFailed(tr("Upload failed: Could not open file '%1'") - .arg(dumperLib)); + .arg(m_dumperLib)); } else { setState(UploadingDumpers); m_runControl->showMessage(tr("Started uploading debugging helpers ('%1').") - .arg(dumperLib), AppStuff); + .arg(m_dumperLib), AppStuff); } } @@ -246,8 +243,10 @@ void MaemoDebugSupport::handleSftpJobFinished(Core::SftpJobId job, .arg(error)); } else { setState(DumpersUploaded); - m_runConfig->deployStep()->setDeployed(m_deviceConfig.server.host, - MaemoDeployable(m_runConfig->dumperLib(), uploadDir(m_deviceConfig))); + if (m_runConfig) { + m_runConfig->deployStep()->setDeployed(m_runner->deviceConfig().server.host, + MaemoDeployable(m_dumperLib, uploadDir(m_runner->deviceConfig()))); + } m_runControl->showMessage(tr("Finished uploading debugging helpers."), AppStuff); startDebugging(); } @@ -267,10 +266,11 @@ void MaemoDebugSupport::startDebugging() SLOT(handleRemoteErrorOutput(QByteArray))); connect(m_runner, SIGNAL(remoteOutput(QByteArray)), this, SLOT(handleRemoteOutput(QByteArray))); - const QString &remoteExe = m_runConfig->remoteExecutableFilePath(); + const QString &remoteExe = m_runner->remoteExecutable(); const QString cmdPrefix = MaemoGlobal::remoteCommandPrefix(remoteExe); - const QString env = environment(m_runConfig); - const QString args = m_runConfig->arguments().join(QLatin1String(" ")); + const QString env + = environment(m_debuggingType, m_runner->userEnvChanges()); + const QString args = m_runner->arguments().join(QLatin1String(" ")); const QString remoteCommandLine = m_debuggingType == MaemoRunConfiguration::DebugQmlOnly ? QString::fromLocal8Bit("%1 %2 %3 %4").arg(cmdPrefix).arg(env) @@ -344,15 +344,15 @@ void MaemoDebugSupport::setState(State newState) } } -QString MaemoDebugSupport::environment(const MaemoRunConfiguration *rc) +QString MaemoDebugSupport::environment(MaemoRunConfiguration::DebuggingType debuggingType, + const QList &userEnvChanges) { - QList env = rc->userEnvironmentChanges(); // FIXME: this must use command line argument instead: -qmljsdebugger=port:1234. - if (rc->debuggingType() != MaemoRunConfiguration::DebugCppOnly) { + if (debuggingType != MaemoRunConfiguration::DebugCppOnly) { // env << Utils::EnvironmentItem(QLatin1String(Debugger::Constants::E_QML_DEBUG_SERVER_PORT), // QString::number(qmlServerPort(rc))); } - return MaemoGlobal::remoteEnvironment(env); + return MaemoGlobal::remoteEnvironment(userEnvChanges); } QString MaemoDebugSupport::uploadDir(const MaemoDeviceConfig &devConf) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h b/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h index 40c0f80c23..bc202a4c6e 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.h @@ -35,10 +35,10 @@ #ifndef MAEMODEBUGSUPPORT_H #define MAEMODEBUGSUPPORT_H -#include "maemodeviceconfigurations.h" #include "maemorunconfiguration.h" #include +#include #include #include @@ -88,7 +88,8 @@ private: DumpersUploaded, StartingRemoteProcess, Debugging }; - static QString environment(const MaemoRunConfiguration *rc); + static QString environment(MaemoRunConfiguration::DebuggingType debuggingType, + const QList &userEnvChanges); void handleAdapterSetupFailed(const QString &error); void handleAdapterSetupDone(); @@ -98,10 +99,10 @@ private: bool setPort(int &port); const QPointer m_runControl; - MaemoRunConfiguration * const m_runConfig; - const MaemoDeviceConfig m_deviceConfig; + const QPointer m_runConfig; MaemoSshRunner * const m_runner; const MaemoRunConfiguration::DebuggingType m_debuggingType; + const QString m_dumperLib; QSharedPointer m_uploader; Core::SftpJobId m_uploadJob; diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp index f9057366dc..1fa200a274 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp @@ -48,7 +48,7 @@ namespace Qt4ProjectManager { namespace Internal { MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent) - : QObject(parent), m_toolChain(0), m_utfsServerTimer(new QTimer(this)), + : QObject(parent), m_utfsServerTimer(new QTimer(this)), m_uploadJobId(SftpInvalidJob), m_state(Inactive) { connect(m_utfsServerTimer, SIGNAL(timeout()), this, @@ -60,20 +60,25 @@ MaemoRemoteMounter::~MaemoRemoteMounter() killAllUtfsServers(); } -void MaemoRemoteMounter::setConnection(const Core::SshConnection::Ptr &connection) +void MaemoRemoteMounter::setConnection(const SshConnection::Ptr &connection) { ASSERT_STATE(Inactive); - m_connection = connection; } +void MaemoRemoteMounter::setToolchain(const MaemoToolChain *toolChain) +{ + ASSERT_STATE(Inactive); + m_remoteMountsAllowed = toolChain->allowsRemoteMounts(); + m_maddeRoot = toolChain->maddeRoot(); +} + void MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mountSpec, bool mountAsRoot) { - Q_ASSERT(m_toolChain); ASSERT_STATE(Inactive); - if (m_toolChain->allowsRemoteMounts() && mountSpec.isValid()) + if (m_remoteMountsAllowed && mountSpec.isValid()) m_mountSpecs << MountInfo(mountSpec, mountAsRoot); } @@ -204,7 +209,7 @@ void MaemoRemoteMounter::handleUploaderInitialized() SIGNAL(finished(Core::SftpJobId, QString)), this, SLOT(handleUploadFinished(Core::SftpJobId, QString))); const QString localFile - = m_toolChain->maddeRoot() + QLatin1String("/madlib/armel/utfs-client"); + = m_maddeRoot + QLatin1String("/madlib/armel/utfs-client"); m_uploadJobId = m_utfsClientUploader->uploadFile(localFile, utfsClientOnDevice(), SftpOverwriteExisting); if (m_uploadJobId == SftpInvalidJob) { @@ -405,7 +410,7 @@ QString MaemoRemoteMounter::utfsClientOnDevice() const QString MaemoRemoteMounter::utfsServer() const { - return m_toolChain->maddeRoot() + QLatin1String("/madlib/utfs-server"); + return m_maddeRoot + QLatin1String("/madlib/utfs-server"); } void MaemoRemoteMounter::killAllUtfsServers() diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h index 75e60bcd3c..48d9abcc55 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h @@ -60,7 +60,11 @@ class MaemoRemoteMounter : public QObject public: MaemoRemoteMounter(QObject *parent); ~MaemoRemoteMounter(); - void setToolchain(const MaemoToolChain *toolchain) { m_toolChain = toolchain; } + + // Must already be connected. + void setConnection(const QSharedPointer &connection); + + void setToolchain(const MaemoToolChain *toolChain); void addMountSpecification(const MaemoMountSpecification &mountSpec, bool mountAsRoot); bool hasValidMountSpecifications() const; @@ -70,9 +74,6 @@ public: void unmount(); void stop(); - // Must be connected already. - void setConnection(const QSharedPointer &connection); - signals: void mounted(); void unmounted(); @@ -111,7 +112,6 @@ private: QString utfsClientOnDevice() const; QString utfsServer() const; - const MaemoToolChain *m_toolChain; QTimer * const m_utfsServerTimer; struct MountInfo { @@ -136,6 +136,8 @@ private: QByteArray m_umountStderr; MaemoPortList *m_freePorts; const MaemoUsedPortsGatherer *m_portsGatherer; + bool m_remoteMountsAllowed; + QString m_maddeRoot; State m_state; }; diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemountsmodel.h b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemountsmodel.h index c16f72cc03..27489e024c 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemountsmodel.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemountsmodel.h @@ -49,6 +49,7 @@ public: int validMountSpecificationCount() const; MaemoMountSpecification mountSpecificationAt(int pos) const { return m_mountSpecs.at(pos); } bool hasValidMountSpecifications() const; + const QList &mountSpecs() const { return m_mountSpecs; } void addMountSpecification(const QString &localDir); void removeMountSpecificationAt(int pos); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp index 9a3cb5851c..aabc0c2c24 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp @@ -53,9 +53,7 @@ using ProjectExplorer::RunConfiguration; MaemoRunControl::MaemoRunControl(RunConfiguration *rc) : RunControl(rc, ProjectExplorer::Constants::RUNMODE) - , m_runConfig(qobject_cast(rc)) - , m_devConfig(m_runConfig ? m_runConfig->deviceConfig() : MaemoDeviceConfig()) - , m_runner(new MaemoSshRunner(this, m_runConfig, false)) + , m_runner(new MaemoSshRunner(this, qobject_cast(rc), false)) , m_running(false) { } @@ -67,32 +65,24 @@ MaemoRunControl::~MaemoRunControl() void MaemoRunControl::start() { - if (!m_devConfig.isValid()) { - handleError(tr("No device configuration set for run configuration.")); - } else if (!m_runConfig) { - handleError(tr("Run configuration no longer available.")); - } else { - m_running = true; - emit started(); - disconnect(m_runner, 0, this, 0); - connect(m_runner, SIGNAL(error(QString)), this, - SLOT(handleSshError(QString))); - connect(m_runner, SIGNAL(readyForExecution()), this, - SLOT(startExecution())); - connect(m_runner, SIGNAL(remoteErrorOutput(QByteArray)), this, - SLOT(handleRemoteErrorOutput(QByteArray))); - connect(m_runner, SIGNAL(remoteOutput(QByteArray)), this, - SLOT(handleRemoteOutput(QByteArray))); - connect(m_runner, SIGNAL(remoteProcessStarted()), this, - SLOT(handleRemoteProcessStarted())); - connect(m_runner, SIGNAL(remoteProcessFinished(qint64)), this, - SLOT(handleRemoteProcessFinished(qint64))); - connect(m_runner, SIGNAL(reportProgress(QString)), this, - SLOT(handleProgressReport(QString))); - connect(m_runner, SIGNAL(mountDebugOutput(QString)), this, - SLOT(handleMountDebugOutput(QString))); - m_runner->start(); - } + m_running = true; + emit started(); + disconnect(m_runner, 0, this, 0); + connect(m_runner, SIGNAL(error(QString)), SLOT(handleSshError(QString))); + connect(m_runner, SIGNAL(readyForExecution()), SLOT(startExecution())); + connect(m_runner, SIGNAL(remoteErrorOutput(QByteArray)), + SLOT(handleRemoteErrorOutput(QByteArray))); + connect(m_runner, SIGNAL(remoteOutput(QByteArray)), + SLOT(handleRemoteOutput(QByteArray))); + connect(m_runner, SIGNAL(remoteProcessStarted()), + SLOT(handleRemoteProcessStarted())); + connect(m_runner, SIGNAL(remoteProcessFinished(qint64)), + SLOT(handleRemoteProcessFinished(qint64))); + connect(m_runner, SIGNAL(reportProgress(QString)), + SLOT(handleProgressReport(QString))); + connect(m_runner, SIGNAL(mountDebugOutput(QString)), + SLOT(handleMountDebugOutput(QString))); + m_runner->start(); } ProjectExplorer::RunControl::StopResult MaemoRunControl::stop() @@ -110,12 +100,11 @@ void MaemoRunControl::handleSshError(const QString &error) void MaemoRunControl::startExecution() { emit appendMessage(this, tr("Starting remote process ..."), false); - const QString &remoteExe = m_runConfig->remoteExecutableFilePath(); m_runner->startExecution(QString::fromLocal8Bit("%1 %2 %3 %4") - .arg(MaemoGlobal::remoteCommandPrefix(remoteExe)) - .arg(MaemoGlobal::remoteEnvironment(m_runConfig->userEnvironmentChanges())) - .arg(remoteExe) - .arg(m_runConfig->arguments().join(QLatin1String(" "))).toUtf8()); + .arg(MaemoGlobal::remoteCommandPrefix(m_runner->remoteExecutable())) + .arg(MaemoGlobal::remoteEnvironment(m_runner->userEnvChanges())) + .arg(m_runner->remoteExecutable()) + .arg(m_runner->arguments().join(QLatin1String(" "))).toUtf8()); } void MaemoRunControl::handleRemoteProcessFinished(qint64 exitCode) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h b/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h index 111fc99465..6eca721c82 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h @@ -35,11 +35,8 @@ #ifndef MAEMORUNCONTROL_H #define MAEMORUNCONTROL_H -#include "maemodeviceconfigurations.h" - #include -#include #include namespace Qt4ProjectManager { @@ -72,8 +69,6 @@ private: void setFinished(); void handleError(const QString &errString); - QPointer m_runConfig; - const MaemoDeviceConfig m_devConfig; MaemoSshRunner * const m_runner; bool m_running; }; diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp index 05405b1b25..35b5658cac 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp @@ -58,14 +58,25 @@ namespace Internal { MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig, bool debugging) - : QObject(parent), m_runConfig(runConfig), + : QObject(parent), m_mounter(new MaemoRemoteMounter(this)), m_portsGatherer(new MaemoUsedPortsGatherer(this)), m_devConfig(runConfig->deviceConfig()), - m_freePorts(runConfig->freePorts()), - m_debugging(debugging), m_state(Inactive) + m_remoteExecutable(runConfig->remoteExecutableFilePath()), + m_appArguments(runConfig->arguments()), + m_userEnvChanges(runConfig->userEnvironmentChanges()), + m_initialFreePorts(runConfig->freePorts()), + m_mountSpecs(runConfig->remoteMounts()->mountSpecs()), + m_state(Inactive) { - m_procsToKill << QFileInfo(m_runConfig->localExecutableFilePath()).fileName(); + m_connection = runConfig->deployStep()->sshConnection(); + m_mounter->setToolchain(runConfig->toolchain()); + if (debugging && runConfig->useRemoteGdb()) { + m_mountSpecs << MaemoMountSpecification(runConfig->localDirToMountForRemoteGdb(), + runConfig->remoteProjectSourcesMountPoint()); + } + + m_procsToKill << QFileInfo(m_remoteExecutable).fileName(); connect(m_mounter, SIGNAL(mounted()), this, SLOT(handleMounted())); connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted())); connect(m_mounter, SIGNAL(error(QString)), this, @@ -86,11 +97,20 @@ void MaemoSshRunner::start() { ASSERT_STATE(QList() << Inactive << StopRequested); + if (m_remoteExecutable.isEmpty()) { + emitError(tr("Cannot run: No remote executable set.")); + return; + } + if (!m_devConfig.isValid()) { + emitError(tr("Cannot run: No device configuration set.")); + return; + } + setState(Connecting); m_exitStatus = -1; + m_freePorts = m_initialFreePorts; if (m_connection) disconnect(m_connection.data(), 0, this, 0); - m_connection = m_runConfig->deployStep()->sshConnection(); const bool reUse = isConnectionUsable(); if (!reUse) m_connection = SshConnection::create(); @@ -193,17 +213,8 @@ void MaemoSshRunner::handleUnmounted() switch (m_state) { case PreRunCleaning: { - m_mounter->resetMountSpecifications(); - m_mounter->setToolchain(m_runConfig->toolchain()); - const MaemoRemoteMountsModel * const remoteMounts - = m_runConfig->remoteMounts(); - for (int i = 0; i < remoteMounts->mountSpecificationCount(); ++i) - m_mounter->addMountSpecification(remoteMounts->mountSpecificationAt(i), false); - if (m_debugging && m_runConfig->useRemoteGdb()) { - m_mounter->addMountSpecification(MaemoMountSpecification( - m_runConfig->localDirToMountForRemoteGdb(), - m_runConfig->remoteProjectSourcesMountPoint()), false); - } + for (int i = 0; i < m_mountSpecs.count(); ++i) + m_mounter->addMountSpecification(m_mountSpecs.at(i), false); setState(PreMountUnmounting); unmount(); break; @@ -253,11 +264,6 @@ void MaemoSshRunner::startExecution(const QByteArray &remoteCall) { ASSERT_STATE(ReadyForExecution); - if (m_runConfig->remoteExecutableFilePath().isEmpty()) { - emitError(tr("Cannot run: No remote executable set.")); - return; - } - m_runner = m_connection->createRemoteProcess(remoteCall); connect(m_runner.data(), SIGNAL(started()), this, SIGNAL(remoteProcessStarted())); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.h b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.h index 83110bfab3..94828e5385 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.h @@ -38,6 +38,8 @@ #include "maemodeviceconfigurations.h" #include "maemomountspecification.h" +#include + #include #include #include @@ -70,6 +72,10 @@ public: const MaemoUsedPortsGatherer *usedPortsGatherer() const { return m_portsGatherer; } MaemoPortList *freePorts() { return &m_freePorts; } + MaemoDeviceConfig deviceConfig() const { return m_devConfig; } + QString remoteExecutable() const { return m_remoteExecutable; } + QStringList arguments() const { return m_appArguments; } + QList userEnvChanges() const { return m_userEnvChanges; } static const qint64 InvalidExitCode; @@ -108,10 +114,14 @@ private: void mount(); void unmount(); - MaemoRunConfiguration * const m_runConfig; // TODO this pointer can be invalid MaemoRemoteMounter * const m_mounter; MaemoUsedPortsGatherer * const m_portsGatherer; const MaemoDeviceConfig m_devConfig; + const QString m_remoteExecutable; + const QStringList m_appArguments; + const QList m_userEnvChanges; + const MaemoPortList m_initialFreePorts; + QList m_mountSpecs; QSharedPointer m_connection; QSharedPointer m_runner; @@ -120,7 +130,6 @@ private: MaemoPortList m_freePorts; int m_exitStatus; - const bool m_debugging; State m_state; }; -- 2.11.0