fix: clear password input undo history#70
Conversation
There was a problem hiding this comment.
Sorry @robertkill, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
6f0da1b to
58cfae8
Compare
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#70
deepin pr auto review★ 总体评分:85分(0-100之间的整数)■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 diff --git a/src/session-widgets/auth_password.cpp b/src/session-widgets/auth_password.cpp
index 5de5d39d..cee0e131 100644
--- a/src/session-widgets/auth_password.cpp
+++ b/src/session-widgets/auth_password.cpp
@@ -318,7 +318,7 @@ void AuthPassword::initConnections()
*/
void AuthPassword::reset()
{
- m_lineEdit->setText(QString());
+ m_lineEdit->clear();
m_lineEdit->setAlert(false);
m_lineEdit->hideAlertMessage();
setFocusProxy(m_lineEdit);
@@ -348,7 +348,7 @@ void AuthPassword::setAuthState(const AuthState state, const QString &result)
setAnimationState(false);
setAuthStateStyle(LOGIN_CHECK);
m_lineEdit->setAlert(false);
- m_lineEdit->setText(QString());
+ m_lineEdit->clear();
setLineEditEnabled(false);
setLineEditInfo(tr("Verification successful"), PlaceHolderText);
m_showPrompt = true; |
Use setText(QString()) instead of clear() when resetting password inputs so Qt clears the line edit undo history and previous passwords cannot be restored by undo after echo mode changes. pms:TASK-392179
58cfae8 to
94ad1a0
Compare
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#70
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, robertkill The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#70
fix: clear password input undo history
Use setText(QString()) instead of clear() when resetting password inputs so Qt clears the line edit undo history and previous passwords cannot be restored by undo after echo mode changes.
pms:TASK-392179