diff options
author | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2015-10-30 09:43:45 +0100 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2015-10-30 21:50:43 +0000 |
commit | 25dcc90d799fba3e3f0391783ed07cb22cd1115a (patch) | |
tree | 3af5c98f2f8336569d9954ad5ea66a50cdff917e | |
parent | ccbb1b4409474d3a29e7314ac21ea84357423738 (diff) | |
download | qtbase-25dcc90d799fba3e3f0391783ed07cb22cd1115a.tar.gz |
winrt: Exit application properly
After returning from main() it is not sufficient to exit the main
thread, it also needs to be ensured that the Xaml::IApplication object
gets notified by invoking Exit.
Task-number: QTBUG-49141
Change-Id: I8ca434be5f17ddddd465ede2a79585c28c51b3ef
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
-rw-r--r-- | src/winmain/qtmain_winrt.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/winmain/qtmain_winrt.cpp b/src/winmain/qtmain_winrt.cpp index 3553d966d8..473c41ab8e 100644 --- a/src/winmain/qtmain_winrt.cpp +++ b/src/winmain/qtmain_winrt.cpp @@ -156,7 +156,9 @@ public: AppContainer *app = reinterpret_cast<AppContainer *>(param); int argc = app->args.count(); char **argv = app->args.data(); - return main(argc, argv); + const int res = main(argc, argv); + app->core->Exit(); + return res; }, this, CREATE_SUSPENDED, nullptr); HRESULT hr; |