diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp index e0b35548362..b6a3694d59c 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp @@ -104,11 +104,7 @@ void MaemoDeployStep::ctor() m_cleanupTimer->setSingleShot(true); connect(m_cleanupTimer, SIGNAL(timeout()), this, SLOT(handleCleanupTimeout())); - const Qt4BuildConfiguration * const buildConfig - = qobject_cast(buildConfiguration()); - const MaemoToolChain * const toolchain - = dynamic_cast(buildConfig->toolChain()); - m_mounter = new MaemoRemoteMounter(this, toolchain); + m_mounter = new MaemoRemoteMounter(this); connect(m_mounter, SIGNAL(mounted()), this, SLOT(handleMounted())); connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted())); connect(m_mounter, SIGNAL(error(QString)), this, @@ -585,6 +581,7 @@ void MaemoDeployStep::handleUnmounted() Q_ASSERT(m_needsInstall || !m_filesToCopy.isEmpty()); m_mounter->resetMountSpecifications(); + m_mounter->setToolchain(toolChain()); m_mounter->setPortList(deviceConfig().freePorts()); if (m_needsInstall) { const QString localDir diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp index 84066644a24..ddced58f137 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp @@ -43,11 +43,9 @@ using namespace Core; namespace Qt4ProjectManager { namespace Internal { -MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent, - const MaemoToolChain *toolchain) - : QObject(parent), m_toolChain(toolchain), - m_utfsServerTimer(new QTimer(this)), m_uploadJobId(SftpInvalidJob), - m_stop(false) +MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent) + : QObject(parent), m_utfsServerTimer(new QTimer(this)), + m_uploadJobId(SftpInvalidJob), m_stop(false) { connect(m_utfsServerTimer, SIGNAL(timeout()), this, SLOT(handleUtfsServerTimeout())); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h index 290668c6431..4e57892365c 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h @@ -57,8 +57,9 @@ class MaemoRemoteMounter : public QObject { Q_OBJECT public: - MaemoRemoteMounter(QObject *parent, const MaemoToolChain *toolchain); + MaemoRemoteMounter(QObject *parent); ~MaemoRemoteMounter(); + void setToolchain(const MaemoToolChain *toolchain) { m_toolChain = toolchain; } void setPortList(const MaemoPortList &portList) { m_portList = portList; } bool addMountSpecification(const MaemoMountSpecification &mountSpec, bool mountAsRoot); @@ -99,7 +100,7 @@ private: QString utfsClientOnDevice() const; QString utfsServer() const; - const MaemoToolChain * const m_toolChain; + const MaemoToolChain *m_toolChain; QTimer * const m_utfsServerTimer; struct MountInfo { diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp index 6e73e254210..bd9f61ccb03 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp @@ -54,7 +54,7 @@ namespace Internal { MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig, bool debugging) : 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_debugging(debugging) { @@ -191,6 +191,7 @@ void MaemoSshRunner::handleUnmounted() MaemoPortList portList = m_devConfig.freePorts(); if (m_debugging && !m_runConfig->useRemoteGdb()) portList.getNext(); // One has already been used for gdbserver. + m_mounter->setToolchain(m_runConfig->toolchain()); m_mounter->setPortList(portList); const MaemoRemoteMountsModel * const remoteMounts = m_runConfig->remoteMounts();