rev 9377 - in trunk/packages/qt4-x11/debian: . patches
Fathi Boudra
fabo at alioth.debian.org
Sat Feb 9 19:55:42 UTC 2008
Author: fabo
Date: 2008-02-09 19:55:42 +0000 (Sat, 09 Feb 2008)
New Revision: 9377
Added:
trunk/packages/qt4-x11/debian/patches/0208-fix-quitools-incompatibility.diff
trunk/packages/qt4-x11/debian/patches/0209-prevent-qt-mixing.diff
trunk/packages/qt4-x11/debian/patches/0210-fix-crash-q3stylesheet-font-size.diff
trunk/packages/qt4-x11/debian/patches/0211-q3action-crash.diff
Modified:
trunk/packages/qt4-x11/debian/changelog
trunk/packages/qt4-x11/debian/patches/0172-prefer-xrandr-over-xinerama.diff
trunk/packages/qt4-x11/debian/patches/0180-window-role.diff
trunk/packages/qt4-x11/debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff
trunk/packages/qt4-x11/debian/patches/series
Log:
* 0208-fix-quitools-incompatibility
This patch removes dependency of QUiTools library on QObjectPrivate.
Since QUiTools is a statically linked library, anything using it could
abort whenever the installed Qt version changes.
* 0209-prevent-qt-mixing
This patch changes QObjectPrivateVersion, thus preventing mixing parts
of upstream Qt and qt-copy.
* 0210-fix-crash-q3stylesheet-font-size
This patch fixes crashs in q3stylesheet
(it was possible to use a qfont size < 1)
* 0211-q3action-crash
During porting qt3to4 port QGroupAction to Q3GroupAction but not QAction
to Q3Action (which is logical) But it crashs when it's not a q3action.
Modified: trunk/packages/qt4-x11/debian/changelog
===================================================================
--- trunk/packages/qt4-x11/debian/changelog 2008-02-09 17:49:13 UTC (rev 9376)
+++ trunk/packages/qt4-x11/debian/changelog 2008-02-09 19:55:42 UTC (rev 9377)
@@ -8,6 +8,19 @@
* 0207-better-xerrorhandler (it isn't enabled)
Better X error handler
It tries harder to find error descriptions and prints qAppName()
+ * 0208-fix-quitools-incompatibility
+ This patch removes dependency of QUiTools library on QObjectPrivate.
+ Since QUiTools is a statically linked library, anything using it could
+ abort whenever the installed Qt version changes.
+ * 0209-prevent-qt-mixing
+ This patch changes QObjectPrivateVersion, thus preventing mixing parts
+ of upstream Qt and qt-copy.
+ * 0210-fix-crash-q3stylesheet-font-size
+ This patch fixes crashs in q3stylesheet
+ (it was possible to use a qfont size < 1)
+ * 0211-q3action-crash
+ During porting qt3to4 port QGroupAction to Q3GroupAction but not QAction
+ to Q3Action (which is logical) But it crashs when it's not a q3action.
* Refresh and enable 0172-prefer-xrandr-over-xinerama patch.
* Add ${shlibs:Depends} to libqt4-dev. See missing shared library
dependencies thread on debian-devel mailing list.
Modified: trunk/packages/qt4-x11/debian/patches/0172-prefer-xrandr-over-xinerama.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0172-prefer-xrandr-over-xinerama.diff 2008-02-09 17:49:13 UTC (rev 9376)
+++ trunk/packages/qt4-x11/debian/patches/0172-prefer-xrandr-over-xinerama.diff 2008-02-09 19:55:42 UTC (rev 9377)
@@ -16,16 +16,24 @@
also includes a race fix that can cause the whole KDE session to crash
when you resize the screen.
+it also includes a fix for a bug that causes the whole KDE session to crash
+when you remove a CRTc.
+
--- a/src/gui/kernel/qdesktopwidget_x11.cpp
+++ b/src/gui/kernel/qdesktopwidget_x11.cpp
-@@ -122,13 +122,16 @@
- int unused;
+@@ -119,28 +119,32 @@
+ // get the screen count
+ #ifndef QT_NO_XINERAMA
+ XineramaScreenInfo *xinerama_screeninfo = 0;
+- int unused;
++ int unused, newScreenCount;
use_xinerama = (XineramaQueryExtension(X11->display, &unused, &unused) && XineramaIsActive(X11->display));
- if (use_xinerama) {
+ if (use_xinerama)
xinerama_screeninfo =
- XineramaQueryScreens(X11->display, &screenCount);
+- XineramaQueryScreens(X11->display, &screenCount);
++ XineramaQueryScreens(X11->display, &newScreenCount);
+
+ if (use_xinerama && xinerama_screeninfo) {
defaultScreen = 0;
@@ -34,20 +42,27 @@
{
+ use_xinerama = false;
defaultScreen = DefaultScreen(X11->display);
- screenCount = ScreenCount(X11->display);
+- screenCount = ScreenCount(X11->display);
++ newScreenCount = ScreenCount(X11->display);
++ use_xinerama = false;
}
-@@ -139,8 +142,8 @@
- workareas = new QRect[screenCount];
+ 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 < screenCount; i++, j++) {
++ for (i = 0, j = 0; i < newScreenCount; i++, j++) {
#ifndef QT_NO_XINERAMA
if (use_xinerama) {
-@@ -157,11 +160,21 @@
+@@ -157,11 +161,29 @@
h = HeightOfScreen(ScreenOfDisplay(X11->display, i));
}
@@ -61,8 +76,16 @@
+ }
workareas[i] = QRect();
}
+
++ 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;
@@ -70,3 +93,13 @@
if (xinerama_screeninfo)
XFree(xinerama_screeninfo);
#endif // QT_NO_XINERAMA
+@@ -209,8 +231,7 @@
+ 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;
+ }
+
Modified: trunk/packages/qt4-x11/debian/patches/0180-window-role.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0180-window-role.diff 2008-02-09 17:49:13 UTC (rev 9376)
+++ trunk/packages/qt4-x11/debian/patches/0180-window-role.diff 2008-02-09 19:55:42 UTC (rev 9377)
@@ -1,9 +1,11 @@
-qt-bugs@ issue : none yet
-Trolltech task ID : none
+qt-bugs@ issue : 167704
+Trolltech task ID : 168283
bugs.kde.org number : none
applied: no
author: Lubos Lunak <l.lunak at kde.org>
+NOTE: It is suggested to apply patch #0209 as well when this patch is used.
+
Hello,
there are several problems with Qt's support for the WM_WINDOW_ROLE property:
Modified: trunk/packages/qt4-x11/debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff 2008-02-09 17:49:13 UTC (rev 9376)
+++ trunk/packages/qt4-x11/debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff 2008-02-09 19:55:42 UTC (rev 9377)
@@ -1,5 +1,5 @@
qt-bugs@ issue : 181399
-Trolltech task ID : 181413 (status: pending for Qt 4.4.0)
+Trolltech task ID : 181413 (status: fixed for Qt 4.4.0)
applied: no
author: Matthias Kretz <kretz at kde.org>
Added: trunk/packages/qt4-x11/debian/patches/0208-fix-quitools-incompatibility.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0208-fix-quitools-incompatibility.diff (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0208-fix-quitools-incompatibility.diff 2008-02-09 19:55:42 UTC (rev 9377)
@@ -0,0 +1,88 @@
+qt-bugs@ issue : none
+Trolltech task ID : none
+bugs.kde.org number : none
+applied: no
+author: Lubos Lunak <l.lunak at kde.org>
+
+http://lists.kde.org/?l=kde-core-devel&m=120168476826132&w=2
+
+This patch removes dependency of QUiTools library on QObjectPrivate. Since
+QUiTools is a statically linked library, anything using it could abort
+whenever the installed Qt version changes.
+
+
+--- a/tools/designer/src/uitools/quiloader.cpp
++++ b/tools/designer/src/uitools/quiloader.cpp
+@@ -57,11 +57,14 @@
+ #include <QToolBox>
+ #include <QComboBox>
+ #include <QFontComboBox>
+-#include <private/qobject_p.h>
+
+ typedef QMap<QString, bool> widget_map;
+ Q_GLOBAL_STATIC(widget_map, g_widgets)
+
++class QUiLoaderPrivate;
++typedef QHash<const QUiLoader*,QUiLoaderPrivate*> d_pointers_hash;
++Q_GLOBAL_STATIC(d_pointers_hash, d_pointers)
++
+ #ifdef QFORMINTERNAL_NAMESPACE
+ namespace QFormInternal
+ {
+@@ -277,9 +280,17 @@
+ }
+ #endif
+
+-class QUiLoaderPrivate: public QObjectPrivate
++/*
++ QtUiTools is statically linked, so it cannot reference Qt internal classes
++ such as QObjectPrivate, as the statically linked version could conflict
++ with the shared Qt version.
++*/
++#undef Q_D
++#define Q_D(Class) Class##Private * const d = d_pointers()->value( this )
++
++
++class QUiLoaderPrivate
+ {
+- Q_DECLARE_PUBLIC(QUiLoader)
+ public:
+ #ifdef QFORMINTERNAL_NAMESPACE
+ QFormInternal::FormBuilderPrivate builder;
+@@ -370,8 +381,9 @@
+ Creates a form loader with the given \a parent.
+ */
+ QUiLoader::QUiLoader(QObject *parent)
+- : QObject(*new QUiLoaderPrivate, parent)
++ : QObject(parent)
+ {
++ d_pointers()->insert( this, new QUiLoaderPrivate );
+ Q_D(QUiLoader);
+
+ d->builder.loader = this;
+@@ -392,6 +404,7 @@
+ */
+ QUiLoader::~QUiLoader()
+ {
++ delete d_pointers()->take( this );
+ }
+
+ /*!
+--- a/tools/designer/src/uitools/quiloader.h
++++ b/tools/designer/src/uitools/quiloader.h
+@@ -49,7 +49,6 @@
+ class QIODevice;
+ class QDir;
+
+-class QUiLoaderPrivate;
+ class QUiLoader : public QObject
+ {
+ Q_OBJECT
+@@ -76,7 +75,6 @@
+ bool isScriptingEnabled() const;
+
+ private:
+- Q_DECLARE_PRIVATE(QUiLoader)
+ Q_DISABLE_COPY(QUiLoader)
+ };
+
Added: trunk/packages/qt4-x11/debian/patches/0209-prevent-qt-mixing.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0209-prevent-qt-mixing.diff (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0209-prevent-qt-mixing.diff 2008-02-09 19:55:42 UTC (rev 9377)
@@ -0,0 +1,28 @@
+qt-bugs@ issue : none
+Trolltech task ID : none
+bugs.kde.org number : none
+applied: no
+author: Lubos Lunak <l.lunak at kde.org>
+
+This patch changes QObjectPrivateVersion, thus preventing mixing
+parts of upstream Qt and qt-copy. In general it is a bad idea to mix
+e.g. libQtCore from one build and libQtGui from another one, and other
+qt-copy patches could make changes in Qt internal structures that could
+cause problems when mixed with upstream Qt.
+
+This patch does not make qt-copy binary incompatible with upstream Qt.
+It only further enforces using the same sources for the whole Qt build.
+
+--- a/src/corelib/kernel/qobject_p.h
++++ b/src/corelib/kernel/qobject_p.h
+@@ -75,7 +75,9 @@
+
+ inline QObjectData::~QObjectData() {}
+
+-enum { QObjectPrivateVersion = QT_VERSION };
++// add 0x1000000 to mark it as qt-copy version, with possible modifications
++// in some Q*Private class
++enum { QObjectPrivateVersion = QT_VERSION + 0x1000000 };
+
+ class Q_CORE_EXPORT QObjectPrivate : public QObjectData
+ {
Added: trunk/packages/qt4-x11/debian/patches/0210-fix-crash-q3stylesheet-font-size.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0210-fix-crash-q3stylesheet-font-size.diff (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0210-fix-crash-q3stylesheet-font-size.diff 2008-02-09 19:55:42 UTC (rev 9377)
@@ -0,0 +1,24 @@
+qt-bugs@ issue : none
+Trolltech task ID : none
+bugs.kde.org number : none
+applied: yes
+author: Montel Laurent <montel at kde.org>
+
+This patch fixes crashs in q3stylesheet (it was possible to
+use a qfont size < 1)
+Bug reported to TT with this patch.
+
+--- a/src/qt3support/text/q3stylesheet.cpp
++++ b/src/qt3support/text/q3stylesheet.cpp
+@@ -1454,9 +1454,9 @@
+ s = baseSize;
+ }
+ if (pixel)
+- font.setPixelSize(s);
++ font.setPixelSize(qMax(1,s));
+ else
+- font.setPointSize(s);
++ font.setPointSize(qMax(1,s));
+ }
+
+ #endif // QT_NO_RICHTEXT
Added: trunk/packages/qt4-x11/debian/patches/0211-q3action-crash.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0211-q3action-crash.diff (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0211-q3action-crash.diff 2008-02-09 19:55:42 UTC (rev 9377)
@@ -0,0 +1,22 @@
+qt-bugs@ issue : 193866
+Trolltech task ID : 193338
+bugs.kde.org number : none
+applied: yes
+author: Montel Laurent <montel at kde.org>
+
+During porting qt3to4 port QGroupAction to Q3GroupAction
+but not QAction to Q3Action (which is logical)
+But it crashs when it's not a q3action.
+Patch from TT.
+
+--- a/src/qt3support/widgets/q3action.cpp
++++ b/src/qt3support/widgets/q3action.cpp
+@@ -1664,7 +1664,7 @@
+ if (d->dropdown) {
+ if (!d->exclusive) {
+ QList<Q3Action*>::Iterator it(d->actions.begin());
+- if (!(*it))
++ if (it == d->actions.end() || !(*it))
+ return true;
+
+ Q3Action *defAction = *it;
Modified: trunk/packages/qt4-x11/debian/patches/series
===================================================================
--- trunk/packages/qt4-x11/debian/patches/series 2008-02-09 17:49:13 UTC (rev 9376)
+++ trunk/packages/qt4-x11/debian/patches/series 2008-02-09 19:55:42 UTC (rev 9377)
@@ -17,6 +17,10 @@
0205-fast-qpixmap-fill.diff
0206-fix-meta-modifier.diff
#0207-better-xerrorhandler.diff
+0208-fix-quitools-incompatibility.diff
+0209-prevent-qt-mixing.diff
+0210-fix-crash-q3stylesheet-font-size.diff
+0211-q3action-crash.diff
# debian patches
01_qmake_for_debian.diff
More information about the pkg-kde-commits
mailing list