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