[user] Apply coding style
This commit is contained in:
parent
2bb4dd8e22
commit
b337a6b3f5
@ -99,14 +99,12 @@ UsersPage::UsersPage( QWidget* parent )
|
|||||||
connect( ui->textBoxUserVerifiedPassword, &QLineEdit::textChanged, this, &UsersPage::onPasswordTextChanged );
|
connect( ui->textBoxUserVerifiedPassword, &QLineEdit::textChanged, this, &UsersPage::onPasswordTextChanged );
|
||||||
connect( ui->textBoxRootPassword, &QLineEdit::textChanged, this, &UsersPage::onRootPasswordTextChanged );
|
connect( ui->textBoxRootPassword, &QLineEdit::textChanged, this, &UsersPage::onRootPasswordTextChanged );
|
||||||
connect( ui->textBoxVerifiedRootPassword, &QLineEdit::textChanged, this, &UsersPage::onRootPasswordTextChanged );
|
connect( ui->textBoxVerifiedRootPassword, &QLineEdit::textChanged, this, &UsersPage::onRootPasswordTextChanged );
|
||||||
connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged, this, [this]( int )
|
connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged, this, [this]( int ) {
|
||||||
{
|
|
||||||
onPasswordTextChanged( ui->textBoxUserPassword->text() );
|
onPasswordTextChanged( ui->textBoxUserPassword->text() );
|
||||||
onRootPasswordTextChanged( ui->textBoxRootPassword->text() );
|
onRootPasswordTextChanged( ui->textBoxRootPassword->text() );
|
||||||
checkReady( isReady() );
|
checkReady( isReady() );
|
||||||
} );
|
} );
|
||||||
connect( ui->checkBoxReusePassword, &QCheckBox::stateChanged, this, [this]( int checked )
|
connect( ui->checkBoxReusePassword, &QCheckBox::stateChanged, this, [this]( int checked ) {
|
||||||
{
|
|
||||||
ui->labelChooseRootPassword->setVisible( !checked );
|
ui->labelChooseRootPassword->setVisible( !checked );
|
||||||
ui->labelRootPassword->setVisible( !checked );
|
ui->labelRootPassword->setVisible( !checked );
|
||||||
ui->labelRootPasswordError->setVisible( !checked );
|
ui->labelRootPasswordError->setVisible( !checked );
|
||||||
@ -560,8 +558,8 @@ UsersPage::addPasswordCheck( const QString& key, const QVariant& value )
|
|||||||
{
|
{
|
||||||
if ( value.toBool() )
|
if ( value.toBool() )
|
||||||
{
|
{
|
||||||
m_passwordChecks.push_back( PasswordCheck(
|
m_passwordChecks.push_back(
|
||||||
[]() { return QCoreApplication::translate( "PWQ", "Password is empty" ); },
|
PasswordCheck( []() { return QCoreApplication::translate( "PWQ", "Password is empty" ); },
|
||||||
[]( const QString& s ) { return !s.isEmpty(); },
|
[]( const QString& s ) { return !s.isEmpty(); },
|
||||||
PasswordCheck::Weight( 1 ) ) );
|
PasswordCheck::Weight( 1 ) ) );
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,8 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_widget->setPasswordCheckboxVisible( CalamaresUtils::getBool( configurationMap, "allowWeakPasswords", false ) );
|
m_widget->setPasswordCheckboxVisible( CalamaresUtils::getBool( configurationMap, "allowWeakPasswords", false ) );
|
||||||
m_widget->setValidatePasswordDefault( !CalamaresUtils::getBool( configurationMap, "allowWeakPasswordsDefault", false) );
|
m_widget->setValidatePasswordDefault(
|
||||||
|
!CalamaresUtils::getBool( configurationMap, "allowWeakPasswordsDefault", false ) );
|
||||||
|
|
||||||
QString shell( QLatin1String( "/bin/bash" ) ); // as if it's not set at all
|
QString shell( QLatin1String( "/bin/bash" ) ); // as if it's not set at all
|
||||||
if ( configurationMap.contains( "userShell" ) )
|
if ( configurationMap.contains( "userShell" ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user