2023-01-09 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rddbconfig(8) that made it impossible to specify
	a blank DB password.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-01-09 15:29:13 -05:00
parent 6bfd69fd97
commit 9f812cceb3
4 changed files with 14 additions and 6 deletions

View File

@ -23905,3 +23905,6 @@
2023-01-07 Fred Gleason <fredg@paravelsystems.com>
* Added a 'qt5-style-plugins' dependency to the 'rivendell' DEB
package.
2023-01-09 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rddbconfig(8) that made it impossible to specify
a blank DB password.

View File

@ -48,7 +48,9 @@ MySqlLogin::MySqlLogin(QString *username,QString *password,RDConfig *c,
login_name_label=new QLabel(tr("Username:"),this);
login_name_label->setFont(labelFont());
login_name_label->setAlignment(Qt::AlignRight);
connect(login_name_edit,SIGNAL(textChanged(const QString &)),
this,SLOT(usernameTextChangedData(const QString &)));
//
// MySql Login Password
//
@ -66,6 +68,7 @@ MySqlLogin::MySqlLogin(QString *username,QString *password,RDConfig *c,
login_ok_button->setFont(buttonFont());
login_ok_button->setText(tr("OK"));
login_ok_button->setDefault(true);
login_ok_button->setDisabled(true);
connect(login_ok_button,SIGNAL(clicked()),this,SLOT(okData()));
//
@ -97,6 +100,12 @@ QSizePolicy MySqlLogin::sizePolicy() const
}
void MySqlLogin::usernameTextChangedData(const QString &str)
{
login_ok_button->setDisabled(str.isEmpty());
}
void MySqlLogin::okData()
{
*login_name=login_name_edit->text();

View File

@ -39,6 +39,7 @@ class MySqlLogin : public RDDialog
QSizePolicy sizePolicy() const;
private slots:
void usernameTextChangedData(const QString &str);
void okData();
void cancelData();

View File

@ -264,11 +264,6 @@ void MainWidget::createData()
delete mysql_login;
if(admin_name.isEmpty()||admin_pwd.isEmpty()) {
QMessageBox::critical(this,tr("RDDbConfig Error"),tr("Did not specify username and/or password."));
return;
}
stopDaemons();
CreateDb *db_create=new CreateDb(hostname,dbname,admin_name,admin_pwd);