diff options
author | Sergio Ahumada <sahumada@blackberry.com> | 2014-06-14 18:21:04 +0200 |
---|---|---|
committer | Sergio Ahumada <sahumada@blackberry.com> | 2014-06-14 18:21:04 +0200 |
commit | 7017fe8165c84ba6e9388810d3cc946c9df04dc0 (patch) | |
tree | b68e293c833444f627b4ad76b06da4ae465bfdac /src/winrtrunner/runner.cpp | |
parent | 788638bab869ddd94b9d1967aee9be9c04817ec5 (diff) | |
parent | aa35d132010f4410d72e30d03e3dd713c7a2241d (diff) | |
download | qttools-5.3.1.tar.gz |
Change-Id: I78a250e8631706606e6b003b28cdfb90ad692abc
Diffstat (limited to 'src/winrtrunner/runner.cpp')
-rw-r--r-- | src/winrtrunner/runner.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/winrtrunner/runner.cpp b/src/winrtrunner/runner.cpp index 5b4725991..fa31c30d8 100644 --- a/src/winrtrunner/runner.cpp +++ b/src/winrtrunner/runner.cpp @@ -43,6 +43,9 @@ #include "runnerengine.h" +#ifndef RTRUNNER_NO_APPXPHONE +#include "appxphoneengine.h" +#endif #ifndef RTRUNNER_NO_APPXLOCAL #include "appxlocalengine.h" #endif @@ -80,6 +83,9 @@ QMap<QString, QStringList> Runner::deviceNames() #ifndef RTRUNNER_NO_APPXLOCAL deviceNames.insert(QStringLiteral("Appx"), AppxLocalEngine::deviceNames()); #endif +#ifndef RTRUNNER_NO_APPXPHONE + deviceNames.insert(QStringLiteral("Phone"), AppxPhoneEngine::deviceNames()); +#endif #ifndef RTRUNNER_NO_XAP deviceNames.insert(QStringLiteral("Xap"), XapEngine::deviceNames()); #endif @@ -98,6 +104,22 @@ Runner::Runner(const QString &app, const QStringList &arguments, bool deviceIndexKnown; d->deviceIndex = deviceName.toInt(&deviceIndexKnown); +#ifndef RTRUNNER_NO_APPXPHONE + if (!deviceIndexKnown) { + d->deviceIndex = AppxPhoneEngine::deviceNames().indexOf(deviceName); + if (d->deviceIndex < 0) + d->deviceIndex = 0; + } + if ((d->profile.isEmpty() || d->profile.toLower() == QStringLiteral("appxphone")) + && AppxPhoneEngine::canHandle(this)) { + if (RunnerEngine *engine = AppxPhoneEngine::create(this)) { + d->engine.reset(engine); + d->isValid = true; + qCWarning(lcWinRtRunner) << "Using the AppxPhone profile."; + return; + } + } +#endif #ifndef RTRUNNER_NO_APPXLOCAL if (!deviceIndexKnown) { d->deviceIndex = AppxLocalEngine::deviceNames().indexOf(deviceName); |