[arch-commits] Commit in deepin-qt5dxcb-plugin/trunk (PKGBUILD qt5.10.patch)

Felix Yan felixonmars at archlinux.org
Fri Jun 22 15:13:38 UTC 2018


    Date: Friday, June 22, 2018 @ 15:13:37
  Author: felixonmars
Revision: 344642

upgpkg: deepin-qt5dxcb-plugin 1.1.8.8-3

fix qt 5.10+ compatibility

Added:
  deepin-qt5dxcb-plugin/trunk/qt5.10.patch
Modified:
  deepin-qt5dxcb-plugin/trunk/PKGBUILD

--------------+
 PKGBUILD     |   11 ++++++----
 qt5.10.patch |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-06-22 15:04:17 UTC (rev 344641)
+++ PKGBUILD	2018-06-22 15:13:37 UTC (rev 344642)
@@ -3,19 +3,22 @@
 
 pkgname=deepin-qt5dxcb-plugin
 pkgver=1.1.8.8
-pkgrel=2
+pkgrel=3
 pkgdesc='Qt platform plugins for DDE'
 arch=('x86_64')
 url="https://github.com/linuxdeepin/qt5dxcb-plugin"
 license=('GPL3')
 depends=('cairo' 'qt5-x11extras')
-makedepends=('qt5-xcb-private-headers')
+makedepends=('qt5-xcb-private-headers' 'libglvnd')
 groups=('deepin')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5dxcb-plugin/archive/$pkgver.tar.gz")
-sha512sums=('0b083cf60e4765f3e402b29b1f3b29e17e0b957609868eac3292dbe2796c6ab5cda98a28b85572083c9aae35ab7a99d4579ec6681827516c6bd610de79d6ccc6')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5dxcb-plugin/archive/$pkgver.tar.gz"
+        qt5.10.patch)
+sha512sums=('0b083cf60e4765f3e402b29b1f3b29e17e0b957609868eac3292dbe2796c6ab5cda98a28b85572083c9aae35ab7a99d4579ec6681827516c6bd610de79d6ccc6'
+            'e3a661f0a14f19f66372cd9bc4326c246373422ea3ccae5158fb32501458f3717b3b4c7cca65f4268e1a9f03df950bf239ff481e47565414c804a951efa4a9cd')
 
 prepare() {
   cd qt5dxcb-plugin-$pkgver
+  patch -p1 -i ../qt5.10.patch
   rm -r platformplugin/libqt5xcbqpa-dev
   sed -i 's|error(Not support Qt Version: .*)|INCLUDEPATH += /usr/include/qtxcb-private|' platformplugin/linux.pri
 }

Added: qt5.10.patch
===================================================================
--- qt5.10.patch	                        (rev 0)
+++ qt5.10.patch	2018-06-22 15:13:37 UTC (rev 344642)
@@ -0,0 +1,60 @@
+From ee6ebb4a416c386ec1d32460a2caa0d486d7547b Mon Sep 17 00:00:00 2001
+From: zccrs <ccrr1314 at live.com>
+Date: Tue, 19 Jun 2018 16:57:26 +0800
+Subject: [PATCH] fix: crash when add scroll device
+
+Qt Version >= 5.10.0
+
+Change-Id: I03dd073031f68c34061d817d2610b6dfd4316062
+---
+
+diff --git a/platformplugin/xcbnativeeventfilter.cpp b/platformplugin/xcbnativeeventfilter.cpp
+index 62018c9..d032631 100644
+--- a/platformplugin/xcbnativeeventfilter.cpp
++++ b/platformplugin/xcbnativeeventfilter.cpp
+@@ -181,6 +181,7 @@
+                     return false;
+                 }
+ 
++#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+                 xXIDeviceChangedEvent *xiDCEvent = reinterpret_cast<xXIDeviceChangedEvent *>(xiEvent);
+                 QHash<int, QXcbConnection::ScrollingDevice>::iterator device = xcb_connect->m_scrollingDevices.find(xiDCEvent->sourceid);
+ 
+@@ -191,23 +192,22 @@
+                     return false;
+                 }
+ 
+-
+                 for (int c = 0; c < xiDeviceInfo->num_classes; ++c) {
+                     if (xiDeviceInfo->classes[c]->type == XIScrollClass) {
+                         XIScrollClassInfo *sci = reinterpret_cast<XIScrollClassInfo *>(xiDeviceInfo->classes[c]);
+ 
+                         if (sci->scroll_type == XIScrollTypeVertical) {
+-                            device->legacyOrientations = device->orientations;
+-                            device->orientations |= Qt::Vertical;
+-                            device->verticalIndex = sci->number;
++//                            device->legacyOrientations = device->orientations;
++//                            device->orientations |= Qt::Vertical;
++//                            device->verticalIndex = sci->number;
+                             device->verticalIncrement = std::signbit(sci->increment)
+                                     ? -std::abs(device->verticalIncrement)
+                                     : std::abs(device->verticalIncrement);
+                         }
+                         else if (sci->scroll_type == XIScrollTypeHorizontal) {
+-                            device->legacyOrientations = device->orientations;
+-                            device->orientations |= Qt::Horizontal;
+-                            device->horizontalIndex = sci->number;
++//                            device->legacyOrientations = device->orientations;
++//                            device->orientations |= Qt::Horizontal;
++//                            device->horizontalIndex = sci->number;
+                             device->horizontalIncrement = std::signbit(sci->increment)
+                                     ? -std::abs(device->horizontalIncrement)
+                                     : std::abs(device->horizontalIncrement);
+@@ -216,6 +216,7 @@
+                 }
+ 
+                 XIFreeDeviceInfo(xiDeviceInfo);
++#endif
+             }
+             break;
+         }



More information about the arch-commits mailing list