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>
This commit is contained in:
parent
b33a8cb13d
commit
50a095bede
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user