diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-03-29 10:52:24 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-03-29 10:55:23 +0100 |
commit | 09dfa86baf218dcc142143131da8b25e09c209d4 (patch) | |
tree | c7088b3b82a3f20da6341fffca971a4088e83334 /src/qt | |
parent | a6d32c94ab91e84fc359e9b97561ae9da06c1abc (diff) |
qt: Improve capslock detection on non-us keyboards (issue #1855)
On non-us keyboards you can obtain lower case characters even pressing
the SHIFT, this caused false positives.
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/askpassphrasedialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index cf35ee2457..f165c11cb1 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -235,7 +235,7 @@ bool AskPassphraseDialog::eventFilter(QObject *object, QEvent *event) if (str.length() != 0) { const QChar *psz = str.unicode(); bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0; - if ((fShift && psz->isLower()) || (!fShift && psz->isUpper())) { + if ((fShift && *psz >= 'a' && *psz <= 'z') || (!fShift && *psz >= 'A' && *psz <= 'Z')) { fCapsLock = true; ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else if (psz->isLetter()) { |