forked from qt-creator/qt-creator
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:
@@ -397,8 +397,8 @@ void SimulatorControlPrivate::startSimulator(QFutureInterface<SimulatorControl::
|
||||
const QString &simUdid)
|
||||
{
|
||||
SimulatorControl::ResponseData response(simUdid);
|
||||
if (deviceInfo(simUdid).available) {
|
||||
// Simulator is available.
|
||||
SimulatorInfo simInfo = deviceInfo(simUdid);
|
||||
if (simInfo.available && simInfo.isShutdown()) {
|
||||
const QString cmd = IosConfigurations::developerPath()
|
||||
.appendPath(QStringLiteral("/Applications/Simulator.app/Contents/MacOS/Simulator"))
|
||||
.toString();
|
||||
|
||||
@@ -53,6 +53,7 @@ public:
|
||||
class SimulatorInfo : public SimulatorEntity {
|
||||
public:
|
||||
bool isBooted() const { return state.compare(QStringLiteral("Booted")) == 0; }
|
||||
bool isShutdown() const { return state.compare(QStringLiteral("Shutdown")) == 0; }
|
||||
bool available;
|
||||
QString state;
|
||||
QString runtimeName;
|
||||
|
||||
Reference in New Issue
Block a user