From 754ba5768623136bdd6ff9c97330193d1a390215 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Sun, 3 May 2015 13:36:22 +0300 Subject: [PATCH] winrtrunner: Remove the app when stopping on Windows Phone The native API fails to stop the app, but removing the app will successfully stop it. Until we have a reliable way to stop the application, simply remove the app instead. Task-number: QTBUG-41946 Change-Id: I98662103a7242f806e2eb5ef06cfd60372df681a Reviewed-by: Oliver Wolff Reviewed-by: Maurice Kalinowski --- src/winrtrunner/appxphoneengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/winrtrunner/appxphoneengine.cpp b/src/winrtrunner/appxphoneengine.cpp index 526ef28..32269be 100644 --- a/src/winrtrunner/appxphoneengine.cpp +++ b/src/winrtrunner/appxphoneengine.cpp @@ -491,6 +491,7 @@ bool AppxPhoneEngine::stop() if (!connect()) return false; +#if 0 // This does not actually stop the app - QTBUG-41946 ComPtr connection; HRESULT hr = d->connection.As(&connection); RETURN_FALSE_IF_FAILED("Failed to cast connection object"); @@ -500,6 +501,9 @@ bool AppxPhoneEngine::stop() RETURN_FALSE_IF_FAILED("Failed to stop the package"); return true; +#else + return remove(); +#endif } QString AppxPhoneEngine::devicePath(const QString &relativePath) const -- 2.7.4