winrt: handle PrelaunchActivated property to pass certification
Windows 10 requires apps to handle the PrelaunchActivated property. This enables a faster startup by launching an app and immediately suspending it. This happens by the system and at the time the user launches the app no library loading or initialization is required. By default we opt-out of this and return early. The reason is that we cannot know the type of application written in Qt and whether it breaks the guidelines by using prelaunch. For further details check here: https://msdn.microsoft.com/en-us/library/windows/apps/mt593297.aspx Task-number: QTBUG-50292 Change-Id: I4d0b0b95a03f93b99211d042895404a88ea7cb9d Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>bb10
parent
275f182872
commit
3c086e50d3
|
|
@ -198,6 +198,15 @@ private:
|
|||
HRESULT __stdcall OnLaunched(ILaunchActivatedEventArgs *launchArgs) Q_DECL_OVERRIDE
|
||||
{
|
||||
#if _MSC_VER >= 1900
|
||||
ComPtr<IPrelaunchActivatedEventArgs> preArgs;
|
||||
HRESULT hr = launchArgs->QueryInterface(preArgs.GetAddressOf());
|
||||
if (SUCCEEDED(hr)) {
|
||||
boolean prelaunched;
|
||||
preArgs->get_PrelaunchActivated(&prelaunched);
|
||||
if (prelaunched)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
commandLine = QString::fromWCharArray(GetCommandLine()).toUtf8();
|
||||
#endif
|
||||
HString launchCommandLine;
|
||||
|
|
|
|||
Loading…
Reference in New Issue