about summary refs log tree commit diff
path: root/pkgs/desktops/deepin/library/dtk6widget/fix-build-on-qt-6_7.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/deepin/library/dtk6widget/fix-build-on-qt-6_7.patch')
-rw-r--r--pkgs/desktops/deepin/library/dtk6widget/fix-build-on-qt-6_7.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/desktops/deepin/library/dtk6widget/fix-build-on-qt-6_7.patch b/pkgs/desktops/deepin/library/dtk6widget/fix-build-on-qt-6_7.patch
new file mode 100644
index 0000000000000..16d2d2ec9b54b
--- /dev/null
+++ b/pkgs/desktops/deepin/library/dtk6widget/fix-build-on-qt-6_7.patch
@@ -0,0 +1,20 @@
+diff --git a/src/widgets/dkeysequenceedit.cpp b/src/widgets/dkeysequenceedit.cpp
+index a99e17ae..0e1c57f6 100644
+--- a/src/widgets/dkeysequenceedit.cpp
++++ b/src/widgets/dkeysequenceedit.cpp
+@@ -276,13 +276,13 @@ void DKeySequenceEdit::keyPressEvent(QKeyEvent *e)
+     }
+ 
+     if (e->modifiers() & Qt::ShiftModifier) {
+-        QList<int> possibleKeys = QKeyMapper::possibleKeys(e);
++        auto possibleKeys = QKeyMapper::possibleKeys(e);
+         int pkTotal = possibleKeys.count();
+         if (!pkTotal)
+             return;
+         bool found = false;
+         for (int i = 0; i < possibleKeys.size(); ++i) {
+-            if (possibleKeys.at(i) - nextKey == int(e->modifiers())
++            if (static_cast<int>(possibleKeys.at(i)) - nextKey == static_cast<int>(e->modifiers())
+                 || (possibleKeys.at(i) == nextKey && e->modifiers() == Qt::ShiftModifier)) {
+                 nextKey = possibleKeys.at(i);
+                 found = true;