From a5e64509986f62732107f07b6f94d13469fc7a59 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 14 Feb 2011 13:56:39 +0100 Subject: [PATCH] Maemo: Rename "Simulator" to "Emulator" when referring to Qemu. No user-visible changes. --- .../qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp | 4 ++-- src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp | 4 ++-- .../qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp | 4 ++-- .../qt4projectmanager/qt-maemo/maemodeviceconfigurations.h | 2 +- .../qt-maemo/maemodeviceconfigurationssettingswidget.cpp | 2 +- .../qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp | 10 +++++----- src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp | 2 +- src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp | 2 +- src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp index a072e536a9..5c2104363c 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp @@ -81,7 +81,7 @@ void MaemoConfigTestDialog::startConfigTest() return; m_currentTest = GeneralTest; - const QString testingText = m_config->type() == MaemoDeviceConfig::Simulator + const QString testingText = m_config->type() == MaemoDeviceConfig::Emulator ? tr("Testing configuration. This may take a while.") : tr("Testing configuration..."); m_ui->testResultEdit->setPlainText(testingText); @@ -110,7 +110,7 @@ void MaemoConfigTestDialog::handleConnectionError() return; QString output = tr("Could not connect to host: %1") .arg(m_testProcessRunner->connection()->errorString()); - if (m_config->type() == MaemoDeviceConfig::Simulator) + if (m_config->type() == MaemoDeviceConfig::Emulator) output += tr("\nDid you start Qemu?"); m_ui->testResultEdit->setPlainText(output); stopConfigTest(); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp index 725f2d38bd..220561bbcc 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp @@ -358,7 +358,7 @@ void MaemoDeployStep::start() } if (m_needsInstall || !m_filesToCopy.isEmpty()) { - if (m_cachedDeviceConfig->type() == MaemoDeviceConfig::Simulator + if (m_cachedDeviceConfig->type() == MaemoDeviceConfig::Emulator && !MaemoQemuManager::instance().qemuIsRunning()) { MaemoQemuManager::instance().startRuntime(); raiseError(tr("Deployment failed: Qemu was not running. " @@ -998,7 +998,7 @@ MaemoPortList MaemoDeployStep::freePorts() const = m_cachedDeviceConfig ? m_cachedDeviceConfig : m_deviceConfig; if (!devConf) return MaemoPortList(); - if (devConf->type() == MaemoDeviceConfig::Simulator && qt4bc) { + if (devConf->type() == MaemoDeviceConfig::Emulator && qt4bc) { MaemoQemuRuntime rt; const int id = qt4bc->qtVersion()->uniqueId(); if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt)) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp index b576080f45..29e3eb10b6 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp @@ -243,9 +243,9 @@ MaemoDeviceConfig::Ptr MaemoDeviceConfig::createEmulatorConfig(const QString &na { Utils::SshConnectionParameters sshParams(Utils::SshConnectionParameters::NoProxy); sshParams.authType = Utils::SshConnectionParameters::AuthByPwd; - sshParams.host = defaultHost(Simulator); + sshParams.host = defaultHost(Emulator); sshParams.pwd = defaultQemuPassword(osVersion); - return Ptr(new MaemoDeviceConfig(name, osVersion, Simulator, sshParams, nextId)); + return Ptr(new MaemoDeviceConfig(name, osVersion, Emulator, sshParams, nextId)); } MaemoDeviceConfig::MaemoDeviceConfig(const QString &name, diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.h b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.h index a84cf79ff2..d07dfe6965 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.h @@ -74,7 +74,7 @@ class MaemoDeviceConfig public: typedef QSharedPointer ConstPtr; typedef quint64 Id; - enum DeviceType { Physical, Simulator }; + enum DeviceType { Physical, Emulator }; MaemoPortList freePorts() const; Utils::SshConnectionParameters sshParameters() const { return m_sshParameters; } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp index f42353f004..494bf7789b 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp @@ -229,7 +229,7 @@ void MaemoDeviceConfigurationsSettingsWidget::fillInValues() m_ui->keyFileLineEdit->setPath(sshParams.privateKeyFile); m_ui->showPasswordCheckBox->setChecked(false); updatePortsWarningLabel(); - const bool isSimulator = current->type() == MaemoDeviceConfig::Simulator; + const bool isSimulator = current->type() == MaemoDeviceConfig::Emulator; m_ui->hostLineEdit->setReadOnly(isSimulator); m_ui->sshPortSpinBox->setReadOnly(isSimulator); } diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp index f56920d3f0..15e4ed12ee 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp @@ -108,8 +108,8 @@ public: QString hostName() const { - return deviceType() == MaemoDeviceConfig::Simulator - ? MaemoDeviceConfig::defaultHost(MaemoDeviceConfig::Simulator) + return deviceType() == MaemoDeviceConfig::Emulator + ? MaemoDeviceConfig::defaultHost(MaemoDeviceConfig::Emulator) : m_ui->hostNameLineEdit->text().trimmed(); } @@ -123,7 +123,7 @@ public: MaemoDeviceConfig::DeviceType deviceType() const { return m_ui->hwButton->isChecked() - ? MaemoDeviceConfig::Physical : MaemoDeviceConfig::Simulator; + ? MaemoDeviceConfig::Physical : MaemoDeviceConfig::Emulator; } private slots: @@ -475,7 +475,7 @@ public: "created and a test procedure will be run to check whether " "Qt Creator can connect to the device and to provide some " "information about its features."); - if (m_wizardData.deviceType == MaemoDeviceConfig::Simulator) { + if (m_wizardData.deviceType == MaemoDeviceConfig::Emulator) { infoText += QLatin1Char('\n') + tr("Please make sure that Qemu is running, otherwise " "the test will fail."); @@ -562,7 +562,7 @@ int MaemoDeviceConfigWizard::nextId() const d->wizardData.deviceType = d->startPage.deviceType(); d->wizardData.hostName = d->startPage.hostName(); - if (d->wizardData.deviceType == MaemoDeviceConfig::Simulator) { + if (d->wizardData.deviceType == MaemoDeviceConfig::Emulator) { return FinalPageId; } else { return PreviousKeySetupCheckPageId; diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp index 178bbc4896..ad24fa11fe 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp @@ -144,7 +144,7 @@ QString MaemoGlobal::failedToConnectToServerMessage(const Utils::SshConnection:: QString errorMsg = tr("Could not connect to host: %1") .arg(connection->errorString()); - if (deviceConfig->type() == MaemoDeviceConfig::Simulator) { + if (deviceConfig->type() == MaemoDeviceConfig::Emulator) { if (connection->errorState() == Utils::SshTimeoutError || connection->errorState() == Utils::SshSocketError) { errorMsg += tr("\nDid you start Qemu?"); diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp index 0ded5626ae..4e24959103 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoqemumanager.cpp @@ -567,7 +567,7 @@ bool MaemoQemuManager::targetUsesMatchingRuntimeConfig(Target *target, if (qtVersion) *qtVersion = version; const MaemoDeviceConfig::ConstPtr &config = mrc->deviceConfig(); - return config && config->type() == MaemoDeviceConfig::Simulator; + return config && config->type() == MaemoDeviceConfig::Emulator; } void MaemoQemuManager::notify(const QList uniqueIds) diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp index fd9a03a937..79be7d9f9a 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp @@ -106,7 +106,7 @@ void MaemoSshRunner::start() return; } - if (m_devConfig->type() == MaemoDeviceConfig::Simulator + if (m_devConfig->type() == MaemoDeviceConfig::Emulator && !MaemoQemuManager::instance().qemuIsRunning()) { MaemoQemuManager::instance().startRuntime(); emitError(tr("Cannot run: Qemu was not running. " -- 2.11.0