diff options
| author | Wladimir J. van der Laan <[email protected]> | 2013-03-29 10:52:24 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2013-03-29 10:55:23 +0100 |
| commit | 09dfa86baf218dcc142143131da8b25e09c209d4 (patch) | |
| tree | c7088b3b82a3f20da6341fffca971a4088e83334 /src | |
| parent | Merge remote-tracking branch 'codeshark/multiwallet-qt-no-core' (pull #2220) (diff) | |
| download | discoin-09dfa86baf218dcc142143131da8b25e09c209d4.tar.xz discoin-09dfa86baf218dcc142143131da8b25e09c209d4.zip | |
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')
| -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 cf35ee245..f165c11cb 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()) { |