diff --git a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp index 3f476556ee..065ed28cc0 100644 --- a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp +++ b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(lcQpaInputMethods, "qt.qpa.input.methods") -inline QRectF getInputPaneRect(IInputPane *pane, qreal scaleFactor) +inline QRectF getInputPaneRect(ComPtr pane, qreal scaleFactor) { Rect rect; pane->get_OccludedRect(&rect); @@ -85,16 +85,15 @@ QWinRTInputContext::QWinRTInputContext(QWinRTScreen *screen) { qCDebug(lcQpaInputMethods) << __FUNCTION__ << screen; - IInputPaneStatics *statics; + ComPtr statics; if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_UI_ViewManagement_InputPane).Get(), &statics))) { qWarning("failed to retrieve input pane statics."); return; } - IInputPane *inputPane; + ComPtr inputPane; statics->GetForCurrentView(&inputPane); - statics->Release(); if (inputPane) { EventRegistrationToken showToken, hideToken; inputPane->add_Showing(Callback(