From e3237deee07ec6961b905800d29b1a80f0f63595 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 5 Feb 2010 13:49:46 +0100 Subject: Removed useless member variable and replaced with var on the stack. RevBy: Trust me --- src/gui/inputmethod/qcoefepinputcontext_p.h | 1 - src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 73c13d9..f325fb9 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -151,7 +151,6 @@ private: int m_inlinePosition; MFepInlineTextFormatRetriever *m_formatRetriever; MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler; - int m_longPress; int m_cursorPos; QBasicTimer m_tempPreeditStringTimeout; bool m_hasTempPreeditString; diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index e5ab300..56b79f4 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -71,7 +71,6 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_inlinePosition(0), m_formatRetriever(0), m_pointerHandler(0), - m_longPress(0), m_cursorPos(0), m_hasTempPreeditString(false) { @@ -744,24 +743,26 @@ void QCoeFepInputContext::DoCommitFepInlineEditL() void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian) { + int longPress = 0; + if (m_preeditString.size() == 0) { QWidget *w = focusWidget(); if (triggeredBySymbian && w) { // We must replace the last character only if the input box has already accepted one if (w->inputMethodQuery(Qt::ImCursorPosition).toInt() != m_cursorPos) - m_longPress = 1; + longPress = 1; } return; } QList attributes; QInputMethodEvent event(QLatin1String(""), attributes); - event.setCommitString(m_preeditString, 0-m_longPress, m_longPress); + event.setCommitString(m_preeditString, 0-longPress, longPress); m_preeditString.clear(); sendEvent(event); m_hasTempPreeditString = false; - m_longPress = 0; + longPress = 0; if (!triggeredBySymbian) { CCoeFep* fep = CCoeEnv::Static()->Fep(); -- cgit v0.12