Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lighter-greeter/lightergreeter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2015 - 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2015 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
#include <QApplication>

Check warning on line 4 in lighter-greeter/lightergreeter.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QApplication> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QLineEdit>
#include <QVBoxLayout>
#include <QPushButton>
Expand Down Expand Up @@ -286,7 +286,7 @@
case QLightDM::Greeter::MessageType::MessageTypeError:
// Clear password field, set alert flag, and show error message for error messages
if (m_passwordEdit->isVisible()) {
m_passwordEdit->clear();
m_passwordEdit->setText(QString());
Comment thread
robertkill marked this conversation as resolved.
m_passwordEdit->setAlert(true);
m_passwordEdit->showAlertMessage(messageText);
m_passwordEdit->setFocus();
Expand All @@ -305,7 +305,7 @@
void LighterGreeter::updateFocus()
{
// Clear password field
m_passwordEdit->clear();
m_passwordEdit->setText(QString());

m_passwordEdit->setVisible(true);

Expand Down
10 changes: 5 additions & 5 deletions src/session-widgets/auth_password.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -318,7 +318,7 @@ void AuthPassword::initConnections()
*/
void AuthPassword::reset()
{
m_lineEdit->clear();
m_lineEdit->setText(QString());
m_lineEdit->setAlert(false);
m_lineEdit->hideAlertMessage();
setFocusProxy(m_lineEdit);
Expand Down Expand Up @@ -348,7 +348,7 @@ void AuthPassword::setAuthState(const AuthState state, const QString &result)
setAnimationState(false);
setAuthStateStyle(LOGIN_CHECK);
m_lineEdit->setAlert(false);
m_lineEdit->clear();
m_lineEdit->setText(QString());
setLineEditEnabled(false);
setLineEditInfo(tr("Verification successful"), PlaceHolderText);
m_showPrompt = true;
Expand Down Expand Up @@ -618,10 +618,10 @@ void AuthPassword::updateUnlockPrompt()
{
AuthModule::updateUnlockPrompt();
if (m_integerMinutes == 1) {
m_lineEdit->clear();
m_lineEdit->setText(QString());
m_lineEdit->setPlaceholderText(tr("Please try again 1 minute later"));
} else if (m_integerMinutes > 1) {
m_lineEdit->clear();
m_lineEdit->setText(QString());
m_lineEdit->setPlaceholderText(tr("Please try again %n minutes later", "", static_cast<int>(m_integerMinutes)));
} else {
setLineEditInfo(tr("Password"), PlaceHolderText);
Expand Down
10 changes: 5 additions & 5 deletions src/session-widgets/auth_single.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -137,7 +137,7 @@ void AuthSingle::initConnections()
*/
void AuthSingle::reset()
{
m_lineEdit->clear();
m_lineEdit->setText(QString());
m_lineEdit->setAlert(false);
m_lineEdit->hideAlertMessage();
setLineEditEnabled(true);
Expand All @@ -157,14 +157,14 @@ void AuthSingle::setAuthState(const AuthCommon::AuthState state, const QString &
case AS_Success:
setAnimationState(false);
m_lineEdit->setAlert(false);
m_lineEdit->clear();
m_lineEdit->setText(QString());
setLineEditEnabled(false);
setLineEditInfo(result, PlaceHolderText);
emit authFinished(AS_Success);
break;
case AS_Failure: {
setAnimationState(false);
m_lineEdit->clear();
m_lineEdit->setText(QString());
if (m_limitsInfo->locked) {
m_lineEdit->setAlert(false);
setLineEditEnabled(false);
Expand Down Expand Up @@ -201,7 +201,7 @@ void AuthSingle::setAuthState(const AuthCommon::AuthState state, const QString &
break;
case AS_Prompt:
setAnimationState(false);
m_lineEdit->clear();
m_lineEdit->setText(QString());
setLineEditEnabled(true);
setLineEditInfo(result, PlaceHolderText);
break;
Expand Down
8 changes: 4 additions & 4 deletions src/session-widgets/auth_ukey.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2021 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2021 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -90,7 +90,7 @@ void AuthUKey::initConnections()
*/
void AuthUKey::reset()
{
m_lineEdit->clear();
m_lineEdit->setText(QString());
m_lineEdit->setAlert(false);
m_lineEdit->hideAlertMessage();
setLineEditEnabled(true);
Expand All @@ -111,7 +111,7 @@ void AuthUKey::setAuthState(const AuthCommon::AuthState state, const QString &re
setAnimationState(false);
setAuthStateStyle(LOGIN_CHECK);
m_lineEdit->setAlert(false);
m_lineEdit->clear();
m_lineEdit->setText(QString());
setLineEditEnabled(false);
setLineEditInfo(tr("Verification successful"), PlaceHolderText);
m_showPrompt = true;
Expand All @@ -122,7 +122,7 @@ void AuthUKey::setAuthState(const AuthCommon::AuthState state, const QString &re
case AuthCommon::AS_Failure:
setAnimationState(false);
setAuthStateStyle(LOGIN_WAIT);
m_lineEdit->clear();
m_lineEdit->setText(QString());
m_lineEdit->setFocus();
if (m_limitsInfo->locked) {
m_lineEdit->setAlert(false);
Expand Down
Loading