Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > cc8f970be8f3f9d917634bf75d52343e > files > 29

qt3-3.3.4-23mdk.src.rpm

--- qt-x11-free-3.0.5/src/kernel/qinputcontext_x11.cpp__	2002-08-28 21:41:24.000000000 +0200
+++ qt-x11-free-3.0.5/src/kernel/qinputcontext_x11.cpp	2002-08-28 21:43:25.000000000 +0200
@@ -385,12 +385,12 @@
 
 #if !defined(QT_NO_XIM)
     if (qt_xim && ic) {
-	count = XmbLookupString((XIC) ic, event, chars.data(),
+	count = Xutf8LookupString((XIC) ic, event, chars.data(),
 				chars.size(), key, status);
 
 	if ((*status) == XBufferOverflow ) {
 	    chars.resize(count + 1);
-	    count = XmbLookupString((XIC) ic, event, chars.data(),
+	    count = Xutf8LookupString((XIC) ic, event, chars.data(),
 				    chars.size(), key, status);
 	}
     }
--- qt-x11-free-3.0.5/src/kernel/qapplication_x11.cpp__	2002-08-28 21:41:30.000000000 +0200
+++ qt-x11-free-3.0.5/src/kernel/qapplication_x11.cpp	2002-08-28 22:05:19.000000000 +0200
@@ -5173,6 +5173,16 @@
 	}
 	if ( key )
 	    keyDict->replace( keycode, (void*)key );
+	if ( key >= 0x1000000 && key <= 0x100ffff ) {
+	    converted = (ushort) (key - 0x1000000);
+	    mapper = 0;
+	} else {
+// we use Xutf8LookupString, so we already have utf-8 strings,
+// so we know mapper is always UTF-8 -- pablo
+	mapper = QTextCodec::codecForName("UTF-8");
+	}
+// we don't need to find the mapper, we know it is utf-8 -- pablo
+#if 0	
 	// all keysyms smaller than that are actally keys that can be mapped
 	// to unicode chars
 	if ( count == 0 && key < 0xff00 ) {
@@ -5224,6 +5234,8 @@
 	    converted = (ushort) (key - 0x1000000);
 	    mapper = 0;
 	}
+// -- pablo
+#endif	
 	if ( count < (int)chars.size()-1 )
 	    chars[count] = '\0';
 	if ( count == 1 ) {