From 4aed2cfe1ef1c2853c51eb20e5b6c8a61e77e59d Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 27 Feb 2015 11:52:25 -0600 Subject: [PATCH] pull in new/awol patches --- ...e-Fix-QObject-connect-failing-on-ARM.patch | 50 ++++++++++++++++ 0094-Fix-Meta-.-shortcuts-on-XCB.patch | 57 +++++++++++++++++++ ...gistered-delayed-in-constructor-othe.patch | 37 ++++++++++++ ...sure-there-s-a-scene-before-using-it.patch | 45 +++++++++++++++ ...y-zero-when-processing-malformed-BMP.patch | 45 +++++++++++++++ 5 files changed, 234 insertions(+) create mode 100644 0072-CMake-Fix-QObject-connect-failing-on-ARM.patch create mode 100644 0094-Fix-Meta-.-shortcuts-on-XCB.patch create mode 100644 0132-Call-ofono-nm-Registered-delayed-in-constructor-othe.patch create mode 100644 0136-Make-sure-there-s-a-scene-before-using-it.patch create mode 100644 0149-Fix-a-division-by-zero-when-processing-malformed-BMP.patch diff --git a/0072-CMake-Fix-QObject-connect-failing-on-ARM.patch b/0072-CMake-Fix-QObject-connect-failing-on-ARM.patch new file mode 100644 index 0000000..4bec1e6 --- /dev/null +++ b/0072-CMake-Fix-QObject-connect-failing-on-ARM.patch @@ -0,0 +1,50 @@ +From 9718cb330cb479ec6e91f1f10c5ee9097fa2f4fb Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Thu, 29 Jan 2015 12:13:53 +0100 +Subject: [PATCH 072/163] CMake: Fix QObject::connect failing on ARM + +We need PIE, doesn't matter if reduce_relocations is used or not + +Change-Id: I9a359b9d4443a6059980cd4c48058132ec4267fe +Reviewed-by: Simon Hausmann +Reviewed-by: Olivier Goffart (Woboq GmbH) +--- + mkspecs/features/create_cmake.prf | 2 -- + src/corelib/Qt5CoreConfigExtras.cmake.in | 2 -- + 2 files changed, 4 deletions(-) + +diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf +index 3b0e037..9f7ba46 100644 +--- a/mkspecs/features/create_cmake.prf ++++ b/mkspecs/features/create_cmake.prf +@@ -171,8 +171,6 @@ contains(CONFIG, plugin) { + return() + } + +-unix:contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true" +- + CMAKE_MKSPEC = $$[QMAKE_XSPEC] + + CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.)) +diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in +index 9bda70e..4387bed 100644 +--- a/src/corelib/Qt5CoreConfigExtras.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtras.cmake.in +@@ -66,14 +66,12 @@ list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes}) + set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) + set(_qt5_corelib_extra_includes) + +-!!IF !isEmpty(CMAKE_ADD_FPIE_FLAGS) + # Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The + # Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module + # macro to add it. + set(Qt5_POSITION_INDEPENDENT_CODE True) + set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\") + set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIE\") +-!!ENDIF + + !!IF !isEmpty(QT_NAMESPACE) + list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE) +-- +1.9.3 + diff --git a/0094-Fix-Meta-.-shortcuts-on-XCB.patch b/0094-Fix-Meta-.-shortcuts-on-XCB.patch new file mode 100644 index 0000000..2d43868 --- /dev/null +++ b/0094-Fix-Meta-.-shortcuts-on-XCB.patch @@ -0,0 +1,57 @@ +From 0d990b9ca117514fe83f53b39f25d6272304f2fb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?K=C3=A5re=20S=C3=A4rs?= +Date: Thu, 22 Jan 2015 22:40:37 +0200 +Subject: [PATCH 094/163] Fix Meta+... shortcuts on XCB + +If the window contains a widget that accepts text input, a Meta+... +shortcut will be interpreted as if no modifier was pressed. This fix +enables the usage of Meta+... shortcuts for the XCB platform plugin. + +Change-Id: I80034b7e6bbbf18471c86fc77320d5038f5740be +Task-number: QTBUG-43572 +Reviewed-by: Aleix Pol Gonzalez +Reviewed-by: Milian Wolff +Reviewed-by: David Edmundson +Reviewed-by: Lars Knoll +--- + src/plugins/platforms/xcb/qxcbkeyboard.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp +index 5fb7457..85fef39 100644 +--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp ++++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp +@@ -933,7 +933,7 @@ xkb_keysym_t QXcbKeyboard::lookupLatinKeysym(xkb_keycode_t keycode) const + QList QXcbKeyboard::possibleKeys(const QKeyEvent *event) const + { + // turn off the modifier bits which doesn't participate in shortcuts +- Qt::KeyboardModifiers notNeeded = Qt::MetaModifier | Qt::KeypadModifier | Qt::GroupSwitchModifier; ++ Qt::KeyboardModifiers notNeeded = Qt::KeypadModifier | Qt::GroupSwitchModifier; + Qt::KeyboardModifiers modifiers = event->modifiers() &= ~notNeeded; + // create a fresh kb state and test against the relevant modifier combinations + struct xkb_state *kb_state = xkb_state_new(xkb_keymap); +@@ -963,10 +963,12 @@ QList QXcbKeyboard::possibleKeys(const QKeyEvent *event) const + xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift"); + xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt"); + xkb_mod_index_t controlMod = xkb_keymap_mod_get_index(xkb_keymap, "Control"); ++ xkb_mod_index_t metaMod = xkb_keymap_mod_get_index(xkb_keymap, "Meta"); + + Q_ASSERT(shiftMod < 32); + Q_ASSERT(altMod < 32); + Q_ASSERT(controlMod < 32); ++ Q_ASSERT(metaMod < 32); + + xkb_mod_mask_t depressed; + int qtKey = 0; +@@ -987,6 +989,8 @@ QList QXcbKeyboard::possibleKeys(const QKeyEvent *event) const + depressed |= (1 << shiftMod); + if (neededMods & Qt::ControlModifier) + depressed |= (1 << controlMod); ++ if (neededMods & Qt::MetaModifier) ++ depressed |= (1 << metaMod); + xkb_state_update_mask(kb_state, depressed, latchedMods, lockedMods, 0, 0, lockedLayout); + sym = xkb_state_key_get_one_sym(kb_state, keycode); + } +-- +1.9.3 + diff --git a/0132-Call-ofono-nm-Registered-delayed-in-constructor-othe.patch b/0132-Call-ofono-nm-Registered-delayed-in-constructor-othe.patch new file mode 100644 index 0000000..53f49f8 --- /dev/null +++ b/0132-Call-ofono-nm-Registered-delayed-in-constructor-othe.patch @@ -0,0 +1,37 @@ +From 8d6341a721d07e3cc30032bcc89f7e25cb00b9eb Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Mon, 16 Feb 2015 22:53:02 +0100 +Subject: [PATCH 132/163] Call [ofono|nm]Registered delayed in constructor + otherwise signals will be lost + +If we call them just in the constructor all the signals they sent +out can't be connected and will be lost, particularly this means +the QNetworkConfigurationManager doesn't see my ethernet connection +and thus thinks i'm not online + +Change-Id: I1480f76338d6ae4fbed676f9fa40ada18ea431ad +Reviewed-by: Alex Blasche +--- + src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +index f52b9d4..0378ac7 100644 +--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp ++++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +@@ -80,10 +80,10 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent) + this, SLOT(ofonoUnRegistered(QString))); + + if (QDBusConnection::systemBus().interface()->isServiceRegistered("org.ofono")) +- ofonoRegistered(); ++ QMetaObject::invokeMethod(this, "ofonoRegistered", Qt::QueuedConnection); + + if (QDBusConnection::systemBus().interface()->isServiceRegistered(NM_DBUS_SERVICE)) +- nmRegistered(); ++ QMetaObject::invokeMethod(this, "nmRegistered", Qt::QueuedConnection); + } + + QNetworkManagerEngine::~QNetworkManagerEngine() +-- +1.9.3 + diff --git a/0136-Make-sure-there-s-a-scene-before-using-it.patch b/0136-Make-sure-there-s-a-scene-before-using-it.patch new file mode 100644 index 0000000..7829c5e --- /dev/null +++ b/0136-Make-sure-there-s-a-scene-before-using-it.patch @@ -0,0 +1,45 @@ +From 8fccfef424e7d2b7a2019b1f828234145d4011df Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Tue, 17 Feb 2015 09:53:27 +0100 +Subject: [PATCH 136/163] Make sure there's a scene before using it +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes crash hovering links in quassel + +Task-number: QTBUG-44509 +Change-Id: I77d8d9118ad185ed70a46e91445e2960200e562b +Reviewed-by: Michael BrĂ¼ning +Reviewed-by: Frederik Gladhorn +Reviewed-by: Marc Mutz +--- + src/widgets/kernel/qwidget.cpp | 4 ++-- + .../qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 11 +++++++++++ + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp +index 6871541..cb2e9e0 100644 +--- a/src/widgets/kernel/qwidget.cpp ++++ b/src/widgets/kernel/qwidget.cpp +@@ -12272,7 +12272,7 @@ QPoint QWidget::mapToGlobal(const QPoint &pos) const + { + #ifndef QT_NO_GRAPHICSVIEW + Q_D(const QWidget); +- if (d->extra && d->extra->proxyWidget) { ++ if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { + const QList views = d->extra->proxyWidget->scene()->views(); + if (!views.isEmpty()) { + const QPointF scenePos = d->extra->proxyWidget->mapToScene(pos); +@@ -12307,7 +12307,7 @@ QPoint QWidget::mapFromGlobal(const QPoint &pos) const + { + #ifndef QT_NO_GRAPHICSVIEW + Q_D(const QWidget); +- if (d->extra && d->extra->proxyWidget) { ++ if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { + const QList views = d->extra->proxyWidget->scene()->views(); + if (!views.isEmpty()) { + const QPoint viewPortPos = views.first()->viewport()->mapFromGlobal(pos); +-- +1.9.3 + diff --git a/0149-Fix-a-division-by-zero-when-processing-malformed-BMP.patch b/0149-Fix-a-division-by-zero-when-processing-malformed-BMP.patch new file mode 100644 index 0000000..a1a5df1 --- /dev/null +++ b/0149-Fix-a-division-by-zero-when-processing-malformed-BMP.patch @@ -0,0 +1,45 @@ +From 661f6bfd032dacc62841037732816a583640e187 Mon Sep 17 00:00:00 2001 +From: "Richard J. Moore" +Date: Sat, 21 Feb 2015 17:43:21 +0000 +Subject: [PATCH 149/163] Fix a division by zero when processing malformed BMP + files. + +This fixes a division by 0 when processing a maliciously crafted BMP +file. No impact beyond DoS. + +Task-number: QTBUG-44547 +Change-Id: Ifcded2c0aa712e90d23e6b3969af0ec3add53973 +Reviewed-by: Thiago Macieira +Reviewed-by: Oswald Buddenhagen +--- + src/gui/image/qbmphandler.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp +index 21c1a2f..df66499 100644 +--- a/src/gui/image/qbmphandler.cpp ++++ b/src/gui/image/qbmphandler.cpp +@@ -314,12 +314,20 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int + } + } else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) { + red_shift = calc_shift(red_mask); ++ if (((red_mask >> red_shift) + 1) == 0) ++ return false; + red_scale = 256 / ((red_mask >> red_shift) + 1); + green_shift = calc_shift(green_mask); ++ if (((green_mask >> green_shift) + 1) == 0) ++ return false; + green_scale = 256 / ((green_mask >> green_shift) + 1); + blue_shift = calc_shift(blue_mask); ++ if (((blue_mask >> blue_shift) + 1) == 0) ++ return false; + blue_scale = 256 / ((blue_mask >> blue_shift) + 1); + alpha_shift = calc_shift(alpha_mask); ++ if (((alpha_mask >> alpha_shift) + 1) == 0) ++ return false; + alpha_scale = 256 / ((alpha_mask >> alpha_shift) + 1); + } else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) { + blue_mask = 0x000000ff; +-- +1.9.3 +