Merge pull request #1266 from bill-auger/patch-8

housekeeping - calamares style (those lambdas are always a thing)
This commit is contained in:
Adriaan de Groot 2019-11-19 14:59:16 +01:00 committed by GitHub
commit 1c853f2348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,12 +97,14 @@ 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 checked ) { connect( ui->checkBoxValidatePassword, &QCheckBox::stateChanged, this, [this]( int checked )
{
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 );