forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -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:
|
|||||||
|
|
||||||
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
|
|||||||
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)
|
|||||||
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user