summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2016-02-09 12:14:21 +0100
committerMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2016-02-12 18:03:53 +0000
commit62984d89187b2a65137db3029235d358dd3c703a (patch)
tree51e6b7b050a3ecabcadc1b77e7fb0b8581d640cb /src/plugins
parent70fb36e4bdefa37cff77decac5d549368e805aa8 (diff)
Fix input pane usage on Windows 10 IoT Core
Running on Raspberry Pi casting to IInputPane2 fails with E_NO_INTERFACE as there is no input pane available for the device. However, if E_NO_INTERFACE is returned from the lambda, then deletion of the ComPtr holding the AsyncAction in runOnXamlThread() crashes somewhere deep internally of Release(). As we do not check for the return value anywhere, avoid the crash by returning S_OK instead. Change-Id: Icd38ec482b365285a482e5ff792ec1b4f13317d5 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/winrt/qwinrtinputcontext.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp
index a0474b6710..9228ef8d62 100644
--- a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp
+++ b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp
@@ -169,12 +169,12 @@ void QWinRTInputContext::showInputPanel()
ComPtr<IInputPane2> inputPane;
HRESULT hr = getInputPane(&inputPane);
if (FAILED(hr))
- return hr;
+ return S_OK;
boolean success;
hr = inputPane->TryShow(&success);
if (FAILED(hr) || !success)
qErrnoWarning(hr, "Failed to show input panel.");
- return hr;
+ return S_OK;
});
}
@@ -184,12 +184,12 @@ void QWinRTInputContext::hideInputPanel()
ComPtr<IInputPane2> inputPane;
HRESULT hr = getInputPane(&inputPane);
if (FAILED(hr))
- return hr;
+ return S_OK;
boolean success;
hr = inputPane->TryHide(&success);
if (FAILED(hr) || !success)
qErrnoWarning(hr, "Failed to hide input panel.");
- return hr;
+ return S_OK;
});
}