aboutsummaryrefslogtreecommitdiff
path: root/src/qt/askpassphrasedialog.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-03-29 10:52:24 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-03-29 10:55:23 +0100
commit09dfa86baf218dcc142143131da8b25e09c209d4 (patch)
treec7088b3b82a3f20da6341fffca971a4088e83334 /src/qt/askpassphrasedialog.cpp
parenta6d32c94ab91e84fc359e9b97561ae9da06c1abc (diff)
downloadbitcoin-09dfa86baf218dcc142143131da8b25e09c209d4.tar.xz
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/askpassphrasedialog.cpp')
-rw-r--r--src/qt/askpassphrasedialog.cpp2
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()) {