diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-08 01:00:59 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-08 01:01:00 +0100 |
commit | f8c5c1356465f503e1a8357ceff01bb956d51c9e (patch) | |
tree | 36b5bc1c2d5767b3eee0820c70b91fdfc57287b3 /src/widgets/widgets | |
parent | eda28621f6c1a68774719f382be53ec109123b18 (diff) | |
parent | 153726bc167406414f589f72bea76c3229cfa815 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Ied1194730e75a6f30839bbf5429aa2699230288e
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol_p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index b730b415f0..f4df95865d 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -280,6 +280,13 @@ public: cancelPasswordEchoTimer(); m_echoMode = mode; m_passwordEchoEditing = false; + + // If this control is used for password input, we want to minimize + // the possibility of string reallocation not to leak (parts of) + // the password. + if (m_echoMode != QLineEdit::Normal) + m_text.reserve(30); + updateDisplayText(); } |