Commit 2781453b authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Fix issue with cached device configuration.

External functions need to access the real device config,
internal ones need the cached one during deployment.

Task-number: QTCREATORBUG-4514
parent 4c65bac2
...@@ -395,10 +395,13 @@ void AbstractMaemoDeployStep::handleRemoteStderr(const QString &output) ...@@ -395,10 +395,13 @@ void AbstractMaemoDeployStep::handleRemoteStderr(const QString &output)
} }
MaemoPortList AbstractMaemoDeployStep::freePorts() const MaemoPortList AbstractMaemoDeployStep::freePorts() const
{
return freePorts(m_deviceConfig);
}
MaemoPortList AbstractMaemoDeployStep::freePorts(const MaemoDeviceConfig::ConstPtr &devConf) const
{ {
const Qt4BuildConfiguration * const qt4bc = qt4BuildConfiguration(); const Qt4BuildConfiguration * const qt4bc = qt4BuildConfiguration();
const MaemoDeviceConfig::ConstPtr &devConf
= m_cachedDeviceConfig ? m_cachedDeviceConfig : m_deviceConfig;
if (!devConf) if (!devConf)
return MaemoPortList(); return MaemoPortList();
if (devConf->type() == MaemoDeviceConfig::Emulator && qt4bc) { if (devConf->type() == MaemoDeviceConfig::Emulator && qt4bc) {
......
...@@ -97,7 +97,9 @@ protected: ...@@ -97,7 +97,9 @@ protected:
QString deployMountPoint() const; QString deployMountPoint() const;
const Qt4BuildConfiguration *qt4BuildConfiguration() const; const Qt4BuildConfiguration *qt4BuildConfiguration() const;
MaemoPortList freePorts(const QSharedPointer<const MaemoDeviceConfig> &devConfig) const;
QSharedPointer<Utils::SshConnection> connection() const { return m_connection; } QSharedPointer<Utils::SshConnection> connection() const { return m_connection; }
QSharedPointer<const MaemoDeviceConfig> cachedDeviceConfig() const { return m_cachedDeviceConfig; }
private slots: private slots:
void start(); void start();
......
...@@ -153,8 +153,8 @@ void AbstractMaemoDeployByMountStep::handleMountDebugOutput(const QString &outpu ...@@ -153,8 +153,8 @@ void AbstractMaemoDeployByMountStep::handleMountDebugOutput(const QString &outpu
void AbstractMaemoDeployByMountStep::mount() void AbstractMaemoDeployByMountStep::mount()
{ {
m_extendedState = Mounting; m_extendedState = Mounting;
m_mounter->setupMounts(connection(), mountSpecifications(), freePorts(), m_mounter->setupMounts(connection(), mountSpecifications(),
qt4BuildConfiguration()); freePorts(cachedDeviceConfig()), qt4BuildConfiguration());
} }
QString AbstractMaemoDeployByMountStep::deployMountPoint() const QString AbstractMaemoDeployByMountStep::deployMountPoint() const
......
...@@ -153,7 +153,7 @@ void MaemoDirectDeviceUploadStep::handleMkdirFinished(int exitStatus) ...@@ -153,7 +153,7 @@ void MaemoDirectDeviceUploadStep::handleMkdirFinished(int exitStatus)
raiseError(tr("Failed to upload file '%1'.").arg(nativePath)); raiseError(tr("Failed to upload file '%1'.").arg(nativePath));
setFinished(); setFinished();
} else if (fi.isDir()) { } else if (fi.isDir()) {
setDeployed(deviceConfig()->sshParameters().host, d); setDeployed(cachedDeviceConfig()->sshParameters().host, d);
m_filesToUpload.removeFirst(); m_filesToUpload.removeFirst();
uploadNextFile(); uploadNextFile();
} else { } else {
......
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