Commit 14d7f6b6 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Toolchain for remote mounter needs to be dynamic.

parent c0a922f7
...@@ -104,11 +104,7 @@ void MaemoDeployStep::ctor() ...@@ -104,11 +104,7 @@ void MaemoDeployStep::ctor()
m_cleanupTimer->setSingleShot(true); m_cleanupTimer->setSingleShot(true);
connect(m_cleanupTimer, SIGNAL(timeout()), this, connect(m_cleanupTimer, SIGNAL(timeout()), this,
SLOT(handleCleanupTimeout())); SLOT(handleCleanupTimeout()));
const Qt4BuildConfiguration * const buildConfig m_mounter = new MaemoRemoteMounter(this);
= qobject_cast<Qt4BuildConfiguration *>(buildConfiguration());
const MaemoToolChain * const toolchain
= dynamic_cast<MaemoToolChain *>(buildConfig->toolChain());
m_mounter = new MaemoRemoteMounter(this, toolchain);
connect(m_mounter, SIGNAL(mounted()), this, SLOT(handleMounted())); connect(m_mounter, SIGNAL(mounted()), this, SLOT(handleMounted()));
connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted())); connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted()));
connect(m_mounter, SIGNAL(error(QString)), this, connect(m_mounter, SIGNAL(error(QString)), this,
...@@ -585,6 +581,7 @@ void MaemoDeployStep::handleUnmounted() ...@@ -585,6 +581,7 @@ void MaemoDeployStep::handleUnmounted()
Q_ASSERT(m_needsInstall || !m_filesToCopy.isEmpty()); Q_ASSERT(m_needsInstall || !m_filesToCopy.isEmpty());
m_mounter->resetMountSpecifications(); m_mounter->resetMountSpecifications();
m_mounter->setToolchain(toolChain());
m_mounter->setPortList(deviceConfig().freePorts()); m_mounter->setPortList(deviceConfig().freePorts());
if (m_needsInstall) { if (m_needsInstall) {
const QString localDir const QString localDir
......
...@@ -43,11 +43,9 @@ using namespace Core; ...@@ -43,11 +43,9 @@ using namespace Core;
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent, MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent)
const MaemoToolChain *toolchain) : QObject(parent), m_utfsServerTimer(new QTimer(this)),
: QObject(parent), m_toolChain(toolchain), m_uploadJobId(SftpInvalidJob), m_stop(false)
m_utfsServerTimer(new QTimer(this)), m_uploadJobId(SftpInvalidJob),
m_stop(false)
{ {
connect(m_utfsServerTimer, SIGNAL(timeout()), this, connect(m_utfsServerTimer, SIGNAL(timeout()), this,
SLOT(handleUtfsServerTimeout())); SLOT(handleUtfsServerTimeout()));
......
...@@ -57,8 +57,9 @@ class MaemoRemoteMounter : public QObject ...@@ -57,8 +57,9 @@ class MaemoRemoteMounter : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
MaemoRemoteMounter(QObject *parent, const MaemoToolChain *toolchain); MaemoRemoteMounter(QObject *parent);
~MaemoRemoteMounter(); ~MaemoRemoteMounter();
void setToolchain(const MaemoToolChain *toolchain) { m_toolChain = toolchain; }
void setPortList(const MaemoPortList &portList) { m_portList = portList; } void setPortList(const MaemoPortList &portList) { m_portList = portList; }
bool addMountSpecification(const MaemoMountSpecification &mountSpec, bool addMountSpecification(const MaemoMountSpecification &mountSpec,
bool mountAsRoot); bool mountAsRoot);
...@@ -99,7 +100,7 @@ private: ...@@ -99,7 +100,7 @@ private:
QString utfsClientOnDevice() const; QString utfsClientOnDevice() const;
QString utfsServer() const; QString utfsServer() const;
const MaemoToolChain * const m_toolChain; const MaemoToolChain *m_toolChain;
QTimer * const m_utfsServerTimer; QTimer * const m_utfsServerTimer;
struct MountInfo { struct MountInfo {
......
...@@ -54,7 +54,7 @@ namespace Internal { ...@@ -54,7 +54,7 @@ namespace Internal {
MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoSshRunner::MaemoSshRunner(QObject *parent,
MaemoRunConfiguration *runConfig, bool debugging) MaemoRunConfiguration *runConfig, bool debugging)
: QObject(parent), m_runConfig(runConfig), : QObject(parent), m_runConfig(runConfig),
m_mounter(new MaemoRemoteMounter(this, runConfig->toolchain())), m_mounter(new MaemoRemoteMounter(this)),
m_devConfig(runConfig->deviceConfig()), m_shuttingDown(false), m_devConfig(runConfig->deviceConfig()), m_shuttingDown(false),
m_debugging(debugging) m_debugging(debugging)
{ {
...@@ -191,6 +191,7 @@ void MaemoSshRunner::handleUnmounted() ...@@ -191,6 +191,7 @@ void MaemoSshRunner::handleUnmounted()
MaemoPortList portList = m_devConfig.freePorts(); MaemoPortList portList = m_devConfig.freePorts();
if (m_debugging && !m_runConfig->useRemoteGdb()) if (m_debugging && !m_runConfig->useRemoteGdb())
portList.getNext(); // One has already been used for gdbserver. portList.getNext(); // One has already been used for gdbserver.
m_mounter->setToolchain(m_runConfig->toolchain());
m_mounter->setPortList(portList); m_mounter->setPortList(portList);
const MaemoRemoteMountsModel * const remoteMounts const MaemoRemoteMountsModel * const remoteMounts
= m_runConfig->remoteMounts(); = m_runConfig->remoteMounts();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment