From f5e1f73a7c6d67710f988b108959d89796a96730 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 15 Jul 2015 16:49:54 +0200 Subject: [PATCH] Restore previously dropped patches --- qt5-qtbase.spec | 36 ++++++- qtbase-opensource-src-5.4.1-QTBUG-45484.patch | 89 +++++++++-------- qtbase-opensource-src-5.4.1-QTBUG-46310.patch | 98 ++++++++++--------- 3 files changed, 130 insertions(+), 93 deletions(-) diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index d5a3c0c..49584f3 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -39,7 +39,7 @@ Summary: Qt5 - QtBase components Name: qt5-qtbase Version: 5.5.0 -Release: 6%{?dist} +Release: 7%{?dist} # See LGPL_EXCEPTIONS.txt, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -69,6 +69,10 @@ Patch4: qtbase-opensource-src-5.3.2-QTBUG-35459.patch # unconditionally enable freetype lcdfilter support Patch12: qtbase-opensource-src-5.2.0-enable_ft_lcdfilter.patch +# hack out largely useless (to users) warnings about qdbusconnection +# (often in kde apps), keep an eye on https://git.reviewboard.kde.org/r/103699/ +Patch25: qtbase-opensource-src-5.5.1-qdbusconnection_no_debug.patch + # fix issue on big endian platform Patch13: qtbase-opensource-src-5.5.x-big-endian.patch @@ -82,6 +86,25 @@ Patch50: qt5-poll.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1083664 Patch51: qtbase-opensource-src-5.5-disconnect_displays.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1219173 +# https://bugreports.qt.io/browse/QTBUG-33093 +# https://codereview.qt-project.org/#/c/95219/ +Patch52: qtbase-opensource-src-5.4.1-QTBUG-33093.patch + +# https://bugreports.qt.io/browse/QTBUG-45484 +# QWidget::setWindowRole does nothing +# adapted to apply on top of patch51 +Patch53: qtbase-opensource-src-5.4.1-QTBUG-45484.patch + +# https://bugreports.qt.io/browse/QTBUG-46310 +#SM_CLIENT_ID property is not set +Patch54: qtbase-opensource-src-5.4.1-QTBUG-46310.patch + +## upstream patches +# workaround https://bugreports.qt-project.org/browse/QTBUG-43057 +# 'make docs' crash on el6, use qSort instead of std::sort +Patch100: qtbase-opensource-src-5.4.0-QTBUG-43057.patch + # macros, be mindful to keep sync'd with macros.qt5 Source1: macros.qt5 %define _qt5 %{name} @@ -335,10 +358,18 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags %patch4 -p1 -b .QTBUG-35459 %patch12 -p1 -b .enable_ft_lcdfilter +%patch25 -p1 -b .qdbusconnection_no_debug %patch13 -p1 -b .big-endian #patch50 -p1 -b .poll %patch51 -p1 -b .disconnect_displays +%patch52 -p1 -b .QTBUG-33093 +%patch53 -p1 -b .QTBUG-45484 +%patch54 -p1 -b .QTBUG-46310 + +%if 0%{?rhel} == 6 +%patch100 -p1 -b .QTBUG-43057 +%endif # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -881,6 +912,9 @@ fi %changelog +* Wed Jul 15 2015 Jan Grulich 5.5.0-7 +- restore previously dropped patches + * Tue Jul 14 2015 Rex Dieter 5.5.0-6 - disable bootstrap again diff --git a/qtbase-opensource-src-5.4.1-QTBUG-45484.patch b/qtbase-opensource-src-5.4.1-QTBUG-45484.patch index 3cd8b7b..f27f040 100644 --- a/qtbase-opensource-src-5.4.1-QTBUG-45484.patch +++ b/qtbase-opensource-src-5.4.1-QTBUG-45484.patch @@ -18,12 +18,12 @@ Task-number: QTBUG-45484 5 files changed, 43 insertions(+), 5 deletions(-) diff --git a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h -index 5227732..d166c9f 100644 +index ae05cf5..0f83a99 100644 --- a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h +++ b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.h -@@ -72,6 +72,16 @@ public: - if (func) - func(window, type); +@@ -83,6 +83,16 @@ public: + return func(window); + return UINT_MAX; } + + typedef void (*SetWmWindowRole)(QWindow *window, const QByteArray &role); @@ -36,35 +36,35 @@ index 5227732..d166c9f 100644 + func(window, role); + } }; - - + + diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp -index 31dedd4..0bd49b8 100644 +index 8bf9003..3928da3 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp -@@ -339,6 +339,9 @@ QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &functio - if (function == QXcbWindowFunctions::setWmWindowTypeIdentifier()) { - return QFunctionPointer(QXcbWindow::setWmWindowTypeStatic); +@@ -395,6 +395,9 @@ QFunctionPointer QXcbNativeInterface::platformFunction(const QByteArray &functio + if (function == QXcbWindowFunctions::visualIdIdentifier()) { + return QFunctionPointer(QXcbWindowFunctions::VisualId(QXcbWindow::visualIdStatic)); } + if (function == QXcbWindowFunctions::setWmWindowRoleIdentifier()) { + return QFunctionPointer(QXcbWindow::setWmWindowRoleStatic); + } return Q_NULLPTR; } - + diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp -index 0094278..14e186a 100644 +index d1b6888..7c043fb 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp -@@ -236,6 +236,7 @@ static inline bool positionIncludesFrame(QWindow *w) - } - +@@ -322,6 +322,7 @@ static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s) + #endif // XCB_USE_XLIB + static const char *wm_window_type_property_id = "_q_xcb_wm_window_type"; +static const char *wm_window_role_property_id = "_q_xcb_wm_window_role"; - + QXcbWindow::QXcbWindow(QWindow *window) : QPlatformWindow(window) -@@ -562,6 +563,11 @@ void QXcbWindow::create() +@@ -660,6 +661,11 @@ void QXcbWindow::create() setOpacity(opacity); if (window()->isTopLevel()) setWindowIcon(window()->icon()); @@ -74,12 +74,12 @@ index 0094278..14e186a 100644 + setWmWindowRole(wmWindowRole); + } } - + QXcbWindow::~QXcbWindow() -@@ -1596,6 +1602,14 @@ void QXcbWindow::setWmWindowTypeStatic(QWindow *window, QXcbWindowFunctions::WmW - window->setProperty(wm_window_type_property_id, QVariant::fromValue(static_cast(windowTypes))); +@@ -1716,6 +1722,14 @@ uint QXcbWindow::visualIdStatic(QWindow *window) + return UINT_MAX; } - + +void QXcbWindow::setWmWindowRoleStatic(QWindow *window, const QByteArray &role) +{ + if (window->handle()) @@ -91,10 +91,10 @@ index 0094278..14e186a 100644 QXcbWindowFunctions::WmWindowTypes QXcbWindow::wmWindowTypes() const { QXcbWindowFunctions::WmWindowTypes result(0); -@@ -1712,6 +1726,13 @@ void QXcbWindow::setWmWindowType(QXcbWindowFunctions::WmWindowTypes types) +@@ -1832,6 +1846,13 @@ void QXcbWindow::setWmWindowType(QXcbWindowFunctions::WmWindowTypes types) xcb_flush(xcb_connection()); } - + +void QXcbWindow::setWmWindowRole(const QByteArray &role) +{ + Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, @@ -106,48 +106,49 @@ index 0094278..14e186a 100644 { public: diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h -index 254421e..2c9964c 100644 +index e62bfcb..352db2e 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h -@@ -143,9 +143,11 @@ public: - #endif - +@@ -140,10 +140,12 @@ public: + void updateNetWmUserTime(xcb_timestamp_t timestamp); + static void setWmWindowTypeStatic(QWindow *window, QXcbWindowFunctions::WmWindowTypes windowTypes); + static void setWmWindowRoleStatic(QWindow *window, const QByteArray &role); - + static uint visualIdStatic(QWindow *window); + QXcbWindowFunctions::WmWindowTypes wmWindowTypes() const; void setWmWindowType(QXcbWindowFunctions::WmWindowTypes types); + void setWmWindowRole(const QByteArray &role); - - bool needsSync() const; - + + uint visualId() const; + diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp -index c99e15b..bc4750e 100644 +index e701eb0..4e06a2f 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -100,6 +100,7 @@ - + #include "qwindowcontainer_p.h" - + +#include "QtPlatformHeaders/qxcbwindowfunctions.h" - + // widget/widget data creation count //#define QWIDGET_EXTRA_DEBUG -@@ -1445,6 +1446,9 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO - +@@ -1451,6 +1452,9 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + data.window_flags = win->flags(); - + + if (!topData()->role.isNull()) + QXcbWindowFunctions::setWmWindowRole(win, topData()->role.toLatin1()); + QBackingStore *store = q->backingStore(); - + if (!store) { -@@ -6236,13 +6240,11 @@ QString QWidget::windowRole() const +@@ -6254,13 +6258,12 @@ QString QWidget::windowRole() const */ void QWidget::setWindowRole(const QString &role) { --#if defined(Q_WS_X11) +-#if defined(Q_DEAD_CODE_FROM_QT4_X11) Q_D(QWidget); + d->createTLExtra(); d->topData()->role = role; @@ -155,11 +156,9 @@ index c99e15b..bc4750e 100644 -#else - Q_UNUSED(role) -#endif ++ + if (windowHandle()) + QXcbWindowFunctions::setWmWindowRole(windowHandle(), role.toLatin1()); } - - /*! --- -2.4.2 + /*! diff --git a/qtbase-opensource-src-5.4.1-QTBUG-46310.patch b/qtbase-opensource-src-5.4.1-QTBUG-46310.patch index 82849d4..cb03120 100644 --- a/qtbase-opensource-src-5.4.1-QTBUG-46310.patch +++ b/qtbase-opensource-src-5.4.1-QTBUG-46310.patch @@ -1,18 +1,19 @@ -diff -up qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.cpp.QTBUG-46310 qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.cpp ---- qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.cpp.QTBUG-46310 2015-06-08 18:55:19.427037122 +0300 -+++ qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-06-08 18:55:19.436036915 +0300 -@@ -330,6 +330,7 @@ QXcbConnection::QXcbConnection(QXcbNativ +diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp +index 80c844e..d21ff4e 100644 +--- a/src/plugins/platforms/xcb/qxcbconnection.cpp ++++ b/src/plugins/platforms/xcb/qxcbconnection.cpp +@@ -454,6 +454,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra , has_xkb(false) , m_buttons(0) , m_focusWindow(0) + , m_clientLeader(0) , m_systemTrayTracker(0) - { - #ifdef XCB_USE_EGL -@@ -1241,6 +1242,58 @@ xcb_window_t QXcbConnection::rootWindow( - return primaryScreen()->root(); - } - + , m_glIntegration(Q_NULLPTR) + , m_xiGrab(false) +@@ -1353,6 +1354,58 @@ void *QXcbConnection::createVisualInfoForDefaultVisualId() const + + #endif + +xcb_window_t QXcbConnection::clientLeader() +{ + if (m_clientLeader == 0) { @@ -68,33 +69,34 @@ diff -up qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.cp void QXcbConnection::processXcbEvents() { int connection_error = xcb_connection_has_error(xcb_connection()); -diff -up qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.h.QTBUG-46310 qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.h ---- qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.h.QTBUG-46310 2015-02-17 06:56:51.000000000 +0200 -+++ qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbconnection.h 2015-06-08 18:55:19.436036915 +0300 -@@ -394,6 +394,8 @@ public: - +diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h +index 2005ae0..dcfb3f0 100644 +--- a/src/plugins/platforms/xcb/qxcbconnection.h ++++ b/src/plugins/platforms/xcb/qxcbconnection.h +@@ -402,6 +402,7 @@ public: + QXcbWMSupport *wmSupport() const { return m_wmSupport.data(); } xcb_window_t rootWindow(); + xcb_window_t clientLeader(); -+ - #ifdef XCB_USE_XLIB - void *xlib_display() const { return m_xlib_display; } - #endif -@@ -617,6 +619,7 @@ private: - + + bool hasDefaultVisualId() const { return m_defaultVisualId != UINT_MAX; } + xcb_visualid_t defaultVisualId() const { return m_defaultVisualId; } +@@ -640,6 +641,7 @@ private: + QXcbWindow *m_focusWindow; - + + xcb_window_t m_clientLeader; QByteArray m_startupId; QXcbSystemTrayTracker *m_systemTrayTracker; - -diff -up qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.cpp.QTBUG-46310 qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.cpp ---- qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.cpp.QTBUG-46310 2015-02-17 06:56:51.000000000 +0200 -+++ qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2015-06-08 18:55:19.436036915 +0300 -@@ -163,38 +163,6 @@ QXcbScreen::QXcbScreen(QXcbConnection *c + QXcbGlIntegration *m_glIntegration; +diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp +index 63e4d9e..9783682 100644 +--- a/src/plugins/platforms/xcb/qxcbscreen.cpp ++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp +@@ -170,38 +170,6 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDe else m_syncRequestSupported = true; - + - m_clientLeader = xcb_generate_id(xcb_connection()); - Q_XCB_CALL2(xcb_create_window(xcb_connection(), - XCB_COPY_FROM_PARENT, @@ -129,44 +131,46 @@ diff -up qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.cpp.QT - xcb_depth_iterator_t depth_iterator = xcb_screen_allowed_depths_iterator(screen()); - -diff -up qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.h.QTBUG-46310 qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.h ---- qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.h.QTBUG-46310 2015-02-17 06:56:51.000000000 +0200 -+++ qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbscreen.h 2015-06-08 18:55:19.437036892 +0300 -@@ -80,8 +80,6 @@ public: - xcb_screen_t *screen() const { return m_screen; } - xcb_window_t root() const { return m_screen->root; } - + +diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h +index ec05e3b..6534206 100644 +--- a/src/plugins/platforms/xcb/qxcbscreen.h ++++ b/src/plugins/platforms/xcb/qxcbscreen.h +@@ -116,8 +116,6 @@ public: + xcb_randr_crtc_t crtc() const { return m_crtc; } + xcb_randr_mode_t mode() const { return m_mode; } + - xcb_window_t clientLeader() const { return m_clientLeader; } - void windowShown(QXcbWindow *window); QString windowManagerName() const { return m_windowManagerName; } bool syncRequestSupported() const { return m_syncRequestSupported; } -@@ -125,7 +123,6 @@ private: - int m_number; +@@ -171,7 +169,6 @@ private: + Qt::ScreenOrientation m_orientation; QString m_windowManagerName; bool m_syncRequestSupported; - xcb_window_t m_clientLeader; QMap m_visuals; QMap m_visualDepths; QXcbCursor *m_cursor; -diff -up qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbwindow.cpp.QTBUG-46310 qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbwindow.cpp ---- qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbwindow.cpp.QTBUG-46310 2015-06-08 18:55:19.437036892 +0300 -+++ qtbase-opensource-src-5.4.1/src/plugins/platforms/xcb/qxcbwindow.cpp 2015-06-08 18:56:40.773169979 +0300 -@@ -525,7 +525,7 @@ void QXcbWindow::create() - +diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp +index 7c043fb..adc8973 100644 +--- a/src/plugins/platforms/xcb/qxcbwindow.cpp ++++ b/src/plugins/platforms/xcb/qxcbwindow.cpp +@@ -623,7 +623,7 @@ void QXcbWindow::create() + xcb_set_wm_hints(xcb_connection(), m_window, &hints); - -- xcb_window_t leader = screen->clientLeader(); + +- xcb_window_t leader = platformScreen->clientLeader(); + xcb_window_t leader = connection()->clientLeader(); Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, atom(QXcbAtom::WM_CLIENT_LEADER), XCB_ATOM_WINDOW, 32, 1, &leader)); -@@ -750,7 +750,7 @@ void QXcbWindow::show() +@@ -864,7 +864,7 @@ void QXcbWindow::show() // Default to client leader if there is no transient parent, else modal dialogs can // be hidden by their parents. if (!transientXcbParent) -- transientXcbParent = static_cast(xcbscreen())->clientLeader(); +- transientXcbParent = xcbScreen()->clientLeader(); + transientXcbParent = connection()->clientLeader(); if (transientXcbParent) { // ICCCM 4.1.2.6 Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window,