From 34fd680802e911cf54628763424584971e6a50b6 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Fri, 12 Feb 2016 11:59:24 +0100 Subject: winrt: Remove explicit exit call 8c3ae221 introduced a mean to actually close an application. Otherwise the application was in an undefined state and did not exit. Since 5.6 we switched to Xaml and the explicit call to Exit() is not required anymore. This also allows using multiple application objects sequentially as the unit tests do in some cases. Change-Id: I9030afec72a4534e818c77c373dc3a81b922a480 Reviewed-by: Oliver Wolff --- src/corelib/kernel/qcoreapplication.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 8df384ab09..aa08a23f6b 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1299,19 +1299,6 @@ void QCoreApplication::exit(int returnCode) QEventLoop *eventLoop = data->eventLoops.at(i); eventLoop->exit(returnCode); } -#ifdef Q_OS_WINRT - qWarning("QCoreApplication::exit: It is not recommended to explicitly exit an application on Windows Store Apps"); - ComPtr app; - HRESULT hr = RoGetActivationFactory(Wrappers::HString::MakeReference(RuntimeClass_Windows_ApplicationModel_Core_CoreApplication).Get(), - IID_PPV_ARGS(&app)); - RETURN_VOID_IF_FAILED("Could not acquire ICoreApplication object"); - ComPtr appExit; - - hr = app.As(&appExit); - RETURN_VOID_IF_FAILED("Could not acquire ICoreApplicationExit object"); - hr = appExit->Exit(); - RETURN_VOID_IF_FAILED("Could not exit application"); -#endif // Q_OS_WINRT } /***************************************************************************** -- cgit v1.2.3