File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -48,5 +48,14 @@ CMakeLists.txt.user*
4848* .pyc
4949
5050/build
51+ /build *
5152/icon /* .png
5253/icon /ImageMagick
54+
55+ # JetBrains IDE prefs
56+ .idea /
57+
58+ # macOS annoyances
59+ .DS_Store
60+ * DS_Store
61+ ._ *
Original file line number Diff line number Diff line change @@ -865,12 +865,16 @@ void MainWindow::applyCustomShortcuts()
865865 for (const QString &shortcutString : value.toStringList ()) {
866866 auto sequence = QKeySequence (shortcutString);
867867
868- if (sequence.count () > 0 && sequence[0 ].key () != Qt::Key_unknown) {
869- shortcuts.append (sequence);
870- }
871- else {
872- qWarning () << " CustomShortcut: Cannot create QKeySequence(" << shortcutString << " ) for " << actionName;
873- }
868+ #if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
869+ if (sequence.count () > 0 && sequence[0 ].key () != Qt::Key_unknown) {
870+ #else
871+ if (sequence.count () > 0 && (sequence[0 ] & ~Qt::KeyboardModifierMask) != Qt::Key_unknown) {
872+ #endif
873+ shortcuts.append (sequence);
874+ }
875+ else {
876+ qWarning () << " CustomShortcut: Cannot create QKeySequence(" << shortcutString << " ) for " << actionName;
877+ }
874878 }
875879
876880 if (!shortcuts.empty ()) {
You can’t perform that action at this time.
0 commit comments