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:
parent
e3d0cc0e55
commit
473b29b2a7
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user