diff --git a/src/plugins/remotelinux/abstractmaemodeploystep.cpp b/src/plugins/remotelinux/abstractmaemodeploystep.cpp index 57580d9ea07..e305bdc7195 100644 --- a/src/plugins/remotelinux/abstractmaemodeploystep.cpp +++ b/src/plugins/remotelinux/abstractmaemodeploystep.cpp @@ -249,10 +249,18 @@ void AbstractMaemoDeployStep::start() if (isDeploymentNeeded(deviceConfiguration()->sshParameters().host)) { if (deviceConfiguration()->type() == LinuxDeviceConfiguration::Emulator && !MaemoQemuManager::instance().qemuIsRunning()) { - MaemoQemuManager::instance().startRuntime(); - raiseError(tr("Cannot deploy: Qemu was not running. " - "It has now been started up for you, but it will take " - "a bit of time until it is ready.")); + MaemoQemuRuntime rt; + const int qtId = qt4BuildConfiguration() && qt4BuildConfiguration()->qtVersion() + ? qt4BuildConfiguration()->qtVersion()->uniqueId() : -1; + if (MaemoQemuManager::instance().runtimeForQtVersion(qtId, &rt)) { + MaemoQemuManager::instance().startRuntime(); + raiseError(tr("Cannot deploy: Qemu was not running. " + "It has now been started up for you, but it will take " + "a bit of time until it is ready. Please try again then.")); + } else { + raiseError(tr("Cannot deploy: You want to deploy to Qemu, but it is not enabled " + "for this Qt version.")); + } emit done(); return; } diff --git a/src/plugins/remotelinux/maemosshrunner.cpp b/src/plugins/remotelinux/maemosshrunner.cpp index 0a1d8335f4f..3c6f61b0473 100644 --- a/src/plugins/remotelinux/maemosshrunner.cpp +++ b/src/plugins/remotelinux/maemosshrunner.cpp @@ -37,6 +37,9 @@ #include "maemoremotemountsmodel.h" #include "remotelinuxrunconfiguration.h" +#include +#include + #define ASSERT_STATE(state) ASSERT_STATE_GENERIC(MountState, state, m_mountState) using namespace Qt4ProjectManager; @@ -51,7 +54,9 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig m_mountSpecs(runConfig->remoteMounts()->mountSpecs()), m_mountState(InactiveMountState) { - m_mounter->setBuildConfiguration(runConfig->activeQt4BuildConfiguration()); + const Qt4BuildConfiguration * const bc = runConfig->activeQt4BuildConfiguration(); + m_qtId = bc && bc->qtVersion() ? bc->qtVersion()->uniqueId() : -1; + m_mounter->setBuildConfiguration(bc); connect(m_mounter, SIGNAL(mounted()), this, SLOT(handleMounted())); connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted())); connect(m_mounter, SIGNAL(error(QString)), this, @@ -71,9 +76,14 @@ bool MaemoSshRunner::canRun(QString &whyNot) const if (devConfig()->type() == LinuxDeviceConfiguration::Emulator && !MaemoQemuManager::instance().qemuIsRunning()) { - MaemoQemuManager::instance().startRuntime(); - whyNot = tr("Qemu was not running. It has now been started up for you, but it will take " - "a bit of time until it is ready."); + MaemoQemuRuntime rt; + if (MaemoQemuManager::instance().runtimeForQtVersion(m_qtId, &rt)) { + MaemoQemuManager::instance().startRuntime(); + whyNot = tr("Qemu was not running. It has now been started up for you, but it will " + "take a bit of time until it is ready. Please try again then."); + } else { + whyNot = tr("You want to run on Qemu, but it is not enabled for this Qt version."); + } return false; } diff --git a/src/plugins/remotelinux/maemosshrunner.h b/src/plugins/remotelinux/maemosshrunner.h index 19649de36a1..e16f5991193 100644 --- a/src/plugins/remotelinux/maemosshrunner.h +++ b/src/plugins/remotelinux/maemosshrunner.h @@ -69,8 +69,8 @@ private: MaemoRemoteMounter * const m_mounter; QList m_mountSpecs; - MountState m_mountState; + int m_qtId; }; } // namespace Internal