diff --git a/0002-xcb-Fix-getting-the-window-types-from-the-property-o.patch b/0002-xcb-Fix-getting-the-window-types-from-the-property-o.patch deleted file mode 100644 index b14d591..0000000 --- a/0002-xcb-Fix-getting-the-window-types-from-the-property-o.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4bc7ce49d92e7a0647b7e2f42c649d4cfee10d74 Mon Sep 17 00:00:00 2001 -From: Alexander Volkov -Date: Thu, 7 May 2015 17:10:12 +0300 -Subject: [PATCH 1/1] xcb: Fix getting the window types from the property of - QWindow -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -wm_window_type_property_id is a dynamic property, so we should -check that it is set by using QObject::dynamicPropertyNames() -instead of QMetaObject::indexOfProperty(). - -Change-Id: Ic7f3408a0d028f349538e0538c40c4b58360f7df -Reviewed-by: Jørgen Lind ---- - src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp -index a6011aa654824c46f1e10c04dbc1b8d8c9c6658a..42a86ae8104641d24b0ce4dbd7418ad17bf8bd38 100644 ---- a/src/plugins/platforms/xcb/qxcbwindow.cpp -+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp -@@ -762,7 +762,7 @@ void QXcbWindow::show() - updateNetWmStateBeforeMap(); - } - -- if (window()->metaObject()->indexOfProperty(wm_window_type_property_id) >= 0) { -+ if (window()->dynamicPropertyNames().contains(wm_window_type_property_id)) { - QXcbWindowFunctions::WmWindowTypes wmWindowTypes(window()->property(wm_window_type_property_id).value()); - setWmWindowType(wmWindowTypes); - } --- -2.4.2 - diff --git a/0003-Fix-centering-dialogs.patch b/0003-Fix-centering-dialogs.patch deleted file mode 100644 index 2f10f58..0000000 --- a/0003-Fix-centering-dialogs.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2d0957d4b84ca3b07a62ce5c87e0f656dbe690de Mon Sep 17 00:00:00 2001 -From: Alexander Volkov -Date: Tue, 10 Feb 2015 17:43:03 +0300 -Subject: [PATCH 1/1] Fix centering dialogs - -QDialog::setVisible() tries to adjusts the dialog position, but -it's not really possible if the dialog size is not defined yet. -Besides, if the dialog window is not created, QWidget::move() -will not really move it and will set WA_PendingMoveEvent flag. -And QWidget::setVisible() also will not change the position, -because we reset WA_Moved flag. Thus it may break adjusting -the position in QDialog::showEvent(). - -So adjust the position only in QDialog::showEvent(). - -Task-number: QTBUG-36185 -Task-number: QTBUG-39259 -Task-number: QTBUG-41844 -Change-Id: I015a19f2e533f68178f4ee7519b17f5e9b5def7b -Reviewed-by: Timur Pocheptsov ---- - src/widgets/dialogs/qdialog.cpp | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp -index 6de3ff8c157c7e97fa334c07d5adbd4c64d948a7..22025378afb75339c8ae298720089e40ce5682b8 100644 ---- a/src/widgets/dialogs/qdialog.cpp -+++ b/src/widgets/dialogs/qdialog.cpp -@@ -717,13 +717,6 @@ void QDialog::setVisible(bool visible) - if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden)) - return; - -- if (!testAttribute(Qt::WA_Moved)) { -- Qt::WindowStates state = windowState(); -- adjustPosition(parentWidget()); -- setAttribute(Qt::WA_Moved, false); // not really an explicit position -- if (state != windowState()) -- setWindowState(state); -- } - QWidget::setVisible(visible); - showExtension(d->doShowExtension); - QWidget *fw = window()->focusWidget(); --- -2.4.2 - diff --git a/0004-xcb-Set-_NET_WM_WINDOW_TYPE-from-a-single-place.patch b/0004-xcb-Set-_NET_WM_WINDOW_TYPE-from-a-single-place.patch deleted file mode 100644 index eff904f..0000000 --- a/0004-xcb-Set-_NET_WM_WINDOW_TYPE-from-a-single-place.patch +++ /dev/null @@ -1,227 +0,0 @@ -From 1d9a6d0859a7daca0385cbdfdf4c6b7caf32e6d8 Mon Sep 17 00:00:00 2001 -From: Alexander Volkov -Date: Tue, 5 May 2015 23:04:26 +0300 -Subject: xcb: Set _NET_WM_WINDOW_TYPE from a single place -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Merge QXcbWindow::setNetWmWindowFlags(), which was called from -QXcbWindow::setWindowFlags(), into QXcbWindow::setWmWindowType(). -Now setWindowFlags() can't override window type set by -QXcbWindowFunctions::setWmWindowType(). - -Also reorder _NET_WM_WINDOW_TYPE atoms in QXcbWindow::setWmWindowType() -as it was in Qt 4. - -Change-Id: Id1752d78f91caf04e9d16bb1ac40ed180597df7b -Reviewed-by: Jørgen Lind ---- - src/plugins/platforms/xcb/qxcbwindow.cpp | 117 ++++++++++++++++--------------- - src/plugins/platforms/xcb/qxcbwindow.h | 3 +- - 2 files changed, 63 insertions(+), 57 deletions(-) - -diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp -index cb5f410..6e021ce 100644 ---- a/src/plugins/platforms/xcb/qxcbwindow.cpp -+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp -@@ -873,11 +873,6 @@ void QXcbWindow::show() - updateNetWmStateBeforeMap(); - } - -- if (window()->dynamicPropertyNames().contains(wm_window_type_property_id)) { -- QXcbWindowFunctions::WmWindowTypes wmWindowTypes(window()->property(wm_window_type_property_id).value()); -- setWmWindowType(wmWindowTypes); -- } -- - if (connection()->time() != XCB_TIME_CURRENT_TIME) - updateNetWmUserTime(connection()->time()); - -@@ -1140,7 +1135,13 @@ void QXcbWindow::setWindowFlags(Qt::WindowFlags flags) - - xcb_change_window_attributes(xcb_connection(), xcb_window(), mask, values); - -- setNetWmWindowFlags(flags); -+ QXcbWindowFunctions::WmWindowTypes wmWindowTypes = 0; -+ if (window()->dynamicPropertyNames().contains(wm_window_type_property_id)) { -+ wmWindowTypes = static_cast( -+ window()->property(wm_window_type_property_id).value()); -+ } -+ -+ setWmWindowType(wmWindowTypes, flags); - setMotifWindowFlags(flags); - - setTransparentForMouseEvents(flags & Qt::WindowTransparentForInput); -@@ -1291,42 +1292,6 @@ void QXcbWindow::setWindowState(Qt::WindowState state) - m_windowState = state; - } - --void QXcbWindow::setNetWmWindowFlags(Qt::WindowFlags flags) --{ -- // in order of decreasing priority -- QVector windowTypes; -- -- Qt::WindowType type = static_cast(int(flags & Qt::WindowType_Mask)); -- -- switch (type) { -- case Qt::Dialog: -- case Qt::Sheet: -- windowTypes.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_DIALOG)); -- break; -- case Qt::Tool: -- case Qt::Drawer: -- windowTypes.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_UTILITY)); -- break; -- case Qt::ToolTip: -- windowTypes.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_TOOLTIP)); -- break; -- case Qt::SplashScreen: -- windowTypes.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_SPLASH)); -- break; -- default: -- break; -- } -- -- if (flags & Qt::FramelessWindowHint) -- windowTypes.append(atom(QXcbAtom::_KDE_NET_WM_WINDOW_TYPE_OVERRIDE)); -- -- windowTypes.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_NORMAL)); -- -- Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, -- atom(QXcbAtom::_NET_WM_WINDOW_TYPE), XCB_ATOM_ATOM, 32, -- windowTypes.count(), windowTypes.constData())); --} -- - void QXcbWindow::updateMotifWmHintsBeforeMap() - { - QtMotifWmHints mwmhints = getMotifWmHints(connection(), m_window); -@@ -1703,10 +1668,10 @@ QSurfaceFormat QXcbWindow::format() const - - void QXcbWindow::setWmWindowTypeStatic(QWindow *window, QXcbWindowFunctions::WmWindowTypes windowTypes) - { -+ window->setProperty(wm_window_type_property_id, QVariant::fromValue(static_cast(windowTypes))); -+ - if (window->handle()) -- static_cast(window->handle())->setWmWindowType(windowTypes); -- else -- window->setProperty(wm_window_type_property_id, QVariant::fromValue(static_cast(windowTypes))); -+ static_cast(window->handle())->setWmWindowType(windowTypes, window->flags()); - } - - uint QXcbWindow::visualIdStatic(QWindow *window) -@@ -1787,40 +1752,82 @@ QXcbWindowFunctions::WmWindowTypes QXcbWindow::wmWindowTypes() const - return result; - } - --void QXcbWindow::setWmWindowType(QXcbWindowFunctions::WmWindowTypes types) -+void QXcbWindow::setWmWindowType(QXcbWindowFunctions::WmWindowTypes types, Qt::WindowFlags flags) - { - QVector atoms; - -+ // manual selection 1 (these are never set by Qt and take precedence) - if (types & QXcbWindowFunctions::Normal) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_NORMAL)); - if (types & QXcbWindowFunctions::Desktop) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_DESKTOP)); - if (types & QXcbWindowFunctions::Dock) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_DOCK)); -- if (types & QXcbWindowFunctions::Toolbar) -- atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_TOOLBAR)); -- if (types & QXcbWindowFunctions::Menu) -- atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_MENU)); -+ if (types & QXcbWindowFunctions::Notification) -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_NOTIFICATION)); -+ -+ // manual selection 2 (Qt uses these during auto selection); - if (types & QXcbWindowFunctions::Utility) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_UTILITY)); - if (types & QXcbWindowFunctions::Splash) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_SPLASH)); - if (types & QXcbWindowFunctions::Dialog) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_DIALOG)); -+ if (types & QXcbWindowFunctions::Tooltip) -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_TOOLTIP)); -+ if (types & QXcbWindowFunctions::KdeOverride) -+ atoms.append(atom(QXcbAtom::_KDE_NET_WM_WINDOW_TYPE_OVERRIDE)); -+ -+ // manual selection 3 (these can be set by Qt, but don't have a -+ // corresponding Qt::WindowType). note that order of the *MENU -+ // atoms is important -+ if (types & QXcbWindowFunctions::Menu) -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_MENU)); - if (types & QXcbWindowFunctions::DropDownMenu) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_DROPDOWN_MENU)); - if (types & QXcbWindowFunctions::PopupMenu) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_POPUP_MENU)); -- if (types & QXcbWindowFunctions::Tooltip) -- atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_TOOLTIP)); -- if (types & QXcbWindowFunctions::Notification) -- atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_NOTIFICATION)); -+ if (types & QXcbWindowFunctions::Toolbar) -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_TOOLBAR)); - if (types & QXcbWindowFunctions::Combo) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_COMBO)); - if (types & QXcbWindowFunctions::Dnd) - atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_DND)); -- if (types & QXcbWindowFunctions::KdeOverride) -+ -+ // automatic selection -+ Qt::WindowType type = static_cast(int(flags & Qt::WindowType_Mask)); -+ switch (type) { -+ case Qt::Dialog: -+ case Qt::Sheet: -+ if (!(types & QXcbWindowFunctions::Dialog)) -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_DIALOG)); -+ break; -+ case Qt::Tool: -+ case Qt::Drawer: -+ if (!(types & QXcbWindowFunctions::Utility)) -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_UTILITY)); -+ break; -+ case Qt::ToolTip: -+ if (!(types & QXcbWindowFunctions::Tooltip)) -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_TOOLTIP)); -+ break; -+ case Qt::SplashScreen: -+ if (!(types & QXcbWindowFunctions::Splash)) -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_SPLASH)); -+ break; -+ default: -+ break; -+ } -+ -+ if ((flags & Qt::FramelessWindowHint) && !(type & QXcbWindowFunctions::KdeOverride)) { -+ // override netwm type - quick and easy for KDE noborder - atoms.append(atom(QXcbAtom::_KDE_NET_WM_WINDOW_TYPE_OVERRIDE)); -+ } -+ -+ if (atoms.size() == 1 && atoms.first() == atom(QXcbAtom::_NET_WM_WINDOW_TYPE_NORMAL)) -+ atoms.clear(); -+ else -+ atoms.append(atom(QXcbAtom::_NET_WM_WINDOW_TYPE_NORMAL)); - - if (atoms.isEmpty()) { - Q_XCB_CALL(xcb_delete_property(xcb_connection(), m_window, atom(QXcbAtom::_NET_WM_WINDOW_TYPE))); -diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h -index e62bfcb..a379a6f 100644 ---- a/src/plugins/platforms/xcb/qxcbwindow.h -+++ b/src/plugins/platforms/xcb/qxcbwindow.h -@@ -143,7 +143,7 @@ public: - static uint visualIdStatic(QWindow *window); - - QXcbWindowFunctions::WmWindowTypes wmWindowTypes() const; -- void setWmWindowType(QXcbWindowFunctions::WmWindowTypes types); -+ void setWmWindowType(QXcbWindowFunctions::WmWindowTypes types, Qt::WindowFlags flags); - - uint visualId() const; - -@@ -179,7 +179,6 @@ protected: - NetWmStates netWmStates(); - void setNetWmStates(NetWmStates); - -- void setNetWmWindowFlags(Qt::WindowFlags flags); - void setMotifWindowFlags(Qt::WindowFlags flags); - - void updateMotifWmHintsBeforeMap(); --- -cgit v0.11.0 diff --git a/0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch b/0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch index e36a955..87b8f67 100644 --- a/0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch +++ b/0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch @@ -1,4 +1,4 @@ -From 552cbc0d89dcdbf32dfe652ff7d3bbe45dafe595 Mon Sep 17 00:00:00 2001 +From 5e5031527a3b443c93bf9e762c2f47e6786d7a31 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Thu, 7 May 2015 17:36:57 +0300 Subject: [PATCH] Restore documented behavior for the WA_X11NetWmWindowType* @@ -10,29 +10,15 @@ types to the window's _NET_WM_WINDOW_TYPE X11 window property. Change-Id: Ia2413ad7a69ab8d49b448de11dd07c77101a564c Task-number: QTBUG-39887 --- - src/src.pro | 2 +- - src/widgets/kernel/qwidget.cpp | 45 ++++++++++++++++++++++++++++++++++++++---- + src/widgets/kernel/qwidget.cpp | 44 ++++++++++++++++++++++++++++++++++++++---- src/widgets/kernel/qwidget_p.h | 3 ++- - 3 files changed, 44 insertions(+), 6 deletions(-) + 2 files changed, 42 insertions(+), 5 deletions(-) -diff --git a/src/src.pro b/src/src.pro -index b4d62aa..090ae68 100644 ---- a/src/src.pro -+++ b/src/src.pro -@@ -110,7 +110,7 @@ src_platformsupport.depends = src_corelib src_gui src_platformheaders - - src_widgets.subdir = $$PWD/widgets - src_widgets.target = sub-widgets --src_widgets.depends = src_corelib src_gui src_tools_uic -+src_widgets.depends = src_corelib src_gui src_tools_uic src_platformheaders - - src_opengl.subdir = $$PWD/opengl - src_opengl.target = sub-opengl diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp -index b2ea83c..d918b1a 100644 +index 2c9cc5c..0f05280 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp -@@ -1406,6 +1407,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO +@@ -1414,6 +1414,7 @@ void QWidgetPrivate::create_sys(WId wind win->setProperty("_q_showWithoutActivating", QVariant(true)); if (q->testAttribute(Qt::WA_MacAlwaysShowToolWindow)) win->setProperty("_q_macAlwaysShowToolWindow", QVariant::fromValue(QVariant(true))); @@ -40,7 +26,7 @@ index b2ea83c..d918b1a 100644 win->setFlags(data.window_flags); fixPosIncludesFrame(); if (q->testAttribute(Qt::WA_Moved) -@@ -11135,7 +11137,6 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) +@@ -11149,7 +11150,6 @@ void QWidget::setAttribute(Qt::WidgetAtt break; } @@ -48,7 +34,7 @@ index b2ea83c..d918b1a 100644 case Qt::WA_X11NetWmWindowTypeDesktop: case Qt::WA_X11NetWmWindowTypeDock: case Qt::WA_X11NetWmWindowTypeToolBar: -@@ -11149,10 +11150,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) +@@ -11163,10 +11163,8 @@ void QWidget::setAttribute(Qt::WidgetAtt case Qt::WA_X11NetWmWindowTypeNotification: case Qt::WA_X11NetWmWindowTypeCombo: case Qt::WA_X11NetWmWindowTypeDND: @@ -60,7 +46,7 @@ index b2ea83c..d918b1a 100644 case Qt::WA_StaticContents: if (QWidgetBackingStore *bs = d->maybeBackingStore()) { -@@ -12796,6 +12795,44 @@ void QWidgetPrivate::setWidgetParentHelper(QObject *widgetAsObject, QObject *new +@@ -12823,6 +12821,44 @@ void QWidgetPrivate::setWidgetParentHelp widget->setParent(static_cast(newParent)); } @@ -102,9 +88,9 @@ index b2ea83c..d918b1a 100644 + QXcbWindowFunctions::setWmWindowType(q->windowHandle(), static_cast(wmWindowType)); +} + - QT_END_NAMESPACE + /*! \fn Qt::HANDLE QWidget::macCGHandle() const + \internal - #include "moc_qwidget.cpp" diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index fe65cb1..dc1c580 100644 --- a/src/widgets/kernel/qwidget_p.h diff --git a/0006-xcb-set-SM_CLIENT_ID-property.patch b/0006-xcb-set-SM_CLIENT_ID-property.patch deleted file mode 100644 index 57b1630..0000000 --- a/0006-xcb-set-SM_CLIENT_ID-property.patch +++ /dev/null @@ -1,177 +0,0 @@ -diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp -index b8b6651..06fec12 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) - , m_glIntegration(Q_NULLPTR) - , m_xiGrab(false) -@@ -1358,6 +1359,58 @@ void *QXcbConnection::createVisualInfoForDefaultVisualId() const - - #endif - -+xcb_window_t QXcbConnection::clientLeader() -+{ -+ if (m_clientLeader == 0) { -+ m_clientLeader = xcb_generate_id(xcb_connection()); -+ QXcbScreen *screen = primaryScreen(); -+ Q_XCB_CALL(xcb_create_window(xcb_connection(), -+ XCB_COPY_FROM_PARENT, -+ m_clientLeader, -+ screen->root(), -+ 0, 0, 1, 1, -+ 0, -+ XCB_WINDOW_CLASS_INPUT_OUTPUT, -+ screen->screen()->root_visual, -+ 0, 0)); -+#ifndef QT_NO_DEBUG -+ QByteArray ba("Qt client leader window"); -+ Q_XCB_CALL(xcb_change_property(xcb_connection(), -+ XCB_PROP_MODE_REPLACE, -+ m_clientLeader, -+ atom(QXcbAtom::_NET_WM_NAME), -+ atom(QXcbAtom::UTF8_STRING), -+ 8, -+ ba.length(), -+ ba.constData())); -+#endif -+ Q_XCB_CALL(xcb_change_property(xcb_connection(), -+ XCB_PROP_MODE_REPLACE, -+ m_clientLeader, -+ atom(QXcbAtom::WM_CLIENT_LEADER), -+ XCB_ATOM_WINDOW, -+ 32, -+ 1, -+ &m_clientLeader)); -+ -+#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM) -+ // If we are session managed, inform the window manager about it -+ QByteArray session = qGuiApp->sessionId().toLatin1(); -+ if (!session.isEmpty()) { -+ Q_XCB_CALL(xcb_change_property(xcb_connection(), -+ XCB_PROP_MODE_REPLACE, -+ m_clientLeader, -+ atom(QXcbAtom::SM_CLIENT_ID), -+ XCB_ATOM_STRING, -+ 8, -+ session.length(), -+ session.constData())); -+ } -+#endif -+ } -+ return m_clientLeader; -+} -+ - void QXcbConnection::processXcbEvents() - { - int connection_error = xcb_connection_has_error(xcb_connection()); -diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h -index 2911936..891fa9f 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(); - - bool hasDefaultVisualId() const { return m_defaultVisualId != UINT_MAX; } - xcb_visualid_t defaultVisualId() const { return m_defaultVisualId; } -@@ -639,6 +640,7 @@ private: - - QXcbWindow *m_focusWindow; - -+ xcb_window_t m_clientLeader; - QByteArray m_startupId; - QXcbSystemTrayTracker *m_systemTrayTracker; - QXcbGlIntegration *m_glIntegration; -diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp -index 040cea1..c7f8114 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, -- m_clientLeader, -- screen()->root, -- 0, 0, 1, 1, -- 0, -- XCB_WINDOW_CLASS_INPUT_OUTPUT, -- screen()->root_visual, -- 0, 0), connection); --#ifndef QT_NO_DEBUG -- QByteArray ba("Qt client leader window for screen "); -- ba += m_outputName.toUtf8(); -- Q_XCB_CALL2(xcb_change_property(xcb_connection(), -- XCB_PROP_MODE_REPLACE, -- m_clientLeader, -- atom(QXcbAtom::_NET_WM_NAME), -- atom(QXcbAtom::UTF8_STRING), -- 8, -- ba.length(), -- ba.constData()), connection); --#endif -- -- Q_XCB_CALL2(xcb_change_property(xcb_connection(), -- XCB_PROP_MODE_REPLACE, -- m_clientLeader, -- atom(QXcbAtom::WM_CLIENT_LEADER), -- XCB_ATOM_WINDOW, -- 32, -- 1, -- &m_clientLeader), connection); -- - xcb_depth_iterator_t depth_iterator = - xcb_screen_allowed_depths_iterator(screen()); - -diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h -index 4451947..ccc30c0 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; } -@@ -173,7 +171,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 --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp -index edf68d4..6e39f59 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 = 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)); -@@ -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 = 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, - XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, diff --git a/Add-a-linker-version-script-to-Qt-libraries.patch b/Add-a-linker-version-script-to-Qt-libraries.patch index 5eb0cbe..f891da9 100644 --- a/Add-a-linker-version-script-to-Qt-libraries.patch +++ b/Add-a-linker-version-script-to-Qt-libraries.patch @@ -29,7 +29,7 @@ Change-Id: I049a653beeb5454c9539ffff13e3fe6f050fdf31 5 files changed, 26 insertions(+) diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf -index 29e0521..3e0b3ba 100644 +index f82c8a843062d6591713160d865b51264cc9cb5b..0178bda75a97398d6ca78b2bb8f04ca3fe8b9455 100644 --- a/mkspecs/common/gcc-base-unix.conf +++ b/mkspecs/common/gcc-base-unix.conf @@ -22,3 +22,4 @@ QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold @@ -38,7 +38,7 @@ index 29e0521..3e0b3ba 100644 QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, +QMAKE_LFLAGS_VERSION_SCRIPT = -Wl,--version-script, diff --git a/mkspecs/common/qcc-base-qnx.conf b/mkspecs/common/qcc-base-qnx.conf -index a0a88b9..cebbe06 100644 +index a0a88b9605412e9c316a2ab831f71740245fbf20..cebbe06661196834701938cff84127667f9ddb35 100644 --- a/mkspecs/common/qcc-base-qnx.conf +++ b/mkspecs/common/qcc-base-qnx.conf @@ -19,6 +19,7 @@ QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link, @@ -50,14 +50,14 @@ index a0a88b9..cebbe06 100644 # Generic options for all BlackBerry/QNX qcc mkspecs QMAKE_CFLAGS_THREAD = -D_REENTRANT diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf -index 8919d41..3264740 100644 +index c89b6d2793bcaef69102c51c4433b304bf6fb769..5206691a17949eab630632f05d0f91d0e56d27b6 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -185,6 +185,28 @@ equals(QT_ARCH, i386):contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):compiler_support QMAKE_CXXFLAGS += -mfpmath=sse } -+!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static { ++unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!no_linker_version_script:!static { + verscript = $$OUT_PWD/$${TARGET}.version + QMAKE_LFLAGS += $${QMAKE_LFLAGS_VERSION_SCRIPT}$$verscript + @@ -83,7 +83,7 @@ index 8919d41..3264740 100644 #install directives diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf -index 8119c8a..0cd55ee 100644 +index 9190aa9f28cf6b38455a718afd6851d341ca57b5..4b10d42d44dd0cb8d788c6247099b42ba25c33a6 100644 --- a/mkspecs/linux-icc/qmake.conf +++ b/mkspecs/linux-icc/qmake.conf @@ -97,6 +97,7 @@ QMAKE_CXXFLAGS_PRECOMPILE = -c -pch-create ${QMAKE_PCH_OUTPUT} -include ${QMAKE_ @@ -95,7 +95,7 @@ index 8119c8a..0cd55ee 100644 # Symbol visibility control QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden diff --git a/mkspecs/unsupported/linux-host-g++/qmake.conf b/mkspecs/unsupported/linux-host-g++/qmake.conf -index 1523126..546ff21 100644 +index 1523126eaaa4761708fe58e449f8b43f6c3b8c14..546ff213498c80649d5a40810f068aca1c598494 100644 --- a/mkspecs/unsupported/linux-host-g++/qmake.conf +++ b/mkspecs/unsupported/linux-host-g++/qmake.conf @@ -71,6 +71,7 @@ QMAKE_PCH_OUTPUT_EXT = .gch @@ -107,4 +107,4 @@ index 1523126..546ff21 100644 # # qmake configuration for common linux -- -2.3.5 +2.6.0 diff --git a/Add-a-qt_version_tag-symbol-to-QtCore-that-uses-ELF-versions.patch b/Add-a-qt_version_tag-symbol-to-QtCore-that-uses-ELF-versions.patch index aa2a680..714d9c3 100644 --- a/Add-a-qt_version_tag-symbol-to-QtCore-that-uses-ELF-versions.patch +++ b/Add-a-qt_version_tag-symbol-to-QtCore-that-uses-ELF-versions.patch @@ -40,7 +40,7 @@ Change-Id: I049a653beeb5454c9539ffff13e3fec9aeb50197 create mode 100644 src/corelib/global/qversiontagging.cpp diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri -index bc11c77..fdbebca 100644 +index 6a8104bee2c129778efb86368a71392132dd2e22..7ca0734f1face0d4517fdb1257dbb9812f04d0d2 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -27,7 +27,8 @@ SOURCES += \ @@ -55,7 +55,7 @@ index bc11c77..fdbebca 100644 INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global diff --git a/src/corelib/global/qversiontagging.cpp b/src/corelib/global/qversiontagging.cpp new file mode 100644 -index 0000000..e3d9efa +index 0000000000000000000000000000000000000000..e3d9efa16b7677a29963020660bc9c4b4a143356 --- /dev/null +++ b/src/corelib/global/qversiontagging.cpp @@ -0,0 +1,62 @@ @@ -122,4 +122,4 @@ index 0000000..e3d9efa + +#endif -- -2.3.5 +2.6.0 diff --git a/Add-an-automatic-use-of-the-ELF-versioned-QtCore-symbol.patch b/Add-an-automatic-use-of-the-ELF-versioned-QtCore-symbol.patch index 8e35ead..33b73f2 100644 --- a/Add-an-automatic-use-of-the-ELF-versioned-QtCore-symbol.patch +++ b/Add-an-automatic-use-of-the-ELF-versioned-QtCore-symbol.patch @@ -1,4 +1,4 @@ -From 7a2d2a1c3b66308cf03a00757f8fd97f043ccde4 Mon Sep 17 00:00:00 2001 +From bdb8ab0690eb927575de6f3e34d2b49a148e046f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 2 Jun 2015 11:30:57 -0700 Subject: [PATCH] Add an automatic use of the ELF-versioned QtCore symbol @@ -10,27 +10,24 @@ QT_NO_VERSION_TAGGING is defined. The assembly expands to a COMDAT section, which is mergeable by the linker, so only one copy of the output is present in the ELF module. -The next commit will add a configure-time option to set -QT_NO_VERSION_TAGGING to qconfig.h. - This is enabled only for Linux and x86 / x86-64 / x32 due to the requirement of writing assembly and relocations, so it needs to be -tested on each platform, which I have not done. It probably works on the -BSDs too and might work on Solaris/x86, but again it requires -testing. Support for other architectures requires different assembly -output and relocations and can be added as needed, but they are not as -important since this trick is has most value on desktop systems. +tested on each platform, which I have not done. It might work on +Solaris/x86, but again it requires testing. Support for other +architectures requires different assembly output and relocations and can +be added as needed, but they are not as important since this trick is +has most value on desktop systems. Change-Id: I049a653beeb5454c9539ffff13e3ff5782a8cb86 --- src/corelib/global/global.pri | 3 +- src/corelib/global/qglobal.h | 1 + - src/corelib/global/qversiontagging.h | 80 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 83 insertions(+), 1 deletion(-) + src/corelib/global/qversiontagging.h | 86 ++++++++++++++++++++++++++++++++++++ + 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/corelib/global/qversiontagging.h diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri -index fdbebca..9f31fb9 100644 +index 2165a6c22e86948655c0074d50f8669c8a192d40..e231a8f1fddf8fd705f665089c235bd11a55f0b4 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -17,7 +17,8 @@ HEADERS += \ @@ -44,10 +41,10 @@ index fdbebca..9f31fb9 100644 SOURCES += \ global/archdetect.cpp \ diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h -index c4e2f76..e7995ac 100644 +index 15d9b6536a9f1ee85371fea6dc9115438eec32d1..1a5afbe753ad08d088c9174c58fcce54ce327e0e 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h -@@ -1103,6 +1103,7 @@ QT_END_NAMESPACE +@@ -1104,6 +1104,7 @@ QT_END_NAMESPACE #include #include #include @@ -57,7 +54,7 @@ index c4e2f76..e7995ac 100644 diff --git a/src/corelib/global/qversiontagging.h b/src/corelib/global/qversiontagging.h new file mode 100644 -index 0000000..94246dd +index 0000000000000000000000000000000000000000..94246dd08b139fe3b9040a95824dcb3116a5b790 --- /dev/null +++ b/src/corelib/global/qversiontagging.h @@ -0,0 +1,80 @@ @@ -142,4 +139,4 @@ index 0000000..94246dd + +#endif // QVERSIONTAGGING_H && !QT_NO_VERSION_TAGGING -- -2.3.5 +2.6.0 diff --git a/Fix-QtCore-compilation-with-clang.patch b/Fix-QtCore-compilation-with-clang.patch new file mode 100644 index 0000000..a9b3652 --- /dev/null +++ b/Fix-QtCore-compilation-with-clang.patch @@ -0,0 +1,102 @@ +From 4c738356ee4f20b6414e43a1cd73817f7eb28dd1 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 17 Sep 2015 11:35:36 -0700 +Subject: [PATCH 3/5] Fix QtCore compilation with clang + +The .altmacro is not supported with Clang's integrated assembly. + +The worst part is that I had this fixed, but apparently I never pushed +the update to Gerrit and then we staged the old version. This commit +brings back the fixes. + +Incidentally, it also makes things work with freebsd-clang. + +Change-Id: Id2a5d90d07d7ee470fcb9ad9696a9a0f9ced7ea7 +Reviewed-by: Lars Knoll +Reviewed-by: Simon Hausmann +(cherry picked from commit 05d401104ee6b10699b7288ead044d6765b19c4d) +--- + src/corelib/global/global.pri | 28 ++++++++++++++++++++++++++-- + src/corelib/global/qversiontagging.cpp | 15 +++++++++++---- + 2 files changed, 37 insertions(+), 6 deletions(-) + +diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri +index 7ca0734f1face0d4517fdb1257dbb9812f04d0d2..2165a6c22e86948655c0074d50f8669c8a192d40 100644 +--- a/src/corelib/global/global.pri ++++ b/src/corelib/global/global.pri +@@ -27,8 +27,7 @@ SOURCES += \ + global/qmalloc.cpp \ + global/qnumeric.cpp \ + global/qlogging.cpp \ +- global/qhooks.cpp \ +- global/qversiontagging.cpp ++ global/qhooks.cpp + + # qlibraryinfo.cpp includes qconfig.cpp + INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global +@@ -55,3 +54,28 @@ journald { + PKGCONFIG_PRIVATE += libsystemd-journal + DEFINES += QT_USE_JOURNALD + } ++ ++linux|freebsd { ++ VERSIONTAGGING_SOURCES = global/qversiontagging.cpp ++ ltcg|clang { ++ versiontagging_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS) $(INCPATH) ++ ++ # Disable LTO, as the global inline assembly may not get processed ++ versiontagging_compiler.commands += -fno-lto ++ ++ # Disable the integrated assembler for Clang, since it can't parse with ++ # the alternate macro syntax in use in qversiontagging.cpp ++ clang: versiontagging_compiler.commands += -no-integrated-as ++ ++ versiontagging_compiler.commands += -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} ++ versiontagging_compiler.dependency_type = TYPE_C ++ versiontagging_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} ++ versiontagging_compiler.input = VERSIONTAGGING_SOURCES ++ versiontagging_compiler.variable_out = OBJECTS ++ versiontagging_compiler.name = compiling[versiontagging] ${QMAKE_FILE_IN} ++ silent: versiontagging_compiler.commands = @echo compiling[versiontagging] ${QMAKE_FILE_IN} && $$versiontagging_compiler.commands ++ QMAKE_EXTRA_COMPILERS += versiontagging_compiler ++ } else { ++ SOURCES += $$VERSIONTAGGING_SOURCES ++ } ++} +diff --git a/src/corelib/global/qversiontagging.cpp b/src/corelib/global/qversiontagging.cpp +index e3d9efa16b7677a29963020660bc9c4b4a143356..66d3f8d00f7297d98c08cfa7aa359874e2e0aa8f 100644 +--- a/src/corelib/global/qversiontagging.cpp ++++ b/src/corelib/global/qversiontagging.cpp +@@ -33,18 +33,25 @@ + + #include "qglobal.h" + +-#if defined(Q_CC_GNU) && defined(Q_OS_LINUX) && defined(Q_PROCESSOR_X86) && !defined(QT_STATIC) ++#if defined(Q_CC_GNU) && (defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)) && defined(Q_PROCESSOR_X86) && !defined(QT_STATIC) + # define SYM QT_MANGLE_NAMESPACE(qt_version_tag) + # define SSYM QT_STRINGIFY(SYM) + + asm( ++// ASM macro that makes one ELF versioned symbol ++".macro make_versioned_symbol plainsym versionedsym\n" ++".globl plainsym\n" ++".type plainsym, @object\n" ++".size plainsym, 1\n" ++".symver plainsym, versionedsym\n" ++"plainsym :\n" ++".endm\n" ++ + // ASM macro that makes one ELF versioned symbol qt_version_tag{sep}Qt_{major}.{minor} + // that is an alias to qt_version_tag_{major}_{minor}. + // The {sep} parameter must be @ for all old versions and @@ for the current version. + ".macro make_one_tag major minor sep\n" +-".globl " SSYM "_\\major\\()_\\minor\n" // make the symbol global +-SSYM "_\\major\\()_\\minor:\n" // declare it +-" .symver " SSYM "_\\major\\()_\\minor, " SSYM "\\sep\\()Qt_\\major\\().\\minor\n" ++" make_versioned_symbol " SSYM "_\\major\\()_\\minor, " SSYM "\\sep\\()Qt_\\major\\().\\minor\n" + ".endm\n" + + ".altmacro\n" +-- +2.6.0 + diff --git a/Fix-compile-error-on-big-endian.patch b/Fix-compile-error-on-big-endian.patch deleted file mode 100644 index e39362d..0000000 --- a/Fix-compile-error-on-big-endian.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 02ab210ea9bc5ee53fa4f1db2f068ce24272a6cd Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Fri, 3 Jul 2015 14:19:02 +0200 -Subject: [PATCH] Fix compile error on big endian - -DestFormat is not defined here but should be Format_RGBX8888 - -Change-Id: Ie33989a6fc31650434281a6b7b0f4806524268af -Reviewed-by: Konstantin Ritt -Reviewed-by: Timo Jyrinki -Reviewed-by: Simon Hausmann ---- - src/gui/image/qimage_conversions.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: qtbase-opensource-src-5.5.0/src/gui/image/qimage_conversions.cpp -=================================================================== ---- qtbase-opensource-src-5.5.0.orig/src/gui/image/qimage_conversions.cpp -+++ qtbase-opensource-src-5.5.0/src/gui/image/qimage_conversions.cpp -@@ -1103,7 +1103,7 @@ static bool mask_alpha_converter_rgbx_in - } - rgb_data += pad; - } -- data->format = DestFormat; -+ data->format = QImage::Format_RGBX8888; - return true; - #endif - } diff --git a/Fix-shortcuts-with-keypad-keys.patch b/Fix-shortcuts-with-keypad-keys.patch deleted file mode 100644 index af32f65..0000000 --- a/Fix-shortcuts-with-keypad-keys.patch +++ /dev/null @@ -1,93 +0,0 @@ -From c137502c7fd7550c780c9531ec414098d8101757 Mon Sep 17 00:00:00 2001 -From: Alexander Volkov -Date: Thu, 18 Sep 2014 16:16:26 +0400 -Subject: Fix shortcuts with keypad keys - -The way of searching a shortcut match for a key without the keypad -modifier introduced in 547a1bea492954d828aa0798be93384669812489 is -not correct. QKeyEvent::setModifiers() doesn't change native scan code -so we get the incorrect QKeyEvent object which is eventually passed to -the implementation of QPlatformIntegration::possibleKeys(). -And then QPlatformIntegration::possibleKeys() returns the same result -as for the original QKeyEvent object. - -So to fix it we have to remove Qt::KeypadModifier from keys after -calling the implementation of QPlatformIntegration::possibleKeys(), -as it was before 547a1bea492954d828aa0798be93384669812489. - -Task-number: QTBUG-33093 -Task-number: QTBUG-20191 -Change-Id: I5b33c9b6cf2c06b133166a31eba9aff9181c9483 ---- - src/gui/kernel/qshortcutmap.cpp | 12 +++++------- - src/gui/kernel/qshortcutmap_p.h | 4 ++-- - 2 files changed, 7 insertions(+), 9 deletions(-) - -diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp -index cad707a..83377af 100644 ---- a/src/gui/kernel/qshortcutmap.cpp -+++ b/src/gui/kernel/qshortcutmap.cpp -@@ -380,9 +380,7 @@ QKeySequence::SequenceMatch QShortcutMap::nextState(QKeyEvent *e) - result = find(e); - if (result == QKeySequence::NoMatch && (e->modifiers() & Qt::KeypadModifier)) { - // Try to find a match without keypad modifier -- QKeyEvent event = *e; -- event.setModifiers(e->modifiers() & ~Qt::KeypadModifier); -- result = find(&event); -+ result = find(e, Qt::KeypadModifier); - } - if (result == QKeySequence::NoMatch && e->modifiers() & Qt::ShiftModifier) { - // If Shift + Key_Backtab, also try Shift + Qt::Key_Tab -@@ -435,13 +433,13 @@ bool QShortcutMap::hasShortcutForKeySequence(const QKeySequence &seq) const - which can be access through matches(). - \sa matches - */ --QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e) -+QKeySequence::SequenceMatch QShortcutMap::find(QKeyEvent *e, int ignoredModifiers) - { - Q_D(QShortcutMap); - if (!d->sequences.count()) - return QKeySequence::NoMatch; - -- createNewSequences(e, d->newEntries); -+ createNewSequences(e, d->newEntries, ignoredModifiers); - #if defined(DEBUG_QSHORTCUTMAP) - qDebug() << "Possible shortcut key sequences:" << d->newEntries; - #endif -@@ -543,7 +541,7 @@ void QShortcutMap::clearSequence(QVector &ksl) - Alters \a seq to the new sequence state, based on the - current sequence state, and the new key event \a e. - */ --void QShortcutMap::createNewSequences(QKeyEvent *e, QVector &ksl) -+void QShortcutMap::createNewSequences(QKeyEvent *e, QVector &ksl, int ignoredModifiers) - { - Q_D(QShortcutMap); - QList possibleKeys = QKeyMapper::possibleKeys(e); -@@ -573,7 +571,7 @@ void QShortcutMap::createNewSequences(QKeyEvent *e, QVector &ksl) - curKsl.setKey(0, 2); - curKsl.setKey(0, 3); - } -- curKsl.setKey(possibleKeys.at(pkNum), index); -+ curKsl.setKey(possibleKeys.at(pkNum) & ~ignoredModifiers, index); - } - } - } -diff --git a/src/gui/kernel/qshortcutmap_p.h b/src/gui/kernel/qshortcutmap_p.h -index b2e0945..d4a0021 100644 ---- a/src/gui/kernel/qshortcutmap_p.h -+++ b/src/gui/kernel/qshortcutmap_p.h -@@ -88,10 +88,10 @@ private: - QKeySequence::SequenceMatch state(); - void dispatchEvent(QKeyEvent *e); - -- QKeySequence::SequenceMatch find(QKeyEvent *e); -+ QKeySequence::SequenceMatch find(QKeyEvent *e, int ignoredModifiers = 0); - QKeySequence::SequenceMatch matches(const QKeySequence &seq1, const QKeySequence &seq2) const; - QVector matches() const; -- void createNewSequences(QKeyEvent *e, QVector &ksl); -+ void createNewSequences(QKeyEvent *e, QVector &ksl, int ignoredModifiers); - void clearSequence(QVector &ksl); - int translateModifiers(Qt::KeyboardModifiers modifiers); - --- -cgit v0.11.0 diff --git a/QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch b/QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch deleted file mode 100644 index c4f05f3..0000000 --- a/QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch +++ /dev/null @@ -1,47 +0,0 @@ -From eda79a467ee7e45f3de63973b633e2a790b613eb Mon Sep 17 00:00:00 2001 -From: Marc Mutz -Date: Thu, 25 Jun 2015 22:34:58 +0200 -Subject: QDate/QTime: fix SiC introduced by adding new non-explicit ctors - -The new constructors were added in c94d41d9 to help -constexpr'ify QDate and QTime. Even though private, -they participate in overload resolution and break -function pairs overloaded on QDate and int or -QTime and int. - -Mark them explicit. - -[ChangeLog][QtCore][QDate/QTime] Fixed a minor source-incompatibility -between Qt 5.4 and 5.5.0 involving sets of functions overloaded on -QTime and some integer or QDate and some integer. - -Change-Id: I65a09aaca2b083cda90255c24cc72ef51119d3b1 -Reviewed-by: Olivier Goffart (Woboq GmbH) ---- - src/corelib/tools/qdatetime.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h -index 78ec2b1..6651efd 100644 ---- a/src/corelib/tools/qdatetime.h -+++ b/src/corelib/tools/qdatetime.h -@@ -59,7 +59,7 @@ public: - StandaloneFormat - }; - private: -- Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {} -+ explicit Q_DECL_CONSTEXPR QDate(qint64 julianDay) : jd(julianDay) {} - public: - Q_DECL_CONSTEXPR QDate() : jd(nullJd()) {} - QDate(int y, int m, int d); -@@ -138,7 +138,7 @@ Q_DECLARE_TYPEINFO(QDate, Q_MOVABLE_TYPE); - - class Q_CORE_EXPORT QTime - { -- Q_DECL_CONSTEXPR QTime(int ms) : mds(ms) -+ explicit Q_DECL_CONSTEXPR QTime(int ms) : mds(ms) - #if defined(Q_OS_WINCE) - , startTick(NullTime) - #endif --- -cgit v0.11.0 diff --git a/QMimeDatabase-use-QElapsedTimer.patch b/QMimeDatabase-use-QElapsedTimer.patch deleted file mode 100644 index 56ae7e3..0000000 --- a/QMimeDatabase-use-QElapsedTimer.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 849aebc0ce344dedc91035bf4bcc7ccb4c15ffe4 Mon Sep 17 00:00:00 2001 -From: David Faure -Date: Mon, 27 Jul 2015 00:22:11 +0200 -Subject: [PATCH] QMimeDatabase: use QElapsedTimer instead of - QDateTime::currentDateTime() - -This reduces the number of syscalls greatly, by avoiding the timezone -conversion every time. - -Change-Id: I39a54def4b45f25c6e037ced6943b05ddc749c9d ---- - src/corelib/mimetypes/qmimeprovider.cpp | 5 ++--- - src/corelib/mimetypes/qmimeprovider_p.h | 3 ++- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp -index 7342a5c..3914710 100644 ---- a/src/corelib/mimetypes/qmimeprovider.cpp -+++ b/src/corelib/mimetypes/qmimeprovider.cpp -@@ -79,10 +79,9 @@ Q_CORE_EXPORT int qmime_secondsBetweenChecks = 5; // exported for the unit test - - bool QMimeProviderBase::shouldCheck() - { -- const QDateTime now = QDateTime::currentDateTime(); -- if (m_lastCheck.isValid() && m_lastCheck.secsTo(now) < qmime_secondsBetweenChecks) -+ if (m_lastCheck.isValid() && m_lastCheck.elapsed() < qmime_secondsBetweenChecks * 1000) - return false; -- m_lastCheck = now; -+ m_lastCheck.start(); - return true; - } - -diff --git a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h -index 5a89ac2..eaf9594 100644 ---- a/src/corelib/mimetypes/qmimeprovider_p.h -+++ b/src/corelib/mimetypes/qmimeprovider_p.h -@@ -51,6 +51,7 @@ - - #include - #include -+#include - - QT_BEGIN_NAMESPACE - -@@ -77,7 +78,7 @@ public: - QMimeDatabasePrivate *m_db; - protected: - bool shouldCheck(); -- QDateTime m_lastCheck; -+ QElapsedTimer m_lastCheck; - }; - - /* --- -2.3.5 diff --git a/ignore-disabling-of-outputs-in-the-middle-of-the-mode-switch.patch b/ignore-disabling-of-outputs-in-the-middle-of-the-mode-switch.patch deleted file mode 100644 index f76a0cf..0000000 --- a/ignore-disabling-of-outputs-in-the-middle-of-the-mode-switch.patch +++ /dev/null @@ -1,54 +0,0 @@ -From ae51e360f986698eaf41fdb38f8a878a50f69be1 Mon Sep 17 00:00:00 2001 -From: Alexander Volkov -Date: Fri, 19 Jun 2015 13:34:11 +0300 -Subject: xcb: Ignore disabling of outputs in the middle of the mode switch -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -X server may send RROutputChangeNotify event with null crtc and mode, -when it switches an output mode. Request RROutputInfo to distinguish -this case from the case when the output is explicitly disabled. - -Change-Id: I4c2356ec71dbcc8013009ea8a6f46dd11f19d6bb -Task-number: QTBUG-44158 -Task-number: QTBUG-46786 -Task-number: QTBUG-46822 -Reviewed-by: Daniel Vrátil -Reviewed-by: Gatis Paeglis -Reviewed-by: Shawn Rutledge ---- - src/plugins/platforms/xcb/qxcbconnection.cpp | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp -index 0867615..29e1fd1 100644 ---- a/src/plugins/platforms/xcb/qxcbconnection.cpp -+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp -@@ -265,11 +265,19 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event) - } else if (screen) { - // Screen has been disabled -> remove - if (output.crtc == XCB_NONE && output.mode == XCB_NONE) { -- qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled"; -- m_screens.removeOne(screen); -- foreach (QXcbScreen *otherScreen, m_screens) -- otherScreen->removeVirtualSibling((QPlatformScreen *) screen); -- QXcbIntegration::instance()->destroyScreen(screen); -+ xcb_randr_get_output_info_cookie_t outputInfoCookie = -+ xcb_randr_get_output_info(xcb_connection(), output.output, output.config_timestamp); -+ QScopedPointer outputInfo( -+ xcb_randr_get_output_info_reply(xcb_connection(), outputInfoCookie, NULL)); -+ if (outputInfo->crtc == XCB_NONE) { -+ qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled"; -+ m_screens.removeOne(screen); -+ foreach (QXcbScreen *otherScreen, m_screens) -+ otherScreen->removeVirtualSibling((QPlatformScreen *) screen); -+ QXcbIntegration::instance()->destroyScreen(screen); -+ } else { -+ qCDebug(lcQpaScreen) << "output" << screen->name() << "has been temporarily disabled for the mode switch"; -+ } - } else { - // Just update existing screen - screen->updateGeometry(output.config_timestamp); --- -cgit v0.11.0 diff --git a/libqt5-qtbase.changes b/libqt5-qtbase.changes index 865dfb8..696b4bb 100644 --- a/libqt5-qtbase.changes +++ b/libqt5-qtbase.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Oct 16 20:22:25 UTC 2015 - hrvoje.senjan@gmail.com + +- Update to 5.5.1 + * For more details please see: + http://blog.qt.io/blog/2015/10/15/qt-5-5-1-released/ +- Drop patches merged upstream: + 0002-xcb-Fix-getting-the-window-types-from-the-property-o.patch + 0003-Fix-centering-dialogs.patch + 0004-xcb-Set-_NET_WM_WINDOW_TYPE-from-a-single-place.patch + 0006-xcb-set-SM_CLIENT_ID-property.patch + Fix-compile-error-on-big-endian.patch + Fix-shortcuts-with-keypad-keys.patch + QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch + QMimeDatabase-use-QElapsedTimer.patch + ignore-disabling-of-outputs-in-the-middle-of-the-mode-switch.patch + when-a-screen-comes-back-online-the-windows-need-to-be-told-about-it.patch +- Added Fix-QtCore-compilation-with-clang.patch and + move-the-official-Qt-version-from-qglobal-to-qmake-conf.patch in + order to remove link-time warnings (warning: type and size of dynamic + symbol `qt_version_tag@@Qt_5.5' are not defined) + ------------------------------------------------------------------- Mon Oct 12 17:53:42 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/libqt5-qtbase.spec b/libqt5-qtbase.spec index e0caca0..6281ab9 100644 --- a/libqt5-qtbase.spec +++ b/libqt5-qtbase.spec @@ -26,15 +26,15 @@ %endif Name: libqt5-qtbase -Version: 5.5.0 +Version: 5.5.1 Release: 0 Summary: C++ Program Library, Core Components License: GPL-3.0 or SUSE-LGPL-2.1-with-digia-exception-1.1 Group: System/Libraries Url: http://qt.digia.com %define base_name libqt5 -%define real_version 5.5.0 -%define so_version 5.5.0 +%define real_version 5.5.1 +%define so_version 5.5.1 %define tar_version qtbase-opensource-src-%{real_version} Source: %{tar_version}.tar.xz # to get mtime of file: @@ -51,26 +51,17 @@ Patch3: libqt5-Fix-Gujarati-font.patch Patch4: protect-geometry-QTBUG-40584.patch # Patch-FIX-SUSE libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch -- bnc#888858 Patch5: libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch -# PATCH-FIX-OPENSUSE Fix-shortcuts-with-keypad-keys.patch -- https://codereview.qt-project.org/#/c/95219/ -Patch8: Fix-shortcuts-with-keypad-keys.patch # patches 1000-2000 and above from upstream 5.3 branch # # patches 2000-3000 and above from upstream 5.5 branch # -Patch2000: ignore-disabling-of-outputs-in-the-middle-of-the-mode-switch.patch -Patch2001: when-a-screen-comes-back-online-the-windows-need-to-be-told-about-it.patch Patch2010: 0001-Fix-QWidget-setWindowRole.patch -Patch2011: 0002-xcb-Fix-getting-the-window-types-from-the-property-o.patch -Patch2012: 0003-Fix-centering-dialogs.patch -Patch2013: 0004-xcb-Set-_NET_WM_WINDOW_TYPE-from-a-single-place.patch Patch2014: 0005-Restore-documented-behavior-for-the-WA_X11NetWmWindo.patch -Patch2015: 0006-xcb-set-SM_CLIENT_ID-property.patch -Patch2016: QMimeDatabase-use-QElapsedTimer.patch -Patch2017: QDate_QTime-fix-SiC-introduced-by-adding-new-non-explicit-ctors.patch Patch3000: Add-a-linker-version-script-to-Qt-libraries.patch Patch3001: Add-a-qt_version_tag-symbol-to-QtCore-that-uses-ELF-versions.patch -Patch3002: Add-an-automatic-use-of-the-ELF-versioned-QtCore-symbol.patch -Patch3003: Fix-compile-error-on-big-endian.patch -Patch3004: xcb-fix-yet-another-crash-when-screens-are-disconnected.patch -Patch3005: xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch +Patch3002: Fix-QtCore-compilation-with-clang.patch +Patch3003: move-the-official-Qt-version-from-qglobal-to-qmake-conf.patch +Patch3004: Add-an-automatic-use-of-the-ELF-versioned-QtCore-symbol.patch +Patch3005: xcb-fix-yet-another-crash-when-screens-are-disconnected.patch +Patch3006: xcb-dont-crash-in-mapToNativemapFromNative-if-the-screen-is-null.patch BuildRequires: alsa-devel BuildRequires: cups-devel BuildRequires: gcc-c++ @@ -153,23 +144,15 @@ handling. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch8 -p1 -%patch2000 -p1 -%patch2001 -p1 -%patch2011 -p1 -%patch2012 -p1 -%patch2013 -p1 %patch2010 -p1 %patch2014 -p1 -%patch2015 -p1 -%patch2016 -p1 -%patch2017 -p1 %patch3000 -p1 %patch3001 -p1 %patch3002 -p1 %patch3003 -p1 %patch3004 -p1 %patch3005 -p1 +%patch3006 -p1 # be sure not to use them rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib} diff --git a/move-the-official-Qt-version-from-qglobal-to-qmake-conf.patch b/move-the-official-Qt-version-from-qglobal-to-qmake-conf.patch new file mode 100644 index 0000000..21a1737 --- /dev/null +++ b/move-the-official-Qt-version-from-qglobal-to-qmake-conf.patch @@ -0,0 +1,332 @@ +From 2d2cb6434f1d6e00f421c98b20467ff3f4388319 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 17 Sep 2015 18:17:40 -0700 +Subject: Move the official Qt version from qglobal.h to .qmake.conf + +It's easier to parse than qglobal.h. The objective is actually to have +macros with parts of the version number, so the major or minor numbers +could be used in other preprocessor macros. + +Change-Id: I42e7ef1a481840699a8dffff1404eda1dd5c308d +Reviewed-by: Oswald Buddenhagen +--- + .qmake.conf | 3 +-- + bin/syncqt.pl | 8 +------- + configure | 37 +++++++++++++++++++++---------------- + configure.bat | 20 ++++++++++++++++++-- + qmake/Makefile.unix | 1 + + qmake/Makefile.win32 | 1 + + src/corelib/global/qglobal.h | 4 ++-- + tools/configure/Makefile.mingw | 2 +- + tools/configure/Makefile.win32 | 2 +- + tools/configure/configureapp.cpp | 37 ++++++++++++++++++++++--------------- + 10 files changed, 69 insertions(+), 46 deletions(-) + +diff --git a/.qmake.conf b/.qmake.conf +index 481544b253daa7a41485c5eeddd6d2ef694a4b70..732b5da2621f2fc821404e7aef3ab7ed576dfc0c 100644 +--- a/.qmake.conf ++++ b/.qmake.conf +@@ -5,5 +5,4 @@ CONFIG += warning_clean + QT_SOURCE_TREE = $$PWD + QT_BUILD_TREE = $$shadowed($$PWD) + +-# In qtbase, all modules follow qglobal.h +-MODULE_VERSION = $$QT_VERSION ++MODULE_VERSION = 5.5.1 +diff --git a/bin/syncqt.pl b/bin/syncqt.pl +index 3b3e127e86e664185a6b94829ac968673bf75651..c75390c561debf6558a4b7ae4b237b44a7c8f16b 100755 +--- a/bin/syncqt.pl ++++ b/bin/syncqt.pl +@@ -786,6 +786,7 @@ while ( @ARGV ) { + + # if we have no $basedir we cannot be sure which sources you want, so die + die "Could not find any sync.profile for your module!\nPass to syncqt to sync your header files.\nsyncqt failed" if (!$basedir); ++die "The -version argument is mandatory" if (!$module_version); + + our @ignore_headers = (); + our @ignore_for_master_contents = (); +@@ -803,13 +804,6 @@ my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate; + + $isunix = checkUnix; #cache checkUnix + +-if (!$module_version) { +- my $filco = fileContents($basedir."/src/corelib/global/qglobal.h"); +- if ($filco !~ m,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,sm) { +- die "Cannot determine Qt/Module version. Use -version.\n"; +- } +- $module_version = $1; +-} + foreach my $lib (@modules_to_sync) { + die "No such module: $lib" unless(defined $modules{$lib}); + +diff --git a/configure b/configure +index cea62fbc0c46ae54938df282fffbbfde5bf794d6..45c74a61dc04b3cb80452eec22fda6189fc29795 100755 +--- a/configure ++++ b/configure +@@ -539,23 +539,16 @@ fi + #----------------------------------------------------------------------------- + # Qt version detection + #----------------------------------------------------------------------------- +-QT_VERSION=`grep '^# *define *QT_VERSION_STR' "$relpath"/src/corelib/global/qglobal.h` ++QT_VERSION= + QT_MAJOR_VERSION= + QT_MINOR_VERSION=0 + QT_PATCH_VERSION=0 +-if [ -n "$QT_VERSION" ]; then +- QT_VERSION=`echo $QT_VERSION | sed 's,^# *define *QT_VERSION_STR *"*\([^ ]*\)"$,\1,'` +- MAJOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'` +- if [ -n "$MAJOR" ]; then +- MINOR=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'` +- PATCH=`echo $QT_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'` +- QT_MAJOR_VERSION="$MAJOR" +- [ -z "$MINOR" ] || QT_MINOR_VERSION="$MINOR" +- [ -z "$PATCH" ] || QT_PATCH_VERSION="$PATCH" +- fi +-fi ++eval `sed -n -e 's/^MODULE_VERSION = \(\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*\)$/QT_VERSION=\1\ ++ QT_MAJOR_VERSION=\2\ ++ QT_MINOR_VERSION=\3\ ++ QT_PATCH_VERSION=\4/p' < "$relpath"/.qmake.conf` + if [ -z "$QT_MAJOR_VERSION" ]; then +- echo "Cannot process version from qglobal.h: $QT_VERSION" ++ echo "Cannot process version from .qmake.conf" + echo "Cannot proceed." + exit 1 + fi +@@ -3896,7 +3889,7 @@ if [ -e "$relpath/.git" ]; then + exit 1 + fi + +- "$relpath/bin/syncqt.pl" -minimal -module QtCore "$relpath" || exit 1 ++ "$relpath/bin/syncqt.pl" -version $QT_VERSION -minimal -module QtCore "$relpath" || exit 1 + fi + + # $1: input variable name (awk regexp) +@@ -4038,6 +4031,9 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; + fi + echo "QMAKESPEC = $adjqmakespec" >> "$mkfile" + echo "QT_VERSION = $QT_VERSION" >> "$mkfile" ++ echo "QT_MAJOR_VERSION = $QT_MAJOR_VERSION" >> "$mkfile" ++ echo "QT_MINOR_VERSION = $QT_MINOR_VERSION" >> "$mkfile" ++ echo "QT_PATCH_VERSION = $QT_PATCH_VERSION" >> "$mkfile" + echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile" + echo "EXTRA_CXXFLAGS = $EXTRA_CXXFLAGS" >> "$mkfile" + echo "QTOBJS =" $EXTRA_OBJS >> "$mkfile" +@@ -6514,13 +6510,22 @@ esac + # part of configuration information goes into qconfig.h + #------------------------------------------------------------------------------- + ++# start with Qt's version number ++cat > "$outpath/src/corelib/global/qconfig.h.new" <"$outpath/src/corelib/global/qconfig.h.new" ++ echo "/* Everything */" >>"$outpath/src/corelib/global/qconfig.h.new" + ;; + *) + tmpconfig="$outpath/src/corelib/global/qconfig.h.new" +- echo "#ifndef QT_BOOTSTRAPPED" >"$tmpconfig" ++ echo "#ifndef QT_BOOTSTRAPPED" >>"$tmpconfig" + cat "$CFG_QCONFIG_PATH" >>"$tmpconfig" + echo "#endif" >>"$tmpconfig" + ;; +diff --git a/configure.bat b/configure.bat +index 1220bfedc2de5ad78edbd636f4af7e39dbfde27b..47acf26d6278d43e70d3d6369a4f1cf06b3a57f7 100644 +--- a/configure.bat ++++ b/configure.bat +@@ -34,6 +34,7 @@ + @echo off + set QTSRC=%~dp0 + set QTDIR=%CD% ++ + if not exist %QTSRC%.gitignore goto sconf + echo Please wait while bootstrapping configure ... + +@@ -47,7 +48,18 @@ if not exist mkspecs ( + md mkspecs + if errorlevel 1 goto exit + ) +-perl %QTSRC%bin\syncqt.pl -minimal -module QtCore -outdir "%QTDIR%" %QTSRC% ++ ++rem Extract Qt's version from .qmake.conf ++for /f "eol=# tokens=1,2,3,4 delims=.= " %%i in (%QTSRC%.qmake.conf) do ( ++ if %%i == MODULE_VERSION ( ++ set QTVERMAJ=%%j ++ set QTVERMIN=%%k ++ set QTVERPAT=%%l ++ ) ++) ++set QTVERSION=%QTVERMAJ%.%QTVERMIN%.%QTVERPAT% ++ ++perl %QTSRC%bin\syncqt.pl -minimal -version %QTVERSION% -module QtCore -outdir "%QTDIR%" %QTSRC% + if errorlevel 1 goto exit + + if not exist tools\configure ( +@@ -62,7 +74,11 @@ if not "%jom.exe%" == "" set make=jom + + echo #### Generated by configure.bat - DO NOT EDIT! ####> Makefile + echo/>> Makefile +-for /f "tokens=3 usebackq" %%V in (`findstr QT_VERSION_STR %QTSRC%src\corelib\global\qglobal.h`) do @echo QTVERSION = %%~V>> Makefile ++echo QTVERSION = %QTVERSION%>> Makefile ++rem These must have trailing spaces to avoid misinterpretation as 5>>, etc. ++echo QT_VERSION_MAJOR = %QTVERMAJ% >> Makefile ++echo QT_VERSION_MINOR = %QTVERMIN% >> Makefile ++echo QT_VERSION_PATCH = %QTVERPAT% >> Makefile + if not "%icl.exe%" == "" ( + echo CXX = icl>>Makefile + echo EXTRA_CXXFLAGS = /Zc:forScope>>Makefile +diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix +index 86f884fe209195d814e8037fd8e9352e3e585ad0..d2d7bf7e6327fa57576c5dfe803c335ef4b965ca 100644 +--- a/qmake/Makefile.unix ++++ b/qmake/Makefile.unix +@@ -101,6 +101,7 @@ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \ + -I$(BUILD_PATH)/src/corelib/global -DHAVE_QCONFIG_CPP \ + -I$(QMAKESPEC) \ + -I$(SOURCE_PATH)/tools/shared \ ++ -DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \ + -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \ + -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ + -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ +diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 +index 9dda6ca1e7b7399e6179732b677824d624e745d0..fdbb9c8499a78a980cf3e0a7900567320aae9676 100644 +--- a/qmake/Makefile.win32 ++++ b/qmake/Makefile.win32 +@@ -36,6 +36,7 @@ CFLAGS_BARE = -c -Fo./ -Fdqmake.pdb \ + -I$(BUILD_PATH)\src\corelib\global -DHAVE_QCONFIG_CPP \ + -I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \ + -I$(SOURCE_PATH)\tools\shared \ ++ -DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \ + -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \ + -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ + -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ +diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h +index 97c5f37cab02c35bfdb75ec8ab58b97dc0a6b1de..15d9b6536a9f1ee85371fea6dc9115438eec32d1 100644 +--- a/src/corelib/global/qglobal.h ++++ b/src/corelib/global/qglobal.h +@@ -41,11 +41,10 @@ + + #include + +-#define QT_VERSION_STR "5.5.1" + /* + QT_VERSION is (major << 16) + (minor << 8) + patch. + */ +-#define QT_VERSION 0x050501 ++#define QT_VERSION QT_VERSION_CHECK(QT_VERSION_MAJOR, QT_VERSION_MINOR, QT_VERSION_PATCH) + /* + can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) + */ +@@ -55,6 +54,7 @@ + #include + #include + #endif ++ + #ifdef _MSC_VER + # define QT_SUPPORTS(FEATURE) (!defined QT_NO_##FEATURE) + #else +diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw +index 9ac99fd678f46445771147d80542e9bba3b37acf..6ec77c8ab511c4375711964fbb41e9a817decf2e 100644 +--- a/tools/configure/Makefile.mingw ++++ b/tools/configure/Makefile.mingw +@@ -4,7 +4,7 @@ CONFSRC = $(TOOLSRC)/configure + + RAW_PCH = configure_pch.h + PCH = $(RAW_PCH).gch/c++ +-DEFINES = -DUNICODE -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE ++DEFINES = -DUNICODE -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH) + INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++" + CXXFLAGS_BARE = -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH) + CXXFLAGS = -include $(RAW_PCH) $(CXXFLAGS_BARE) +diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 +index 8c6d213e4243b444357712cf6c0d8d4dcfa3ff36..456e441c6f548bc3e3c0ac0a8847bf965aeb5902 100644 +--- a/tools/configure/Makefile.win32 ++++ b/tools/configure/Makefile.win32 +@@ -3,7 +3,7 @@ TOOLSRC = $(QTSRC)tools + CONFSRC = $(TOOLSRC)\configure + + PCH = configure_pch.pch +-DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE ++DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH) + INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2008" + CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) + CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE) +diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp +index 3bf0546ac1628e8ab51979526bb102d1e8db8de8..36cc8b03cd24ddb5d01d85fc57254059e76a49da 100644 +--- a/tools/configure/configureapp.cpp ++++ b/tools/configure/configureapp.cpp +@@ -197,20 +197,18 @@ Configure::Configure(int& argc, char** argv) + dictionary[ "QT_INSTALL_SETTINGS" ] = "/etc/xdg"; + + QString version; +- QFile qglobal_h(sourcePath + "/src/corelib/global/qglobal.h"); +- if (qglobal_h.open(QFile::ReadOnly)) { +- QTextStream read(&qglobal_h); +- QRegExp version_regexp("^# *define *QT_VERSION_STR *\"([^\"]*)\""); +- QString line; +- while (!read.atEnd()) { +- line = read.readLine(); +- if (version_regexp.exactMatch(line)) { +- version = version_regexp.cap(1).trimmed(); +- if (!version.isEmpty()) +- break; +- } ++ QFile qmake_conf(sourcePath + "/.qmake.conf"); ++ if (qmake_conf.open(QFile::ReadOnly)) { ++ while (!qmake_conf.atEnd()) { ++ static const char beginning[] = "MODULE_VERSION = "; ++ QByteArray line = qmake_conf.readLine(); ++ if (!line.startsWith(beginning)) ++ continue; ++ ++ version = qMove(line).mid(int(strlen(beginning))).trimmed(); ++ break; + } +- qglobal_h.close(); ++ qmake_conf.close(); + } + + if (version.isEmpty()) +@@ -3540,6 +3538,12 @@ void Configure::generateConfigfiles() + { + FileWriter tmpStream(buildPath + "/src/corelib/global/qconfig.h"); + ++ tmpStream << "#define QT_VERSION_MAJOR " << dictionary["VERSION_MAJOR"] << endl ++ << "#define QT_VERSION_MINOR " << dictionary["VERSION_MINOR"] << endl ++ << "#define QT_VERSION_PATCH " << dictionary["VERSION_PATCH"] << endl ++ << "#define QT_VERSION_STR \"" << dictionary["VERSION"] << "\"\n" ++ << endl; ++ + if (dictionary[ "QCONFIG" ] == "full") { + tmpStream << "/* Everything */" << endl; + } else { +@@ -3939,7 +3943,7 @@ void Configure::generateHeaders() + QStringList args; + args << "perl" << "-w"; + args += sourcePath + "/bin/syncqt.pl"; +- args << "-minimal" << "-module" << "QtCore"; ++ args << "-version" << dictionary["VERSION"] << "-minimal" << "-module" << "QtCore"; + args += sourcePath; + int retc = Environment::execute(args, QStringList(), QStringList()); + if (retc) { +@@ -4202,7 +4206,10 @@ void Configure::buildQmake() + << "INC_PATH = " << QDir::toNativeSeparators( + (QFile::exists(sourcePath + "/.git") ? ".." : sourcePath) + + "/include") << endl; +- stream << "QT_VERSION = " << dictionary["VERSION"] << endl; ++ stream << "QT_VERSION = " << dictionary["VERSION"] << endl ++ << "QT_MAJOR_VERSION = " << dictionary["VERSION_MAJOR"] << endl ++ << "QT_MINOR_VERSION = " << dictionary["VERSION_MINOR"] << endl ++ << "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl; + if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { + stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\win32-g++" << endl + << "EXTRA_CFLAGS = -DUNICODE -ffunction-sections" << endl +-- +2.6.0 + diff --git a/qtbase-opensource-src-5.5.0.tar.xz b/qtbase-opensource-src-5.5.0.tar.xz deleted file mode 100644 index 1ee8fd3..0000000 --- a/qtbase-opensource-src-5.5.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:893f0691739c00d13ff85bf8d3fd14e1c7a62fbbbcffa44b0491da4d5e570965 -size 46245180 diff --git a/qtbase-opensource-src-5.5.1.tar.xz b/qtbase-opensource-src-5.5.1.tar.xz new file mode 100644 index 0000000..a14ab2e --- /dev/null +++ b/qtbase-opensource-src-5.5.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfa4e8a4d7e4c6b69285e7e8833eeecd819987e1bdbe5baa6b6facd4420de916 +size 46389212 diff --git a/when-a-screen-comes-back-online-the-windows-need-to-be-told-about-it.patch b/when-a-screen-comes-back-online-the-windows-need-to-be-told-about-it.patch deleted file mode 100644 index 9ec2eb4..0000000 --- a/when-a-screen-comes-back-online-the-windows-need-to-be-told-about-it.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b0b08cc0e4e38504d6b833702f7477aee4e2a192 Mon Sep 17 00:00:00 2001 -From: Ralf Jung -Date: Sun, 5 Jul 2015 12:15:29 +0200 -Subject: When a screen comes back online, the windows need to be told about it - -On my system, this fixes the misbehavior of Qt applications when the (only) active screen is -switched, e.g. from an external screen to the laptop. -This behavior is caused by the screen() of widgets to be set to NULL when their screen goes away. -When a new screen comes online, the widgets *should* be told about it, but they are not. The only -place that "maybeSetScreen" is called is when an existing screen changes its geometry, but not -when a screen gets enabled without its geometry being affected in any way (e.g. because it was -just disabled via xrandr, but has been connected all along). This makes sure that "maybeSetScreen" -is also called when a screen gets enabled. - -Task-number: QTBUG-47041 -Change-Id: Ic72d6beaa544bf9a4efdbea0830b1bc0d6ce5362 -Reviewed-by: Dmitry Shachnev -Reviewed-by: Shawn Rutledge ---- - src/plugins/platforms/xcb/qxcbconnection.cpp | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp -index 74f48b0..0867615 100644 ---- a/src/plugins/platforms/xcb/qxcbconnection.cpp -+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp -@@ -252,6 +252,14 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event) - otherScreen->addVirtualSibling(screen); - m_screens << screen; - QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary()); -+ -+ // Windows which had null screens have already had expose events by now. -+ // They need to be told the screen is back, it's OK to render. -+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) { -+ QXcbWindow *xcbWin = static_cast(window->handle()); -+ if (xcbWin) -+ xcbWin->maybeSetScreen(screen); -+ } - } - // else ignore disabled screens - } else if (screen) { --- -cgit v0.11.0