From 5bfef2a1489ba745a3052990a640401c090b41bb Mon Sep 17 00:00:00 2001 From: Olivier SOLDANO <olivier.soldano@savoirfairelinux.com> Date: Mon, 2 Oct 2017 11:58:55 -0400 Subject: [PATCH] allow empty password without check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the user was prompted positively for not setting a password, it is now possible to have no password without uncumberment Change-Id: I4f62ee8c29ff3c73757e4080a0342be71d1a6add Reviewed-by: Anthony Léonard <anthony.leonard@savoirfairelinux.com> --- wizarddialog.cpp | 13 ------------- wizarddialog.ui | 32 +++++++++++--------------------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/wizarddialog.cpp b/wizarddialog.cpp index 3283c64..a004337 100644 --- a/wizarddialog.cpp +++ b/wizarddialog.cpp @@ -80,19 +80,6 @@ WizardDialog::WizardDialog(WizardMode wizardMode, Account* toBeMigrated, QWidget connect(&nameLookupTimer_, QTimer::timeout, this, WizardDialog::timeoutNameLookupTimer); connect(ui->photoBooth, &PhotoboothWidget::photoTaken, this, WizardDialog::on_photoTaken); ui->avatarLabel->hide(); - ui->disablePassword->setChecked(false); - - connect(ui->disablePassword, QCheckBox::stateChanged, [=](int state){ - if (state == Qt::Checked){ - ui->passwordEdit->setEnabled(false); - ui->passwordEdit->clear(); - ui->confirmPasswordEdit->setEnabled(false); - ui->confirmPasswordEdit->clear(); - } else if (Qt::Unchecked || Qt::PartiallyChecked) { - ui->passwordEdit->setEnabled(true); - ui->confirmPasswordEdit->setEnabled(true); - } - }); } WizardDialog::~WizardDialog() diff --git a/wizarddialog.ui b/wizarddialog.ui index 5dd72b3..de7d0d4 100644 --- a/wizarddialog.ui +++ b/wizarddialog.ui @@ -685,6 +685,9 @@ p, li { white-space: pre-wrap; } </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> <item> <spacer name="horizontalSpacer_2"> <property name="orientation"> @@ -745,26 +748,13 @@ p, li { white-space: pre-wrap; } <property name="text"> <string>Searching...</string> </property> + <property name="margin"> + <number>6</number> + </property> </widget> </item> </layout> </item> - <item alignment="Qt::AlignHCenter"> - <widget class="QCheckBox" name="disablePassword"> - <property name="toolTip"> - <string>Disable password checkbox</string> - </property> - <property name="accessibleName"> - <string/> - </property> - <property name="accessibleDescription"> - <string/> - </property> - <property name="text"> - <string> I do not want to set a password</string> - </property> - </widget> - </item> <item alignment="Qt::AlignHCenter"> <widget class="QLineEdit" name="pinEdit"> <property name="minimumSize"> @@ -1039,17 +1029,17 @@ p, li { white-space: pre-wrap; } </layout> </widget> <customwidgets> + <customwidget> + <class>RingButton</class> + <extends>QPushButton</extends> + <header>ringbutton.h</header> + </customwidget> <customwidget> <class>PhotoboothWidget</class> <extends>QWidget</extends> <header>photoboothwidget.h</header> <container>1</container> </customwidget> - <customwidget> - <class>RingButton</class> - <extends>QPushButton</extends> - <header>ringbutton.h</header> - </customwidget> </customwidgets> <resources> <include location="ressources.qrc"/> -- GitLab