From 473b29b2a7c9476fa0c88f0eff5ae7c29c1e2576 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 18 Jun 2016 00:45:31 +0200 Subject: [PATCH] refactor(passwordedit): don't add the caps indicator at all if disabled --- src/widget/passwordedit.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/widget/passwordedit.cpp b/src/widget/passwordedit.cpp index 65882b3f0..4ab6cdda3 100644 --- a/src/widget/passwordedit.cpp +++ b/src/widget/passwordedit.cpp @@ -17,14 +17,11 @@ PasswordEdit::PasswordEdit(QWidget* parent) : { setEchoMode(QLineEdit::Password); -#ifndef ENABLE_CAPSLOCK_INDICATOR - action->setVisible(false); -#else +#ifdef ENABLE_CAPSLOCK_INDICATOR action->setIcon(QIcon(":img/caps_lock.svg")); action->setToolTip(tr("CAPS-LOCK ENABLED")); -#endif - addAction(action, QLineEdit::TrailingPosition); +#endif } PasswordEdit::~PasswordEdit()