[arch-commits] Commit in deepin-file-manager/trunk (PKGBUILD qt5.9.patch)

Felix Yan felixonmars at archlinux.org
Mon Jun 5 16:30:05 UTC 2017


    Date: Monday, June 5, 2017 @ 16:30:05
  Author: felixonmars
Revision: 234282

upgpkg: deepin-file-manager 1:4.1.5-3

rebuild for qt 5.9

Added:
  deepin-file-manager/trunk/qt5.9.patch
Modified:
  deepin-file-manager/trunk/PKGBUILD

-------------+
 PKGBUILD    |   13 ++++++--
 qt5.9.patch |   91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-05 16:27:04 UTC (rev 234281)
+++ PKGBUILD	2017-06-05 16:30:05 UTC (rev 234282)
@@ -5,7 +5,7 @@
 
 pkgname=deepin-file-manager
 pkgver=4.1.5
-pkgrel=2
+pkgrel=3
 epoch=1
 pkgdesc='Deepin File Manager'
 arch=('i686' 'x86_64')
@@ -20,9 +20,16 @@
 provides=('deepin-desktop')
 conflicts=('deepin-desktop')
 replaces=('deepin-desktop')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-file-manager/archive/$pkgver.tar.gz")
-sha512sums=('03f724e3e1392022b1df1f9f6af24071be9de53df447d02cc81f1c75e271807c31314140954297806c9a71bcf301d60f746eac9caa3af5145615f76a41e54b6a')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-file-manager/archive/$pkgver.tar.gz"
+        qt5.9.patch)
+sha512sums=('03f724e3e1392022b1df1f9f6af24071be9de53df447d02cc81f1c75e271807c31314140954297806c9a71bcf301d60f746eac9caa3af5145615f76a41e54b6a'
+            '1cc25323ffa057654cc64720dfa9bcd4a0532a49c2ab29bc2d5c80c1dc063fd17cd2ea6b7de5cdd55599baf1bcff3e56fb08be19240d217ff949a6e6e8e2cae4')
 
+prepare() {
+  cd dde-file-manager-$pkgver
+  patch -p1 -i ../qt5.9.patch
+}
+
 build() {
   cd dde-file-manager-$pkgver
   qmake-qt5 PREFIX=/usr QMAKE_CFLAGS_ISYSTEM=

Added: qt5.9.patch
===================================================================
--- qt5.9.patch	                        (rev 0)
+++ qt5.9.patch	2017-06-05 16:30:05 UTC (rev 234282)
@@ -0,0 +1,91 @@
+commit 39c7135a4d972d5f412b3288e4100851361d507c
+Author: Felix Yan <felixonmars at archlinux.org>
+Date:   Fri Jun 2 16:44:39 2017 +0800
+
+    Fix compatibility with Qt 5.9
+    
+    QFlags only works on Enums since Qt 5.9. This should not break old Qt
+    versions.
+    
+    Change-Id: I80326bf39d5ebe8c20db19aac8ad8beaa3af7371
+
+diff --git a/dde-desktop/model/dfileselectionmodel.cpp b/dde-desktop/model/dfileselectionmodel.cpp
+index 296e0342..af588ddb 100644
+--- a/dde-desktop/model/dfileselectionmodel.cpp
++++ b/dde-desktop/model/dfileselectionmodel.cpp
+@@ -18,7 +18,7 @@ DFileSelectionModel::DFileSelectionModel(QAbstractItemModel *model, QObject *par
+ 
+ bool DFileSelectionModel::isSelected(const QModelIndex &index) const
+ {
+-    if (m_currentCommand != QFlags<QItemSelectionModel::SelectionFlags>(Current|Rows|ClearAndSelect))
++    if (m_currentCommand != QItemSelectionModel::SelectionFlags(Current|Rows|ClearAndSelect))
+         return QItemSelectionModel::isSelected(index);
+ 
+     for (const QItemSelectionRange &range : m_selection) {
+@@ -31,7 +31,7 @@ bool DFileSelectionModel::isSelected(const QModelIndex &index) const
+ 
+ int DFileSelectionModel::selectedCount() const
+ {
+-    if (m_currentCommand != QFlags<QItemSelectionModel::SelectionFlags>(Current|Rows|ClearAndSelect))
++    if (m_currentCommand != QItemSelectionModel::SelectionFlags(Current|Rows|ClearAndSelect))
+         return selectedIndexes().count();
+ 
+     return m_lastSelectedIndex.row() - m_firstSelectedIndex.row() + 1;
+@@ -40,7 +40,7 @@ int DFileSelectionModel::selectedCount() const
+ QModelIndexList DFileSelectionModel::selectedIndexes() const
+ {
+     if (m_selectedList.isEmpty()) {
+-        if (m_currentCommand != QFlags<QItemSelectionModel::SelectionFlags>(Current|Rows|ClearAndSelect)) {
++        if (m_currentCommand != QItemSelectionModel::SelectionFlags(Current|Rows|ClearAndSelect)) {
+             m_selectedList = QItemSelectionModel::selectedIndexes();
+         } else {
+             for (const QItemSelectionRange &range : m_selection) {
+@@ -57,7 +57,7 @@ void DFileSelectionModel::select(const QItemSelection &selection, QItemSelection
+     if (!command.testFlag(NoUpdate))
+         m_selectedList.clear();
+ 
+-    if (command != QFlags<QItemSelectionModel::SelectionFlags>(Current|Rows|ClearAndSelect)) {
++    if (command != QItemSelectionModel::SelectionFlags(Current|Rows|ClearAndSelect)) {
+         if (m_timer.isActive()) {
+             m_timer.stop();
+             updateSelecteds();
+diff --git a/dde-file-manager-lib/models/dfileselectionmodel.cpp b/dde-file-manager-lib/models/dfileselectionmodel.cpp
+index a61f3844..8650f66d 100644
+--- a/dde-file-manager-lib/models/dfileselectionmodel.cpp
++++ b/dde-file-manager-lib/models/dfileselectionmodel.cpp
+@@ -20,7 +20,7 @@ DFileSelectionModel::DFileSelectionModel(QAbstractItemModel *model, QObject *par
+ 
+ bool DFileSelectionModel::isSelected(const QModelIndex &index) const
+ {
+-    if (m_currentCommand != QFlags<QItemSelectionModel::SelectionFlags>(Current|Rows|ClearAndSelect))
++    if (m_currentCommand != QItemSelectionModel::SelectionFlags(Current|Rows|ClearAndSelect))
+         return QItemSelectionModel::isSelected(index);
+ 
+     for (const QItemSelectionRange &range : m_selection) {
+@@ -35,7 +35,7 @@ bool DFileSelectionModel::isSelected(const QModelIndex &index) const
+ 
+ int DFileSelectionModel::selectedCount() const
+ {
+-    if (m_currentCommand != QFlags<QItemSelectionModel::SelectionFlags>(Current|Rows|ClearAndSelect))
++    if (m_currentCommand != QItemSelectionModel::SelectionFlags(Current|Rows|ClearAndSelect))
+         return selectedIndexes().count();
+ 
+     return m_lastSelectedIndex.row() - m_firstSelectedIndex.row() + 1;
+@@ -44,7 +44,7 @@ int DFileSelectionModel::selectedCount() const
+ QModelIndexList DFileSelectionModel::selectedIndexes() const
+ {
+     if (m_selectedList.isEmpty()) {
+-        if (m_currentCommand != QFlags<QItemSelectionModel::SelectionFlags>(Current|Rows|ClearAndSelect)) {
++        if (m_currentCommand != QItemSelectionModel::SelectionFlags(Current|Rows|ClearAndSelect)) {
+             m_selectedList = QItemSelectionModel::selectedIndexes();
+         } else {
+             for (const QItemSelectionRange &range : m_selection) {
+@@ -61,7 +61,7 @@ void DFileSelectionModel::select(const QItemSelection &selection, QItemSelection
+     if (!command.testFlag(NoUpdate))
+         m_selectedList.clear();
+ 
+-    if (command != QFlags<QItemSelectionModel::SelectionFlags>(Current|Rows|ClearAndSelect)) {
++    if (command != QItemSelectionModel::SelectionFlags(Current|Rows|ClearAndSelect)) {
+         if (m_timer.isActive()) {
+             m_timer.stop();
+             updateSelecteds();



More information about the arch-commits mailing list