diff --git a/src/lightdm-deepin-greeter/changepasswordwidget.cpp b/src/lightdm-deepin-greeter/changepasswordwidget.cpp index 34783eaf3..db50778a8 100644 --- a/src/lightdm-deepin-greeter/changepasswordwidget.cpp +++ b/src/lightdm-deepin-greeter/changepasswordwidget.cpp @@ -61,6 +61,8 @@ void ChangePasswordWidget::initUI() m_tipsLabel->setAlignment(Qt::AlignCenter); + m_oldPasswdEdit->setCutEnabled(false); + m_oldPasswdEdit->setCopyEnabled(false); m_oldPasswdEdit->setClearButtonEnabled(false); m_oldPasswdEdit->setEchoMode(QLineEdit::Password); m_oldPasswdEdit->setContextMenuPolicy(Qt::NoContextMenu); @@ -68,6 +70,8 @@ void ChangePasswordWidget::initUI() m_oldPasswdEdit->setPlaceholderText(tr("Old password")); m_oldPasswdEdit->setFixedSize(PASSWDLINEEIDT_WIDTH, PASSWDLINEEDIT_HEIGHT); + m_newPasswdEdit->setCutEnabled(false); + m_newPasswdEdit->setCopyEnabled(false); m_newPasswdEdit->setClearButtonEnabled(false); m_newPasswdEdit->setEchoMode(QLineEdit::Password); m_newPasswdEdit->setContextMenuPolicy(Qt::NoContextMenu); @@ -77,6 +81,8 @@ void ChangePasswordWidget::initUI() m_levelWidget->reset(); + m_repeatPasswdEdit->setCutEnabled(false); + m_repeatPasswdEdit->setCopyEnabled(false); m_repeatPasswdEdit->setClearButtonEnabled(false); m_repeatPasswdEdit->setEchoMode(QLineEdit::Password); m_repeatPasswdEdit->setContextMenuPolicy(Qt::NoContextMenu); diff --git a/src/session-widgets/auth_password.cpp b/src/session-widgets/auth_password.cpp index f6c1b02ed..7f8d64311 100644 --- a/src/session-widgets/auth_password.cpp +++ b/src/session-widgets/auth_password.cpp @@ -55,6 +55,8 @@ void AuthPassword::initUI() mainLayout->setContentsMargins(0, 0, 0, 0); mainLayout->setSpacing(0); + m_passwordEdit->setCopyEnabled(false); + m_passwordEdit->setCutEnabled(false); m_passwordEdit->setClearButtonEnabled(false); m_passwordEdit->setEchoMode(QLineEdit::Password); m_passwordEdit->setContextMenuPolicy(Qt::NoContextMenu);