[immodule-qt] Re: SVN is available (again)

LiuCougar liucougar at gmail.com
Mon May 16 04:56:51 EEST 2005


On 5/16/05, LiuCougar <liucougar at gmail.com> wrote:
> our SVN is back:
> 
> anonymous access:
> http://svn.freedesktop.org/immqt/
> 
> developer access:
> svn+ssh://svn.freedesktop.org/svn/immqt/
> 
> Please ask the fd.o admin to move back your home dir if you can not
> login into your account in fd.o.

websvn:
http://cvs.freedesktop.org/immqt/

-- 
"People's characters are strengthened through struggle against
difficulties; they are weakened by comfort."
- Old Chinese adage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
--Boundary-00=_oDEsChmeR743H14
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


 Hello,

 immodule for Qt as shipped in SUSE Linux 9.3 
(qt-x11-immodule-unified-qt3.3.3-20041203.diff) has a bug that causes invalid 
QEvent::KeyRelease events, as demonstrated by the attached testcase.

 The problem seems to be caused by the fact that 
QETWidget::translateKeyEventInternal() does computations only for KeyPress 
events and saves the results for later for the following KeyRelease event. 
The immodule patch however causes that function to be called twice for one X 
KeyRelease event, once in QApplication::x11ProcessEvent(), which uses and 
discards the saved results, and once more from QETWidget::translateKeyEvent() 
(called also from QApplication::x11ProcessEvent()), for which there is no 
information saved anymore and therefore it generates QKeyEvent with invalid 
data.

 The attached patch seems to fix the problem. I have no idea what 
'statefulTranslation' actually means, but that's what distinguishes the first 
call done from QApplication::x11ProcessEvent() from the second call, so I 
used it to avoid discarding the saved data prematurely.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/

--Boundary-00=_oDEsChmeR743H14
Content-Type: text/x-diff; charset="utf-8"; name="qapplication_x11.cpp.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="qapplication_x11.cpp.patch"

--- src/kernel/qapplication_x11.cpp.sav	2005-06-15 15:43:02.000000000 +0200
+++ src/kernel/qapplication_x11.cpp	2005-06-15 16:26:36.000000000 +0200
@@ -5209,11 +5209,12 @@ bool QETWidget::translateKeyEventInterna
     } else {
 	key  	if ( key )
-	    if( !willRepeat ) // Take out key of dictionary only if this call.
+	    if( !willRepeat && statefulTranslation ) // Take out key of dictionary only if this call.
 		keyDict->take( keycode );
 	long s  	if ( s ) {
-	    textDict->take( keycode );
+            if( statefulTranslation )
+		textDict->take( keycode );
 	    ascii  	}
     }

--Boundary-00=_oDEsChmeR743H14
Content-Type: application/x-tgz;
  name="keyreleaseerror.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="keyreleaseerror.tar.gz"

H4sIAGs7sEIAA+0b+3vaOLK/4r9iNtvtGhoMhpBcSdNvCSEpW2hIoNvsXe/LGluAL34Q25BkH/e3
34wkPyA02d416fUOfSm2pHlpNJoZSa5hOr55UXrykKWMZadWw2eltqXv8Lq+tcWfsjzRqa9crdWq
20/Kul6rlp9A7UGlkmUWRkYA8MRxZp5xcRccC8LHEOhxiyHmv2tcsJHtsAfhQRO8zed75fxv6zV9
af6r+k71CZQfRJql8n8+/99+zqJ8C7EhwcgPYDizHcv2xnUQZob9R8xjgRExC4Y3cOkiNKi6Vt4x
8qCeRFDVqtpWHnyvDu8R5seZB3oN9O165UW9VoZKuVxDIr3A/wczozpIuto08LF5wNypg7SR3XSK
9abvuoZn1eGpetJtvGnloeinAmZRP6sSYnLEf4qcgk2IfN8JAWUBfxrZvhcqSrMJouzB2DSV5tlZ
Un3+XOm0kurIYdfKzw0Jvwc3BoEfdhpHfV4vTu0pg+JxBYquEZiTPbv2l218N6ezPXubXkcuC0Nj
zIoO88bRZK8MxfeG4yS//xYyFA9OBudvj88PWvvvjkSt/7px2joQ74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