diff options
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtplatformmessagedialoghelper.cpp')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtplatformmessagedialoghelper.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtplatformmessagedialoghelper.cpp b/src/plugins/platforms/winrt/qwinrtplatformmessagedialoghelper.cpp index e70d06860c..c2f884055d 100644 --- a/src/plugins/platforms/winrt/qwinrtplatformmessagedialoghelper.cpp +++ b/src/plugins/platforms/winrt/qwinrtplatformmessagedialoghelper.cpp @@ -171,10 +171,11 @@ void QWinRTPlatformMessageDialogHelper::hide() HRESULT QWinRTPlatformMessageDialogHelper::onInvoked(ABI::Windows::UI::Popups::IUICommand *command) { - HSTRING hLabel; + HString hLabel; UINT32 labelLength; - command->get_Label(&hLabel); - QString label = QString::fromWCharArray(::WindowsGetStringRawBuffer(hLabel, &labelLength)); + command->get_Label(hLabel.GetAddressOf()); + PCWSTR rawString = hLabel.GetRawBuffer(&labelLength); + QString label = QString::fromWCharArray(rawString, labelLength); int buttonId = -1; for (int i = QPlatformDialogHelper::FirstButton; i < QPlatformDialogHelper::LastButton; i<<=1) { if ( options()->standardButtons() & i ) { |