diff options
author | Fathi Boudra <fabo@debian.org> | 2008-02-09 19:55:42 +0000 |
---|---|---|
committer | Fathi Boudra <fabo@debian.org> | 2008-02-09 19:55:42 +0000 |
commit | 9b0f7a8ea14e9597c5cede733a2128d7f89fca4a (patch) | |
tree | 3e2c8eb4652cde6f9528008a5f2185ae84d9dfa3 /debian | |
parent | 9355253d735f1583c32e0d35b6735203247eff1d (diff) | |
download | qt4-x11-9b0f7a8ea14e9597c5cede733a2128d7f89fca4a.tar.gz |
* 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.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 13 | ||||
-rw-r--r-- | debian/patches/0172-prefer-xrandr-over-xinerama.diff | 51 | ||||
-rw-r--r-- | debian/patches/0180-window-role.diff | 6 | ||||
-rw-r--r-- | debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff | 2 | ||||
-rw-r--r-- | debian/patches/0208-fix-quitools-incompatibility.diff | 88 | ||||
-rw-r--r-- | debian/patches/0209-prevent-qt-mixing.diff | 28 | ||||
-rw-r--r-- | debian/patches/0210-fix-crash-q3stylesheet-font-size.diff | 24 | ||||
-rw-r--r-- | debian/patches/0211-q3action-crash.diff | 22 | ||||
-rw-r--r-- | debian/patches/series | 4 |
9 files changed, 226 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog index 0beccec..580ca6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,19 @@ qt4-x11 (4.3.3-3) UNRELEASED; urgency=low * 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. diff --git a/debian/patches/0172-prefer-xrandr-over-xinerama.diff b/debian/patches/0172-prefer-xrandr-over-xinerama.diff index a86e186..e34b92e 100644 --- a/debian/patches/0172-prefer-xrandr-over-xinerama.diff +++ b/debian/patches/0172-prefer-xrandr-over-xinerama.diff @@ -16,16 +16,24 @@ this is for "when I have time". 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 @@ when you resize the screen. { + 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 @@ when you resize the screen. + } workareas[i] = QRect(); } -+ screenCount = 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; @@ -70,3 +93,13 @@ when you resize the screen. 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; + } + diff --git a/debian/patches/0180-window-role.diff b/debian/patches/0180-window-role.diff index 80b7e18..b96c470 100644 --- a/debian/patches/0180-window-role.diff +++ b/debian/patches/0180-window-role.diff @@ -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@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: diff --git a/debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff b/debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff index 45d7847..a328396 100644 --- a/debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff +++ b/debian/patches/0194-fix-moveonly-dnd-in-itemviews.diff @@ -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@kde.org> diff --git a/debian/patches/0208-fix-quitools-incompatibility.diff b/debian/patches/0208-fix-quitools-incompatibility.diff new file mode 100644 index 0000000..b6a58da --- /dev/null +++ b/debian/patches/0208-fix-quitools-incompatibility.diff @@ -0,0 +1,88 @@ +qt-bugs@ issue : none +Trolltech task ID : none +bugs.kde.org number : none +applied: no +author: Lubos Lunak <l.lunak@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) + }; + diff --git a/debian/patches/0209-prevent-qt-mixing.diff b/debian/patches/0209-prevent-qt-mixing.diff new file mode 100644 index 0000000..667121a --- /dev/null +++ b/debian/patches/0209-prevent-qt-mixing.diff @@ -0,0 +1,28 @@ +qt-bugs@ issue : none +Trolltech task ID : none +bugs.kde.org number : none +applied: no +author: Lubos Lunak <l.lunak@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 + { diff --git a/debian/patches/0210-fix-crash-q3stylesheet-font-size.diff b/debian/patches/0210-fix-crash-q3stylesheet-font-size.diff new file mode 100644 index 0000000..e789835 --- /dev/null +++ b/debian/patches/0210-fix-crash-q3stylesheet-font-size.diff @@ -0,0 +1,24 @@ +qt-bugs@ issue : none +Trolltech task ID : none +bugs.kde.org number : none +applied: yes +author: Montel Laurent <montel@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 diff --git a/debian/patches/0211-q3action-crash.diff b/debian/patches/0211-q3action-crash.diff new file mode 100644 index 0000000..c6c3785 --- /dev/null +++ b/debian/patches/0211-q3action-crash.diff @@ -0,0 +1,22 @@ +qt-bugs@ issue : 193866 +Trolltech task ID : 193338 +bugs.kde.org number : none +applied: yes +author: Montel Laurent <montel@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; diff --git a/debian/patches/series b/debian/patches/series index e64e560..64173cc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 |