SOURCES: 0076-fix-qprocess.diff, 0077-utf8-decoder-fixes.diff, 008...

arekm arekm at pld-linux.org
Thu Apr 3 23:15:02 CEST 2008


Author: arekm                        Date: Thu Apr  3 21:15:02 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new fixes

---- Files affected:
SOURCES:
   0076-fix-qprocess.diff (1.1 -> 1.2) , 0077-utf8-decoder-fixes.diff (1.1 -> 1.2) , 0081-format-string-fixes.diff (1.1 -> 1.2) , 0084-compositing-properties.patch (NONE -> 1.1)  (NEW), 0085-fix-buildkey.diff (NONE -> 1.1)  (NEW), 0086-revert-qt-khmer-fix.diff (NONE -> 1.1)  (NEW), 0087-use-xrandr-1.2.diff (NONE -> 1.1)  (NEW), 0088-fix-xinput-clash.diff (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/0076-fix-qprocess.diff
diff -u SOURCES/0076-fix-qprocess.diff:1.1 SOURCES/0076-fix-qprocess.diff:1.2
--- SOURCES/0076-fix-qprocess.diff:1.1	Thu Mar 29 18:30:46 2007
+++ SOURCES/0076-fix-qprocess.diff	Thu Apr  3 23:14:57 2008
@@ -1,6 +1,6 @@
 qt-bugs@ issue : none
 bugs.kde.org number : none
-applied: no
+applied: yes
 author: from trolltech
 
 Fixes a regression in QProgress::writeToStdin()

================================================================
Index: SOURCES/0077-utf8-decoder-fixes.diff
diff -u SOURCES/0077-utf8-decoder-fixes.diff:1.1 SOURCES/0077-utf8-decoder-fixes.diff:1.2
--- SOURCES/0077-utf8-decoder-fixes.diff:1.1	Thu Mar 29 18:30:46 2007
+++ SOURCES/0077-utf8-decoder-fixes.diff	Thu Apr  3 23:14:57 2008
@@ -1,6 +1,6 @@
 qt-bugs@ issue : N154454
 bugs.kde.org number : none
-applied: no
+applied: yes
 author: Dirk Mueller <mueller at kde.org>
 
 This patch makes the utf8 decoders in Qt reject overlong

================================================================
Index: SOURCES/0081-format-string-fixes.diff
diff -u SOURCES/0081-format-string-fixes.diff:1.1 SOURCES/0081-format-string-fixes.diff:1.2
--- SOURCES/0081-format-string-fixes.diff:1.1	Tue Jul 31 09:29:51 2007
+++ SOURCES/0081-format-string-fixes.diff	Thu Apr  3 23:14:57 2008
@@ -1,6 +1,6 @@
 qt-bugs@ issue : none
 bugs.kde.org number : none
-applied: no
+applied: yes
 author: Dirk Mueller/TT
 
 Fixes various, partially exploitable format string errors on Qt 3.x code base.

================================================================
Index: SOURCES/0084-compositing-properties.patch
diff -u /dev/null SOURCES/0084-compositing-properties.patch:1.1
--- /dev/null	Thu Apr  3 23:15:02 2008
+++ SOURCES/0084-compositing-properties.patch	Thu Apr  3 23:14:57 2008
@@ -0,0 +1,80 @@
+qt-bugs@ issue : none
+bugs.kde.org number : none
+applied: no
+author: Lubos Lunak <l.lunak at kde.org>
+
+This patch makes override-redirect windows (popup menu, dropdown menu,
+tooltip, combobox, etc.) also have more window properties like WM_CLASS,
+so they can be used when compositing.
+
+--- src/kernel/qwidget_x11.cpp.sav	2007-06-25 10:36:42.000000000 +0200
++++ src/kernel/qwidget_x11.cpp	2007-10-02 15:30:13.000000000 +0200
+@@ -557,7 +557,10 @@ void QWidget::create( WId window, bool i
+ 	wsa.save_under = True;
+ 	XChangeWindowAttributes( dpy, id, CWOverrideRedirect | CWSaveUnder,
+ 				 &wsa );
+-	x11SetWindowType();
++	XClassHint class_hint;
++	class_hint.res_name = (char *) qAppName(); // application name
++	class_hint.res_class = (char *) qAppClass();	// application class
++        XSetClassHint( dpy, id, &class_hint );
+     } else if ( topLevel && !desktop ) {	// top-level widget
+ 	QWidget *p = parentWidget();	// real parent
+ 	if (p)
+@@ -620,8 +623,6 @@ void QWidget::create( WId window, bool i
+         else
+             XDeleteProperty(dpy, id, qt_xa_motif_wm_hints);
+ 
+-	x11SetWindowType();
+-
+ 	// set _NET_WM_WINDOW_STATE
+ 	if (curr_winstate > 0)
+ 	    XChangeProperty(dpy, id, qt_net_wm_state, XA_ATOM, 32, PropModeReplace,
+@@ -629,11 +630,6 @@ void QWidget::create( WId window, bool i
+         else
+             XDeleteProperty(dpy, id, qt_net_wm_state);
+ 
+-	// set _NET_WM_PID
+-	long curr_pid = getpid();
+-	XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace,
+-			(unsigned char *) &curr_pid, 1);
+-
+ #ifndef QT_NO_XSYNC
+         // set _NET_WM_SYNC_COUNTER
+         createSyncCounter();
+@@ -645,19 +641,31 @@ void QWidget::create( WId window, bool i
+ 	// when we create a toplevel widget, the frame strut should be dirty
+ 	fstrut_dirty = 1;
+ 
++    } else {
++	// non-toplevel widgets don't have a frame, so no need to
++	// update the strut
++	fstrut_dirty = 0;
++    }
++
++    if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
++	x11SetWindowType();
++
++	// set _NET_WM_PID
++	long curr_pid = getpid();
++	XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace,
++			(unsigned char *) &curr_pid, 1);
++
+ 	// declare the widget's object name as window role
+ 	XChangeProperty( dpy, id,
+ 			 qt_window_role, XA_STRING, 8, PropModeReplace,
+ 			 (unsigned char *)name(), qstrlen( name() ) );
+ 
+ 	// set client leader property
++	if ( !qt_x11_wm_client_leader )
++	    qt_x11_create_wm_client_leader();
+ 	XChangeProperty( dpy, id, qt_wm_client_leader,
+ 			 XA_WINDOW, 32, PropModeReplace,
+ 			 (unsigned char *)&qt_x11_wm_client_leader, 1 );
+-    } else {
+-	// non-toplevel widgets don't have a frame, so no need to
+-	// update the strut
+-	fstrut_dirty = 0;
+     }
+ 
+     if ( initializeWindow ) {

================================================================
Index: SOURCES/0085-fix-buildkey.diff
diff -u /dev/null SOURCES/0085-fix-buildkey.diff:1.1
--- /dev/null	Thu Apr  3 23:15:02 2008
+++ SOURCES/0085-fix-buildkey.diff	Thu Apr  3 23:14:57 2008
@@ -0,0 +1,30 @@
+qt-bugs@ issue : 
+bugs.kde.org number :
+applied: no
+author: Dirk Mueller <mueller at kde.org>
+
+gcc 4.3 produces a "3.*" buildkey. That's oh so wrong.
+
+
+--- configure
++++ configure
+@@ -3140,15 +3140,15 @@ case "$COMPILER" in
+ g++*)
+     # GNU C++
+     QMAKE_CONF_COMPILER=`grep "QMAKE_CXX[^_A-Z0-9a-z]" $QMAKESPEC/qmake.conf | sed "s,.* *= *\(.*\)$,\1,"`
+-    COMPILER_VERSION=`${QMAKE_CONF_COMPILER} --version 2>/dev/null`
++    COMPILER_VERSION=`${QMAKE_CONF_COMPILER} --version 2>/dev/null | sed 's,^[^0-9]*,,g'`
+     case "$COMPILER_VERSION" in
+-    *2.95.*)
++    2.95.*)
+ 	COMPILER_VERSION="2.95.*"
+ 	;;
+-    *3.*)
++    3.*)
+ 	COMPILER_VERSION="3.*"
+ 	;;
+-    *4.*)
++    4.*)
+ 	COMPILER_VERSION="4"
+ 	;;
+     *)

================================================================
Index: SOURCES/0086-revert-qt-khmer-fix.diff
diff -u /dev/null SOURCES/0086-revert-qt-khmer-fix.diff:1.1
--- /dev/null	Thu Apr  3 23:15:02 2008
+++ SOURCES/0086-revert-qt-khmer-fix.diff	Thu Apr  3 23:14:57 2008
@@ -0,0 +1,40 @@
+qt-bugs@ issue : 
+bugs.kde.org number : 
+applied: no
+author: Dirk Mueller <mueller at kde.org>
+
+according to bug 345459, this fix for stacking letters from 3.3.8 
+made it only a lot worse. revert.
+
+
+--- src/kernel/qfontengine_x11.cpp	
++++ src/kernel/qfontengine_x11.cpp	
+@@ -2672,23 +2655,16 @@ bool QOpenType::positionAndAdd(QShaperIt
+             // ###### fix the case where we have y advances. How do we handle this in Uniscribe?????
+             if (positions[i].new_advance) {
+                 item->advances[i] = item->flags & QTextEngine::RightToLeft
+-                                    ? -qRound((positions[i].x_advance >> 6)*scale)
++                                    ? -qRound((positions[i].x_advance >> 6)*scale) 
+                                     :  qRound((positions[i].x_advance >> 6)*scale);
+             } else {
+                 item->advances[i] += item->flags & QTextEngine::RightToLeft
+-                                     ? -qRound((positions[i].x_advance >> 6)*scale)
++                                     ? -qRound((positions[i].x_advance >> 6)*scale) 
+                                      :  qRound((positions[i].x_advance >> 6)*scale);
+             }
+-            int back = 0;
+-	  item->offsets[i].x = qRound((positions[i].x_pos >> 6)*scale);
+-	  item->offsets[i].y = qRound((positions[i].y_pos >> 6)*scale);
+-            while (positions[i-back].back) {
+-                back += positions[i - back].back;
+-                item->offsets[i].x += qRound((positions[i - back].x_pos >> 6)*scale);
+-	      item->offsets[i].y += qRound((positions[i - back].y_pos >> 6)*scale);
+-            }
+-	  item->offsets[i].y = -item->offsets[i].y;
+-            back = positions[i].back;
++	    item->offsets[i].x = qRound((positions[i].x_pos >> 6)*scale);
++	    item->offsets[i].y = -qRound((positions[i].y_pos >> 6)*scale);
++            int back = positions[i].back;
+             if (item->flags & QTextEngine::RightToLeft) {
+                 while (back--) {
+                     item->offsets[i].x -= item->advances[i-back];

================================================================
Index: SOURCES/0087-use-xrandr-1.2.diff
diff -u /dev/null SOURCES/0087-use-xrandr-1.2.diff:1.1
--- /dev/null	Thu Apr  3 23:15:02 2008
+++ SOURCES/0087-use-xrandr-1.2.diff	Thu Apr  3 23:14:57 2008
@@ -0,0 +1,107 @@
+qt-bugs@ issue :
+bugs.kde.org number :
+applied: no
+author: Dirk Mueller <mueller at kde.org>
+
+support xrandr 1.2 configurations. same patch like for trunk qt-copy,
+please see there for details.
+
+
+--- src/kernel/qdesktopwidget_x11.cpp
++++ src/kernel/qdesktopwidget_x11.cpp
+@@ -107,7 +107,7 @@ QDesktopWidgetPrivate::~QDesktopWidgetPr
+ 	    screens[i] = 0;
+ 	}
+ 
+-	delete [] screens;
++	free(screens);
+     }
+ 
+     if ( rects )     delete [] rects;
+@@ -117,6 +117,8 @@ QDesktopWidgetPrivate::~QDesktopWidgetPr
+ void QDesktopWidgetPrivate::init()
+ {
+     // get the screen count
++    int newScreenCount;
++
+ #ifndef QT_NO_XINERAMA
+     XineramaScreenInfo *xinerama_screeninfo = 0;
+     int unused;
+@@ -126,23 +128,26 @@ void QDesktopWidgetPrivate::init()
+ 
+     if (use_xinerama) {
+ 	xinerama_screeninfo =
+-	    XineramaQueryScreens(QPaintDevice::x11AppDisplay(), &screenCount);
++	    XineramaQueryScreens(QPaintDevice::x11AppDisplay(), &newScreenCount);
++
++    if (xinerama_screeninfo)
+ 	defaultScreen = 0;
+     } else
+ #endif // QT_NO_XINERAMA
+     {
+ 	defaultScreen = DefaultScreen(QPaintDevice::x11AppDisplay());
+-	screenCount = ScreenCount(QPaintDevice::x11AppDisplay());
++	newScreenCount = ScreenCount(QPaintDevice::x11AppDisplay());
++        use_xinerama = false;
+     }
+ 
+     delete [] rects;
+-    rects     = new QRect[ screenCount ];
++    rects     = new QRect[ newScreenCount ];
+     delete [] workareas;
+-    workareas = new QRect[ screenCount ];
++    workareas = new QRect[ newScreenCount ];
+ 
+     // get the geometry of each screen
+-    int i, x, y, w, h;
+-    for ( i = 0; i < screenCount; i++ ) {
++    int i, j, x, y, w, h;
++    for ( i = 0, j = 0; i < newScreenCount; i++ ) {
+ 
+ #ifndef QT_NO_XINERAMA
+ 	if (use_xinerama) {
+@@ -159,11 +164,33 @@ void QDesktopWidgetPrivate::init()
+ 		h = HeightOfScreen(ScreenOfDisplay(QPaintDevice::x11AppDisplay(), i));
+ 	    }
+ 
+-	rects[i].setRect(x, y, w, h);
+ 	workareas[i] = QRect();
++	rects[j].setRect(x, y, w, h);
++
++        // overlapping?
++        if (j > 0 && rects[j-1].intersects(rects[j])) {
++            // pick the bigger one, ignore the other
++            if ((rects[j].width()*rects[j].height()) >
++                (rects[j-1].width()*rects[j-1].height()))
++            rects[j-1] = rects[j];
++        }
++        else
++            j++;
+     }
+ 
++    if (screens) {
++        // leaks QWidget* pointers on purpose, can't delete them as pointer escapes
++        screens = (QWidget**) realloc(screens, j * sizeof(QWidget*));
++        if (j > screenCount)
++            memset(&screens[screenCount], 0, (j-screenCount) * sizeof(QWidget*));
++    }
++
++    screenCount = j;
++
+ #ifndef QT_NO_XINERAMA
++    if (use_xinerama && screenCount == 1)
++        use_xinerama = false;
++
+     if (xinerama_screeninfo)
+ 	XFree(xinerama_screeninfo);
+ #endif // QT_NO_XINERAMA
+@@ -216,8 +243,7 @@ QWidget *QDesktopWidget::screen( int scr
+ 	screen = d->defaultScreen;
+ 
+     if ( ! d->screens ) {
+-	d->screens = new QWidget*[ d->screenCount ];
+-	memset( d->screens, 0, d->screenCount * sizeof( QWidget * ) );
++	d->screens = (QWidget**) calloc( d->screenCount, sizeof(QWidget*));
+ 	d->screens[ d->defaultScreen ] = this;
+     }
+ 

================================================================
Index: SOURCES/0088-fix-xinput-clash.diff
diff -u /dev/null SOURCES/0088-fix-xinput-clash.diff:1.1
--- /dev/null	Thu Apr  3 23:15:02 2008
+++ SOURCES/0088-fix-xinput-clash.diff	Thu Apr  3 23:14:57 2008
@@ -0,0 +1,55 @@
+qt-bugs@ issue :
+bugs.kde.org number :
+applied: no
+author: Dirk Mueller <mueller at kde.org>
+
+fix compile errors with newer X.org
+
+--- include/private/qt_x11_p.h
++++ include/private/qt_x11_p.h
+@@ -86,7 +86,7 @@
+ 
+ 
+ // the wacom tablet (currently just the IRIX version)
+-#if defined (QT_TABLET_SUPPORT)
++#if defined (QT_TABLET_SUPPORT) && defined (QT_CLEAN_NAMESPACE)
+ #  include <X11/extensions/XInput.h>
+ #if defined (Q_OS_IRIX)
+ #  include <wacom.h>  // wacom driver defines for IRIX (quite handy)
+--- src/kernel/qtaddons_x11.cpp
++++ src/kernel/qtaddons_x11.cpp
+@@ -22,6 +22,10 @@
+  * PERFORMANCE OF THIS SOFTWARE.
+  */
+ 
++#ifndef QT_CLEAN_NAMESPACE
++#define QT_CLEAN_NAMESPACE
++#endif
++
+ #include "qt_x11_p.h"
+ 
+ #if !defined(QT_NO_XFTFREETYPE) && !defined(QT_XFT2)
+--- src/kernel/qt_x11_p.h
++++ src/kernel/qt_x11_p.h
+@@ -86,7 +86,7 @@
+ 
+ 
+ // the wacom tablet (currently just the IRIX version)
+-#if defined (QT_TABLET_SUPPORT)
++#if defined (QT_TABLET_SUPPORT) && defined (QT_CLEAN_NAMESPACE)
+ #  include <X11/extensions/XInput.h>
+ #if defined (Q_OS_IRIX)
+ #  include <wacom.h>  // wacom driver defines for IRIX (quite handy)
+--- src/kernel/qwidget_x11.cpp
++++ src/kernel/qwidget_x11.cpp
+@@ -38,6 +38,10 @@
+ **
+ **********************************************************************/
+ 
++#ifndef QT_CLEAN_NAMESPACE
++#define QT_CLEAN_NAMESPACE
++#endif
++
+ #include "qapplication.h"
+ #include "qapplication_p.h"
+ #include "qnamespace.h"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/0076-fix-qprocess.diff?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/0077-utf8-decoder-fixes.diff?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/0081-format-string-fixes.diff?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list