diff options
author | Risto Avila <risto.avila@digia.com> | 2014-03-11 11:58:11 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-14 08:48:11 +0100 |
commit | 376c9c9ae36dab06cf933dbd5d759dc0f40367b0 (patch) | |
tree | 782b4511ca3df0a9df13acacbf85af49ad3b02ac /src/widgets/widgets/qwidgetlinecontrol_p.h | |
parent | eaee2bd0d048367f6bd331fdb4a177004848d77e (diff) |
Makes QPlatformTheme::PasswordMaskDelay themable using QStyle
Creates new themable setting SH_LineEdit_PasswordMaskDelay which can be used
to override QPlatformTheme::PasswordMaskDelay. SH_LineEdit_PasswordMaskDelay defines number
in ms which the password character is visible when echoMode is set to Password
[ChangeLog][General][QStyle] Creates a new themable variable SH_LineEdit_PasswordMaskDelay
Change-Id: I26f0ddfda2b49bc293e00e8fcf62260cf4896ab2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol_p.h')
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index 1cee67bfd2..ba73e9e25e 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -90,6 +90,7 @@ public: m_tripleClickTimer(0), m_maskData(0), m_modifiedState(0), m_undoState(0), m_selstart(0), m_selend(0), m_passwordEchoEditing(false) , m_passwordEchoTimer(0) + , m_passwordMaskDelay(-1) #if defined(Q_WS_MAC) , m_threadChecks(false) , m_textLayoutThread(0) @@ -313,6 +314,9 @@ public: QChar passwordCharacter() const { return m_passwordCharacter; } void setPasswordCharacter(QChar character) { m_passwordCharacter = character; updateDisplayText(); } + int passwordMaskDelay() const { return m_passwordMaskDelay; } + void setPasswordMaskDelay(int delay) { m_passwordMaskDelay = delay; } + Qt::LayoutDirection layoutDirection() const { if (m_layoutDirection == Qt::LayoutDirectionAuto) { if (m_text.isEmpty()) @@ -481,6 +485,7 @@ private: bool m_passwordEchoEditing; QChar m_passwordCharacter; int m_passwordEchoTimer; + int m_passwordMaskDelay; void cancelPasswordEchoTimer() { if (m_passwordEchoTimer != 0) { |