summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/qt-maemo
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-02-09 16:08:57 +0100
committerChristian Kandeler <christian.kandeler@nokia.com>2011-02-09 16:08:57 +0100
commit67c311592be79595c170e95260f49ec583e69bb1 (patch)
tree93710b1f4e37b86d360951992d5123cb462ea6e9 /src/plugins/qt4projectmanager/qt-maemo
parentdcd6f4c0e18bc4dc9d4b00828df216ee393d8d8c (diff)
downloadqt-creator-67c311592be79595c170e95260f49ec583e69bb1.tar.gz
Maemo: Parse actual Qemu port specification for deployment as well.
Diffstat (limited to 'src/plugins/qt4projectmanager/qt-maemo')
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp18
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.h1
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp11
3 files changed, 18 insertions, 12 deletions
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
index 99d27c53de..9b67b449f7 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
@@ -505,7 +505,7 @@ void MaemoDeployStep::handleUnmounted()
break;
case UnmountingCurrentDirs:
setState(GatheringPorts);
- m_portsGatherer->start(m_connection, m_cachedDeviceConfig->freePorts());
+ m_portsGatherer->start(m_connection, freePorts());
break;
case UnmountingCurrentMounts:
if (m_hasError)
@@ -925,7 +925,7 @@ void MaemoDeployStep::handlePortListReady()
if (m_state == GatheringPorts) {
setState(Mounting);
- m_freePorts = m_cachedDeviceConfig->freePorts();
+ m_freePorts = freePorts();
m_mounter->mount(&m_freePorts, m_portsGatherer);
} else {
setState(Inactive);
@@ -990,6 +990,20 @@ void MaemoDeployStep::handleDeviceInstallerErrorOutput(const QByteArray &output)
}
}
+MaemoPortList MaemoDeployStep::freePorts() const
+{
+ const Qt4BuildConfiguration * const qt4bc = qt4BuildConfiguration();
+ if (!m_cachedDeviceConfig)
+ return MaemoPortList();
+ if (m_cachedDeviceConfig->type() == MaemoDeviceConfig::Simulator && qt4bc) {
+ MaemoQemuRuntime rt;
+ const int id = qt4bc->qtVersion()->uniqueId();
+ if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
+ return rt.m_freePorts;
+ }
+ return m_cachedDeviceConfig->freePorts();
+}
+
const Qt4BuildConfiguration *MaemoDeployStep::qt4BuildConfiguration() const
{
return static_cast<Qt4BuildConfiguration *>(buildConfiguration());
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.h b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.h
index b038a881bd..1c8438283b 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.h
@@ -85,6 +85,7 @@ public:
void setDeployed(const QString &host, const MaemoDeployable &deployable);
QSharedPointer<MaemoDeployables> deployables() const { return m_deployables; }
QSharedPointer<Core::SshConnection> sshConnection() const { return m_connection; }
+ MaemoPortList freePorts() const;
bool isDeployToSysrootEnabled() const { return m_deployToSysroot; }
void setDeployToSysrootEnabled(bool deploy) { m_deployToSysroot = deploy; }
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
index 971cd8e995..d93e52a3d6 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
@@ -308,16 +308,7 @@ QString MaemoRunConfiguration::remoteExecutableFilePath() const
// TODO: Move to deploy step
MaemoPortList MaemoRunConfiguration::freePorts() const
{
- const Qt4BuildConfiguration * const qt4bc = activeQt4BuildConfiguration();
- if (!deviceConfig())
- return MaemoPortList();
- if (deviceConfig()->type() == MaemoDeviceConfig::Simulator && qt4bc) {
- MaemoQemuRuntime rt;
- const int id = qt4bc->qtVersion()->uniqueId();
- if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
- return rt.m_freePorts;
- }
- return deviceConfig()->freePorts();
+ return deployStep()->freePorts();
}
bool MaemoRunConfiguration::useRemoteGdb() const