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()
m_cleanupTimer->setSingleShot(true);
connect(m_cleanupTimer, SIGNAL(timeout()), this,
SLOT(handleCleanupTimeout()));
const Qt4BuildConfiguration * const buildConfig
= qobject_cast<Qt4BuildConfiguration *>(buildConfiguration());
const MaemoToolChain * const toolchain
= dynamic_cast<MaemoToolChain *>(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
......
......@@ -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()));
......
......@@ -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 {
......
......@@ -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();
......
Markdown is supported
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