about summary refs log tree commit diff
path: root/pkgs/desktops/deepin/library/dtk6widget/fix-build-on-qt-6_7.patch
blob: 16d2d2ec9b54b91f3f58b2195629a823ef748254 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;