[arch-commits] Commit in qt5-base/trunk (PKGBUILD qtbug-65478.patch)

Antonio Rojas arojas at archlinux.org
Fri Mar 2 11:40:53 UTC 2018


    Date: Friday, March 2, 2018 @ 11:40:51
  Author: arojas
Revision: 317747

Fix kexi crash at startup (FS#57584)

Added:
  qt5-base/trunk/qtbug-65478.patch
Modified:
  qt5-base/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   10 +++++++---
 qtbug-65478.patch |   31 +++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-03-02 10:27:13 UTC (rev 317746)
+++ PKGBUILD	2018-03-02 11:40:51 UTC (rev 317747)
@@ -6,7 +6,7 @@
 pkgname=(qt5-base qt5-xcb-private-headers)
 _qtver=5.10.1
 pkgver=${_qtver/-/}
-pkgrel=2
+pkgrel=3
 arch=('x86_64')
 url='http://qt-project.org/'
 license=('GPL3' 'LGPL3' 'FDL' 'custom')
@@ -27,9 +27,11 @@
 groups=('qt' 'qt5')
 _pkgfqn="${pkgbase/5-/}-everywhere-src-${_qtver}"
 source=("http://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
-        revert-Set-sharedPainter-correctly-for-QGraphicsEffect.patch)
+        revert-Set-sharedPainter-correctly-for-QGraphicsEffect.patch
+        qtbug-65478.patch)
 sha256sums=('d8660e189caa5da5142d5894d328b61a4d3ee9750b76d61ad74e4eee8765a969'
-            '7161ea5747500dc9666f8d185f4b8e538799fc0aef574e577277747100ac4763')
+            '7161ea5747500dc9666f8d185f4b8e538799fc0aef574e577277747100ac4763'
+            'b2e8cb06c60be7de31a984c4cfc9ab85c9e2d08c1a3d93136f193735b43600c6')
 
 prepare() {
   cd ${_pkgfqn}
@@ -51,6 +53,8 @@
   # Revert upstream commit which breaks some Deepin components (FS#57531)
   # https://bugreports.qt.io/browse/QTBUG-66226
   patch -Np1 -i ../revert-Set-sharedPainter-correctly-for-QGraphicsEffect.patch
+  # Fix kexi crash at startup http://bugreports.qt.io/browse/QTBUG-65478
+  patch -p1 -i ../qtbug-65478.patch
 }
 
 build() {

Added: qtbug-65478.patch
===================================================================
--- qtbug-65478.patch	                        (rev 0)
+++ qtbug-65478.patch	2018-03-02 11:40:51 UTC (rev 317747)
@@ -0,0 +1,31 @@
+From e8425f9e52c9df0ce0fbf122adff3ef6930f9961 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= <tmartsum at gmail.com>
+Date: Wed, 28 Feb 2018 09:23:54 +0100
+Subject: QHeaderView: Fix crash in layout about to change
+
+Before there was a risk looking up e.g index -1 if there
+were no visible sections in layoutAboutToChange.
+
+Change-Id: Ic911e4292e8e8c4892fef1c0f34cf7dccaad2bac
+Task-number: QTBUG-65478
+Reviewed-by: David Faure <david.faure at kdab.com>
+---
+diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
+index 26d7c5472a..708b9b44ca 100644
+--- a/src/widgets/itemviews/qheaderview.cpp
++++ b/src/widgets/itemviews/qheaderview.cpp
+@@ -2163,9 +2163,11 @@ void QHeaderViewPrivate::_q_sectionsAboutToBeChanged()
+     layoutChangePersistentSections.clear();
+     layoutChangePersistentSections.reserve(std::min(10, sectionItems.count()));
+     // after layoutChanged another section can be last stretched section
+-    if (stretchLastSection) {
++    if (stretchLastSection && lastSectionLogicalIdx >= 0 && lastSectionLogicalIdx < sectionItems.count()) {
+         const int visual = visualIndex(lastSectionLogicalIdx);
+-        sectionItems[visual].size = lastSectionSize;
++        if (visual >= 0 && visual < sectionItems.size()) {
++            sectionItems[visual].size = lastSectionSize;
++        }
+     }
+     for (int i = 0; i < sectionItems.size(); ++i) {
+         auto s = sectionItems.at(i);
+



More information about the arch-commits mailing list