From 52ef45e79ab9ed82f2a10cb5be7276dad9bb49ba Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Wed, 28 Mar 2012 17:33:54 +0200 Subject: [PATCH] adapt patches --- qt-4.8.1-webkit-no_Werror.patch | 12 +++ ...pensource-src-4.8.0-QUrl_toLocalFile.patch | 13 --- ...re-opensource-src-4.8.0-filter_event.patch | 98 ------------------- qt.spec | 14 +-- webkit-qtwebkit-2.2-no_Werror.patch | 12 --- 5 files changed, 13 insertions(+), 136 deletions(-) create mode 100644 qt-4.8.1-webkit-no_Werror.patch delete mode 100644 qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch delete mode 100644 qt-everywhere-opensource-src-4.8.0-filter_event.patch delete mode 100644 webkit-qtwebkit-2.2-no_Werror.patch diff --git a/qt-4.8.1-webkit-no_Werror.patch b/qt-4.8.1-webkit-no_Werror.patch new file mode 100644 index 0000000..ef5d55d --- /dev/null +++ b/qt-4.8.1-webkit-no_Werror.patch @@ -0,0 +1,12 @@ +diff -up qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/WebKit.pri.no_Werror qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/WebKit.pri +--- qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/WebKit.pri.no_Werror 2012-03-14 15:01:29.000000000 +0100 ++++ qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/Source/WebKit.pri 2012-03-28 17:12:33.391294004 +0200 +@@ -102,8 +102,6 @@ CONFIG -= warn_on + + # Treat warnings as errors on x86/Linux/GCC + linux-g++* { +- !CONFIG(standalone_package):isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror +- + greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) { + if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) { + # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr). diff --git a/qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch b/qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch deleted file mode 100644 index 1c666db..0000000 --- a/qt-everywhere-opensource-src-4.8.0-QUrl_toLocalFile.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.8.0/src/corelib/io/qurl.cpp.toLocalFile qt-everywhere-opensource-src-4.8.0/src/corelib/io/qurl.cpp ---- qt-everywhere-opensource-src-4.8.0/src/corelib/io/qurl.cpp.toLocalFile 2011-10-03 22:44:32.000000000 -0500 -+++ qt-everywhere-opensource-src-4.8.0/src/corelib/io/qurl.cpp 2011-10-27 12:58:35.706815049 -0500 -@@ -6158,7 +6158,8 @@ QUrl QUrl::fromLocalFile(const QString & - QString QUrl::toLocalFile() const - { - // the call to isLocalFile() also ensures that we're parsed -- if (!isLocalFile()) -+ // Treat URLs with no scheme as local for backward compatibility -+ if (!isLocalFile() && (!d || !d->scheme.isEmpty())) - return QString(); - - QString tmp; diff --git a/qt-everywhere-opensource-src-4.8.0-filter_event.patch b/qt-everywhere-opensource-src-4.8.0-filter_event.patch deleted file mode 100644 index b03cdbe..0000000 --- a/qt-everywhere-opensource-src-4.8.0-filter_event.patch +++ /dev/null @@ -1,98 +0,0 @@ ---- qt-opensource-4.8.0.old/src/gui/kernel/qapplication_x11.cpp 2011-12-16 03:22:33.918428374 -0500 -+++ qt-opensource-4.8.0.new/src/gui/kernel/qapplication_x11.cpp 2012-01-07 18:18:40.258246384 -0500 -@@ -4244,7 +4205,12 @@ bool QETWidget::translateMouseEvent(cons - && (nextEvent.xclient.message_type == ATOM(_QT_SCROLL_DONE) || - (nextEvent.xclient.message_type == ATOM(WM_PROTOCOLS) && - (Atom)nextEvent.xclient.data.l[0] == ATOM(_NET_WM_SYNC_REQUEST))))) { -- qApp->x11ProcessEvent(&nextEvent); -+ // As we may run through a significant number of a large class of non-MotionNotify -+ // events here, without returning to the event loop, first pass nextEvent to -+ // QAbstractEventDispatcher::filterEvent() to allow applications which override -+ // QAbstractEventDispatcher::filterEvent() to handle the event first. -+ if (!QAbstractEventDispatcher::instance()->filterEvent(&nextEvent)) -+ qApp->x11ProcessEvent(&nextEvent); - continue; - } else if (nextEvent.type != MotionNotify || - nextEvent.xmotion.window != event->xmotion.window || ---- qt-opensource-4.8.0.old/src/gui/kernel/qclipboard_x11.cpp 2011-12-08 00:06:02.000000000 -0500 -+++ qt-opensource-4.8.0.new/src/gui/kernel/qclipboard_x11.cpp 2012-01-07 18:30:35.298287639 -0500 -@@ -573,7 +573,11 @@ bool QX11Data::clipboardWaitForEvent(Win - - // process other clipboard events, since someone is probably requesting data from us - XEvent e; -- if (XCheckIfEvent(X11->display, &e, checkForClipboardEvents, 0)) -+ // Some applications may override QAbstractEventDispatcher::filterEvent(), so -+ // pass event to QAbstractEventDispatcher::filterEvent() before processing in -+ // x11ProcessEvent(). -+ if (XCheckIfEvent(X11->display, &e, checkForClipboardEvents, 0) && -+ !QAbstractEventDispatcher::instance()->filterEvent(&e)) - qApp->x11ProcessEvent(&e); - - now.start(); ---- qt-opensource-4.8.0.old/src/gui/kernel/qdnd_x11.cpp 2011-12-08 00:06:02.000000000 -0500 -+++ qt-opensource-4.8.0.new/src/gui/kernel/qdnd_x11.cpp 2012-01-07 18:28:13.841279478 -0500 -@@ -42,6 +42,7 @@ - #include "qplatformdefs.h" - - #include "qapplication.h" -+#include "qabstracteventdispatcher.h" - - #ifndef QT_NO_DRAGANDDROP - -@@ -1941,7 +1942,11 @@ Qt::DropAction QDragManager::drag(QDrag - timer.start(); - do { - XEvent event; -- if (XCheckTypedEvent(X11->display, ClientMessage, &event)) -+ // Some applications may override QAbstractEventDispatcher::filterEvent(), so -+ // pass event to QAbstractEventDispatcher::filterEvent() before processing in -+ // x11ProcessEvent(). -+ if (XCheckTypedEvent(X11->display, ClientMessage, &event) && -+ !QAbstractEventDispatcher::instance()->filterEvent(&event)) - qApp->x11ProcessEvent(&event); - - // sleep 50 ms, so we don't use up CPU cycles all the time. ---- qt-opensource-4.8.0.old/src/gui/kernel/qwidget_x11.cpp 2011-12-08 00:06:02.000000000 -0500 -+++ qt-opensource-4.8.0.new/src/gui/kernel/qwidget_x11.cpp 2012-01-07 18:29:26.286283657 -0500 -@@ -44,6 +44,7 @@ - #include "qdesktopwidget.h" - #include "qapplication.h" - #include "qapplication_p.h" -+#include "qabstracteventdispatcher.h" - #include "qnamespace.h" - #include "qpainter.h" - #include "qbitmap.h" -@@ -376,17 +377,22 @@ void qt_x11_wait_for_window_manager(QWid - do { - if (XEventsQueued(X11->display, QueuedAlready)) { - XNextEvent(X11->display, &ev); -- qApp->x11ProcessEvent(&ev); -- -- switch (state) { -- case Initial: -- if (ev.type == MapNotify && ev.xany.window == winid) -- state = Mapped; -- break; -- case Mapped: -- if (ev.type == Expose && ev.xany.window == winid) -- return; -- break; -+ // Some applications may override QAbstractEventDispatcher::filterEvent(), so -+ // pass event to QAbstractEventDispatcher::filterEvent() before processing in -+ // x11ProcessEvent(). -+ if (!QAbstractEventDispatcher::instance()->filterEvent(&ev)) { -+ qApp->x11ProcessEvent(&ev); -+ -+ switch (state) { -+ case Initial: -+ if (ev.type == MapNotify && ev.xany.window == winid) -+ state = Mapped; -+ break; -+ case Mapped: -+ if (ev.type == Expose && ev.xany.window == winid) -+ return; -+ break; -+ } - } - } else { - if (!XEventsQueued(X11->display, QueuedAfterFlush)) diff --git a/qt.spec b/qt.spec index e12663f..ce95eba 100644 --- a/qt.spec +++ b/qt.spec @@ -68,7 +68,7 @@ Patch67: qt-everywhere-opensource-src-4.8.0-beta1-s390.patch # https://bugs.webkit.org/show_bug.cgi?id=63941 # -Wall + -Werror = fail -Patch68: webkit-qtwebkit-2.2-no_Werror.patch +Patch68: qt-4.8.1-webkit-no_Werror.patch # revert qlist.h commit that seems to induce crashes in qDeleteAll= 2.31 # fixes FTBFS: https://bugs.webkit.org/show_bug.cgi?id=69840 Patch73: qt-everywhere-opensource-src-4.8.0-qtwebkit-glib231.patch @@ -100,10 +96,6 @@ Patch76: qt-everywhere-opensource-src-4.8.0-s390-atomic.patch # don't spam if libicu is not present at runtime Patch77: qt-everywhere-opensource-src-4.8.0-icu_no_spam.patch -# avoid dropping events, which lead to "ghost entries in kde task manager" problem -# https://bugs.kde.org/show_bug.cgi?id=275469 -Patch78: qt-everywhere-opensource-src-4.8.0-filter_event.patch - # fix qvfb build Patch79: qt-everywhere-opensource-src-4.8.0-qvfb.patch @@ -426,13 +418,10 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags %patch64 -p1 -b .QTBUG-14467 %patch65 -p1 -b .qtreeview-kpackagekit-crash %patch67 -p1 -b .s390 -pushd src/3rdparty/webkit %patch68 -p1 -b .no_Werror -popd %patch69 -p1 -b .QTBUG-22037 %patch70 -p1 -b .QTBUG-14724 %patch71 -p1 -b .QTBUG-21900 -%patch72 -p1 -b .QUrl_toLocalFile %if 0%{?fedora} > 16 # This quick fix works ONLY with GLib >= 2.31. It's harder to fix this portably. # See https://bugs.webkit.org/show_bug.cgi?id=69840 for the gory details. @@ -442,7 +431,6 @@ popd %patch75 -p1 -b .ppc64-crash %patch76 -p1 -b .s390-atomic %patch77 -p1 -b .icu_no_spam -%patch78 -p1 -b .filter_events %patch79 -p1 -b .qvfb %patch80 -p1 -b .ld.gold %patch81 -p1 -b .gcc-4.7 diff --git a/webkit-qtwebkit-2.2-no_Werror.patch b/webkit-qtwebkit-2.2-no_Werror.patch deleted file mode 100644 index e63d4e9..0000000 --- a/webkit-qtwebkit-2.2-no_Werror.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up webkit-qtwebkit/Source/WebKit.pri.Werror webkit-qtwebkit/Source/WebKit.pri ---- webkit-qtwebkit/Source/WebKit.pri.Werror 2011-05-12 09:42:28.000000000 -0500 -+++ webkit-qtwebkit/Source/WebKit.pri 2011-05-13 12:42:09.956080365 -0500 -@@ -92,7 +92,7 @@ CONFIG -= warn_on - - # Treat warnings as errors on x86/Linux/GCC - linux-g++* { -- isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror -+ #isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror - - greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) { - if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {