From 0520b1ce10dc2358d663ee08b53b7de9ce41bb23 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Wed, 5 Oct 2011 14:14:50 +0300 Subject: 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 --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- cgit v0.12