Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/PasswordEdit.cpp')
-rw-r--r--src/gui/PasswordEdit.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/PasswordEdit.cpp b/src/gui/PasswordEdit.cpp
index 943164d4c..b43f5c623 100644
--- a/src/gui/PasswordEdit.cpp
+++ b/src/gui/PasswordEdit.cpp
@@ -180,7 +180,9 @@ void PasswordEdit::autocompletePassword(const QString& password)
bool PasswordEdit::event(QEvent* event)
{
- if (isVisible()) {
+ if (isVisible()
+ && (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease
+ || event->type() == QEvent::FocusIn)) {
checkCapslockState();
}
return QLineEdit::event(event);
@@ -204,7 +206,9 @@ void PasswordEdit::checkCapslockState()
if (newCapslockState) {
QTimer::singleShot(
- 150, [this]() { QToolTip::showText(mapToGlobal(rect().bottomLeft()), m_capslockAction->text()); });
+ 150, [this] { QToolTip::showText(mapToGlobal(rect().bottomLeft()), m_capslockAction->text()); });
+ } else if (QToolTip::isVisible()) {
+ QToolTip::hideText();
}
}
}