Commit e3237deee07ec6961b905800d29b1a80f0f63595
Removed useless member variable and replaced with var on the stack.
RevBy: Trust me
| |   |
| 151 | 151 | int m_inlinePosition; |
| 152 | 152 | MFepInlineTextFormatRetriever *m_formatRetriever; |
| 153 | 153 | MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler; |
| int m_longPress; |
| 155 | 154 | int m_cursorPos; |
| 156 | 155 | QBasicTimer m_tempPreeditStringTimeout; |
| 157 | 156 | bool m_hasTempPreeditString; |
| |   |
| 71 | 71 | m_inlinePosition(0), |
| 72 | 72 | m_formatRetriever(0), |
| 73 | 73 | m_pointerHandler(0), |
| m_longPress(0), |
| 75 | 74 | m_cursorPos(0), |
| 76 | 75 | m_hasTempPreeditString(false) |
| 77 | 76 | { |
| … | … | |
| 743 | 743 | |
| 744 | 744 | void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian) |
| 745 | 745 | { |
| int longPress = 0; |
|
| 746 | 748 | if (m_preeditString.size() == 0) { |
| 747 | 749 | QWidget *w = focusWidget(); |
| 748 | 750 | if (triggeredBySymbian && w) { |
| 749 | 751 | // We must replace the last character only if the input box has already accepted one |
| 750 | 752 | if (w->inputMethodQuery(Qt::ImCursorPosition).toInt() != m_cursorPos) |
| m_longPress = 1; |
| longPress = 1; |
| 752 | 754 | } |
| 753 | 755 | return; |
| 754 | 756 | } |
| 755 | 757 | |
| 756 | 758 | QList<QInputMethodEvent::Attribute> attributes; |
| 757 | 759 | QInputMethodEvent event(QLatin1String(""), attributes); |
| event.setCommitString(m_preeditString, 0-m_longPress, m_longPress); |
| event.setCommitString(m_preeditString, 0-longPress, longPress); |
| 759 | 761 | m_preeditString.clear(); |
| 760 | 762 | sendEvent(event); |
| 761 | 763 | |
| 762 | 764 | m_hasTempPreeditString = false; |
| m_longPress = 0; |
| longPress = 0; |
| 764 | 766 | |
| 765 | 767 | if (!triggeredBySymbian) { |
| 766 | 768 | CCoeFep* fep = CCoeEnv::Static()->Fep(); |