summaryrefslogtreecommitdiffstats
path: root/src/gui/inputmethod
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2011-10-05 11:14:50 (GMT)
committerSami Merila <sami.merila@nokia.com>2011-10-05 11:14:50 (GMT)
commit0520b1ce10dc2358d663ee08b53b7de9ce41bb23 (patch)
tree1f96ff0f65be707b1182f89e2fea682e617e0473 /src/gui/inputmethod
parent06e3ef571d9acd53d8277fbaac357c170a6db22c (diff)
downloadQt-0520b1ce10dc2358d663ee08b53b7de9ce41bb23.zip
Qt-0520b1ce10dc2358d663ee08b53b7de9ce41bb23.tar.gz
Qt-0520b1ce10dc2358d663ee08b53b7de9ce41bb23.tar.bz2
Ignore CcpuCan calls if input context is being destroyed
If input context is being destroyed while its ability to paste/copy/cut is inquired from native side, just return false. This makes application exit somewhat faster. Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'src/gui/inputmethod')
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index f18d32c..ff74afe 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -1744,6 +1744,8 @@ TBool QCoeFepInputContext::CcpuIsFocused() const
TBool QCoeFepInputContext::CcpuCanCut() const
{
bool retval = false;
+ if (m_inDestruction)
+ return retval;
QWidget *w = focusWidget();
if (!w)
w = m_lastFocusedEditor;
@@ -1775,6 +1777,9 @@ void QCoeFepInputContext::CcpuCopyL()
TBool QCoeFepInputContext::CcpuCanPaste() const
{
bool canPaste = false;
+ if (m_inDestruction)
+ return canPaste;
+
QString textToPaste = QApplication::clipboard()->text();
if (!textToPaste.isEmpty()) {
QWidget *w = focusWidget();