summaryrefslogtreecommitdiff
path: root/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-05 13:49:46 +0100
committeraxis <qt-info@nokia.com>2010-02-05 13:50:44 +0100
commite3237deee07ec6961b905800d29b1a80f0f63595 (patch)
tree1ae62be2e271df3c5f42e002248bdeb9c0258703 /src/gui/inputmethod/qcoefepinputcontext_s60.cpp
parent3fdc70e9272f1a0ddd087f0d908a64ce2d4e4302 (diff)
downloadqt4-tools-e3237deee07ec6961b905800d29b1a80f0f63595.tar.gz
Removed useless member variable and replaced with var on the stack.
RevBy: Trust me
Diffstat (limited to 'src/gui/inputmethod/qcoefepinputcontext_s60.cpp')
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index e5ab3003a0..56b79f4741 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<QInputMethodEvent::Attribute> 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();