summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2014-01-07 08:57:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 18:55:10 +0100
commit35f2a61426dab80af464b0aa24d41a070b4c145c (patch)
tree103d9bb7dc0388566b0ab48613668b5b2ca43588 /src/gui
parentdbaff44ff1ebf04c5d2533f7a345db09cd55b00d (diff)
QKeySequence: return Qt::Key_unknown with invalid modifiers on OS X
This also fixes the auto test, tst_QKeySequence::parseString() with Win+A and Simon+G. [ChangeLog][QtGui][OS X][QKeySequence] return Qt::Key_unknown with invalid modifiers on OS X Task-number: QTBUG-24406 Change-Id: Ie90393c9691f443c7c359cb3a487609a9691bc44 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qkeysequence.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index ead248074e..5770b76f1f 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -1075,7 +1075,7 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
sl = accel;
}
}
-#else
+#endif
int i = 0;
int lastI = 0;
while ((i = sl.indexOf(QLatin1Char('+'), i + 1)) != -1) {
@@ -1110,7 +1110,6 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
}
lastI = i + 1;
}
-#endif
int p = accel.lastIndexOf(QLatin1Char('+'), str.length() - 2); // -2 so that Ctrl++ works
if(p > 0)