Browse Source

refactor(passwordedit): don't add the caps indicator at all if disabled

pull/3383/head
Colomban Wendling 9 years ago
parent
commit
473b29b2a7
  1. 7
      src/widget/passwordedit.cpp

7
src/widget/passwordedit.cpp

@ -17,14 +17,11 @@ PasswordEdit::PasswordEdit(QWidget* parent) : @@ -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()

Loading…
Cancel
Save