PortList MaemoGlobal::freePorts(const LinuxDeviceConfiguration::ConstPtr &devConf, const QtSupport::BaseQtVersion *qtVersion) { if (!devConf || !qtVersion) return PortList(); if (devConf->type() == LinuxDeviceConfiguration::Emulator) { MaemoQemuRuntime rt; const int id = qtVersion->uniqueId(); if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt)) return rt.m_freePorts; } return devConf->freePorts(); }
QString MaemoGlobal::failedToConnectToServerMessage(const Utils::SshConnection::Ptr &connection, const LinuxDeviceConfiguration::ConstPtr &deviceConfig) { QString errorMsg = tr("Could not connect to host: %1") .arg(connection->errorString()); if (deviceConfig->type() == LinuxDeviceConfiguration::Emulator) { if (connection->errorState() == Utils::SshTimeoutError || connection->errorState() == Utils::SshSocketError) { errorMsg += tr("\nDid you start Qemu?"); } } else if (connection->errorState() == Utils::SshTimeoutError) { errorMsg += tr("\nIs the device connected and set up for network access?"); } return errorMsg; }