mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 17:05:36 -04:00
[users] Give password-checks a weight, to sort them later
This commit is contained in:
parent
b3e7c3f294
commit
dec0cfb7d3
3 changed files with 34 additions and 23 deletions
|
@ -147,8 +147,8 @@ UsersPage::retranslate()
|
|||
// Re-do password checks (with output messages) as well.
|
||||
// .. the password-checking methods get their values from the text boxes,
|
||||
// not from their parameters.
|
||||
onPasswordTextChanged(QString());
|
||||
onRootPasswordTextChanged(QString());
|
||||
onPasswordTextChanged( QString() );
|
||||
onRootPasswordTextChanged( QString() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -227,8 +227,8 @@ void
|
|||
UsersPage::onActivate()
|
||||
{
|
||||
ui->textBoxFullName->setFocus();
|
||||
onPasswordTextChanged(QString());
|
||||
onRootPasswordTextChanged(QString());
|
||||
onPasswordTextChanged( QString() );
|
||||
onRootPasswordTextChanged( QString() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -514,8 +514,10 @@ UsersPage::addPasswordCheck( const QString& key, const QVariant& value )
|
|||
{
|
||||
if ( value.toBool() )
|
||||
{
|
||||
m_passwordChecks.push_back( PasswordCheck( []() { return QCoreApplication::translate( "EMP", "Password is empty" ); },
|
||||
[]( const QString& s ) { return ((cDebug() << "Checking pwd" << s << "for empty"), !s.isEmpty()); } ) );
|
||||
m_passwordChecks.push_back( PasswordCheck(
|
||||
[]() { return QCoreApplication::translate( "EMP", "Password is empty" ); },
|
||||
[]( const QString& s ) { return ( ( cDebug() << "Checking pwd" << s << "for empty" ), !s.isEmpty() ); },
|
||||
PasswordCheck::Weight( 1 ) ) );
|
||||
}
|
||||
}
|
||||
#ifdef CHECK_PWQUALITY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue