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:
@@ -507,7 +507,7 @@ void MaemoDeployStep::handleUnmounted()
|
||||
break;
|
||||
case UnmountingCurrentDirs:
|
||||
setState(GatheringPorts);
|
||||
m_portsGatherer->start(m_connection, freePorts());
|
||||
m_portsGatherer->start(m_connection, freePorts(m_cachedDeviceConfig));
|
||||
break;
|
||||
case UnmountingCurrentMounts:
|
||||
if (m_hasError)
|
||||
@@ -932,7 +932,7 @@ void MaemoDeployStep::handlePortListReady()
|
||||
|
||||
if (m_state == GatheringPorts) {
|
||||
setState(Mounting);
|
||||
m_freePorts = freePorts();
|
||||
m_freePorts = freePorts(m_cachedDeviceConfig);
|
||||
m_mounter->mount(&m_freePorts, m_portsGatherer);
|
||||
} else {
|
||||
setState(Inactive);
|
||||
@@ -956,6 +956,7 @@ void MaemoDeployStep::setState(State newState)
|
||||
}
|
||||
if (m_deviceInstaller)
|
||||
disconnect(m_deviceInstaller.data(), 0, this, 0);
|
||||
m_cachedDeviceConfig.clear();
|
||||
emit done();
|
||||
}
|
||||
}
|
||||
@@ -1000,10 +1001,13 @@ void MaemoDeployStep::handleDeviceInstallerErrorOutput(const QByteArray &output)
|
||||
}
|
||||
|
||||
MaemoPortList MaemoDeployStep::freePorts() const
|
||||
{
|
||||
return freePorts(m_deviceConfig);
|
||||
}
|
||||
|
||||
MaemoPortList MaemoDeployStep::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) {
|
||||
|
@@ -157,6 +157,7 @@ private:
|
||||
void unmount();
|
||||
void setDeviceConfig(MaemoDeviceConfig::Id internalId);
|
||||
const Qt4BuildConfiguration *qt4BuildConfiguration() const;
|
||||
MaemoPortList freePorts(const QSharedPointer<const MaemoDeviceConfig> &devConfig) const;
|
||||
|
||||
static const QLatin1String Id;
|
||||
|
||||
|
Reference in New Issue
Block a user