summaryrefslogtreecommitdiffstats
path: root/src/winmain/qtmain_winrt.cpp
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-02-26 14:25:25 +0100
committerOliver Wolff <oliver.wolff@qt.io>2018-03-07 13:38:48 +0000
commit50a095bedef5e9648f1e8e1f406cd6117a455880 (patch)
treed371fa68c4bfe90002c841bdad999b3ee9ab770a /src/winmain/qtmain_winrt.cpp
parentb33a8cb13d317cc5a5212204966b2e174d0ebca1 (diff)
qtmain_winrt: Remove unused leftovers from Windows (Phone) 8.1 times
On Windows (Phone) 8.1 __getmainargs was still supported and used to do the initialization of the application's parameters and environment. When that functionality was removed together with the now unsupported OSs,the initial filling of argc, argv, and env part was forgotten. Change-Id: I3b788de317b22b4525427faefc3fe974dac5d9ac Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/winmain/qtmain_winrt.cpp')
-rw-r--r--src/winmain/qtmain_winrt.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/winmain/qtmain_winrt.cpp b/src/winmain/qtmain_winrt.cpp
index 21aed27c7f..b072248603 100644
--- a/src/winmain/qtmain_winrt.cpp
+++ b/src/winmain/qtmain_winrt.cpp
@@ -149,12 +149,8 @@ public:
{
}
- int exec(int argc, char **argv)
+ int exec()
{
- args.reserve(argc);
- for (int i = 0; i < argc; ++i)
- args.append(argv[i]);
-
mainThread = CreateThread(NULL, 0, [](void *param) -> DWORD {
AppContainer *app = reinterpret_cast<AppContainer *>(param);
int argc = app->args.count() - 1;
@@ -381,18 +377,9 @@ private:
// Main entry point for Appx containers
int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
- int argc = 0;
- char **argv = 0, **env = 0;
- for (int i = 0; env && env[i]; ++i) {
- QByteArray var(env[i]);
- int split = var.indexOf('=');
- if (split > 0)
- qputenv(var.mid(0, split), var.mid(split + 1));
- }
-
if (FAILED(RoInitialize(RO_INIT_MULTITHREADED)))
return 1;
ComPtr<AppContainer> app = Make<AppContainer>();
- return app->exec(argc, argv);
+ return app->exec();
}