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