1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

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

This commit is contained in:
Colomban Wendling 2016-06-18 00:45:31 +02:00
parent e3d0cc0e55
commit 473b29b2a7

View File

@ -17,14 +17,11 @@ PasswordEdit::PasswordEdit(QWidget* parent) :
{ {
setEchoMode(QLineEdit::Password); setEchoMode(QLineEdit::Password);
#ifndef ENABLE_CAPSLOCK_INDICATOR #ifdef ENABLE_CAPSLOCK_INDICATOR
action->setVisible(false);
#else
action->setIcon(QIcon(":img/caps_lock.svg")); action->setIcon(QIcon(":img/caps_lock.svg"));
action->setToolTip(tr("CAPS-LOCK ENABLED")); action->setToolTip(tr("CAPS-LOCK ENABLED"));
#endif
addAction(action, QLineEdit::TrailingPosition); addAction(action, QLineEdit::TrailingPosition);
#endif
} }
PasswordEdit::~PasswordEdit() PasswordEdit::~PasswordEdit()