iOS: Do not boot a simulator in Booted state

It results into a simulator window with an error

Change-Id: I47d55082bf248fc6558e995158b631d75adb8617
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Vikas Pachdha
2017-01-26 13:59:09 +01:00
parent 5708f3aa34
commit 30a8e05a00
2 changed files with 3 additions and 2 deletions

View File

@@ -397,8 +397,8 @@ void SimulatorControlPrivate::startSimulator(QFutureInterface<SimulatorControl::
const QString &simUdid) const QString &simUdid)
{ {
SimulatorControl::ResponseData response(simUdid); SimulatorControl::ResponseData response(simUdid);
if (deviceInfo(simUdid).available) { SimulatorInfo simInfo = deviceInfo(simUdid);
// Simulator is available. if (simInfo.available && simInfo.isShutdown()) {
const QString cmd = IosConfigurations::developerPath() const QString cmd = IosConfigurations::developerPath()
.appendPath(QStringLiteral("/Applications/Simulator.app/Contents/MacOS/Simulator")) .appendPath(QStringLiteral("/Applications/Simulator.app/Contents/MacOS/Simulator"))
.toString(); .toString();

View File

@@ -53,6 +53,7 @@ public:
class SimulatorInfo : public SimulatorEntity { class SimulatorInfo : public SimulatorEntity {
public: public:
bool isBooted() const { return state.compare(QStringLiteral("Booted")) == 0; } bool isBooted() const { return state.compare(QStringLiteral("Booted")) == 0; }
bool isShutdown() const { return state.compare(QStringLiteral("Shutdown")) == 0; }
bool available; bool available;
QString state; QString state;
QString runtimeName; QString runtimeName;