packages: qt4/qt4-git.patch, qt4/qt4.spec - rel 3; one more git fix
arekm
arekm at pld-linux.org
Wed Dec 23 21:13:06 CET 2009
Author: arekm Date: Wed Dec 23 20:13:06 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 3; one more git fix
---- Files affected:
packages/qt4:
qt4-git.patch (1.2 -> 1.3) , qt4.spec (1.235 -> 1.236)
---- Diffs:
================================================================
Index: packages/qt4/qt4-git.patch
diff -u packages/qt4/qt4-git.patch:1.2 packages/qt4/qt4-git.patch:1.3
--- packages/qt4/qt4-git.patch:1.2 Tue Dec 22 13:44:20 2009
+++ packages/qt4/qt4-git.patch Wed Dec 23 21:13:01 2009
@@ -224,3 +224,95 @@
if (defaultScreen >= 0 && defaultScreen != xinfo.screen()) {
QX11InfoData* xd = xinfo.getX11Data(true);
xd->screen = defaultScreen;
+commit 05eacd9ad40f8adb5aaa12a8b90113a73b43f642
+Author: Jouni Hiltunen <jouni.hiltunen at digia.com>
+Date: Tue Nov 3 13:50:49 2009 +0200
+
+ Long-press shortcuts for symbols on QWERTY keyboard don't work
+
+ Qt key event was not handled properly in the case of long key press.
+ With long key press, QCoeFepInputContext::commitCurrentString gets
+ called 3 times("q", "", "1"). (Normal key press is causing one call).
+
+ This is how aknfep works, so commitCurrentString was modified
+ to replace first character if long key press event detected.
+ E.g. "q" is replaced with "1".
+
+ qlinecontrol modified to keep cursor position correct.
+
+ Signed-off-by: axis <qt-info at nokia.com>
+
+diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h
+index 452aa75..28c1c67 100644
+--- a/src/gui/inputmethod/qcoefepinputcontext_p.h
++++ b/src/gui/inputmethod/qcoefepinputcontext_p.h
+@@ -146,6 +146,8 @@ private:
+ int m_inlinePosition;
+ MFepInlineTextFormatRetriever *m_formatRetriever;
+ MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler;
++ int m_longPress;
++ int m_cursorPos;
+ };
+
+ QT_END_NAMESPACE
+diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+index ea5e29b..ceace4a 100644
+--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
++++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+@@ -71,7 +71,9 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
+ m_cursorVisibility(1),
+ m_inlinePosition(0),
+ m_formatRetriever(0),
+- m_pointerHandler(0)
++ m_pointerHandler(0),
++ m_longPress(0),
++ m_cursorPos(0)
+ {
+ m_fepState->SetObjectProvider(this);
+ m_fepState->SetFlags(EAknEditorFlagDefault);
+@@ -488,6 +490,8 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText,
+
+ m_isEditing = true;
+
++ m_cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt();
++
+ QList<QInputMethodEvent::Attribute> attributes;
+
+ m_cursorVisibility = aCursorVisibility ? 1 : 0;
+@@ -691,15 +695,22 @@ void QCoeFepInputContext::DoCommitFepInlineEditL()
+ void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian)
+ {
+ 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;
++ }
+ return;
+ }
+
+ QList<QInputMethodEvent::Attribute> attributes;
+ QInputMethodEvent event(QLatin1String(""), attributes);
+- event.setCommitString(m_preeditString, 0, 0);//m_preeditString.size());
++ event.setCommitString(m_preeditString, 0-m_longPress, m_longPress);
+ m_preeditString.clear();
+ sendEvent(event);
+
++ m_longPress = 0;
+ m_isEditing = false;
+
+ if (!triggeredBySymbian) {
+diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
+index 2914164..300a2ea 100644
+--- a/src/gui/widgets/qlinecontrol.cpp
++++ b/src/gui/widgets/qlinecontrol.cpp
+@@ -414,7 +414,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event)
+
+
+ int c = m_cursor; // cursor position after insertion of commit string
+- if (event->replacementStart() <= 0)
++ if (event->replacementStart() == 0)
+ c += event->commitString().length() + qMin(-event->replacementStart(), event->replacementLength());
+
+ m_cursor += event->replacementStart();
================================================================
Index: packages/qt4/qt4.spec
diff -u packages/qt4/qt4.spec:1.235 packages/qt4/qt4.spec:1.236
--- packages/qt4/qt4.spec:1.235 Tue Dec 22 13:44:20 2009
+++ packages/qt4/qt4.spec Wed Dec 23 21:13:01 2009
@@ -77,7 +77,7 @@
Summary(pt_BR.UTF-8): Estrutura para rodar aplicações GUI Qt
Name: qt4
Version: 4.6.0
-Release: 4
+Release: 5
License: LGPL v2.1 or GPL v3.0
Group: X11/Libraries
Source0: http://download.qt.nokia.com/qt/source/qt-everywhere-opensource-src-%{version}.tar.gz
@@ -2257,6 +2257,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.236 2009/12/23 20:13:01 arekm
+- rel 3; one more git fix
+
Revision 1.235 2009/12/22 12:44:20 arekm
- rel 4; few important fixes from upstream
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/qt4/qt4-git.patch?r1=1.2&r2=1.3&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/qt4/qt4.spec?r1=1.235&r2=1.236&f=u
More information about the pld-cvs-commit
mailing list