[mssql] Reallow creating connections with empty provider/dsn strings

Fixes #37427
This commit is contained in:
Nyall Dawson 2020-06-29 12:06:19 +10:00
parent 62b88463cc
commit 89298373e0

View File

@ -41,7 +41,6 @@ QgsMssqlNewConnection::QgsMssqlNewConnection( QWidget *parent, const QString &co
buttonBox->button( QDialogButtonBox::Ok )->setDisabled( true );
connect( txtName, &QLineEdit::textChanged, this, &QgsMssqlNewConnection::updateOkButtonState );
connect( txtService, &QLineEdit::textChanged, this, &QgsMssqlNewConnection::updateOkButtonState );
connect( txtHost, &QLineEdit::textChanged, this, &QgsMssqlNewConnection::updateOkButtonState );
connect( listDatabase, &QListWidget::currentItemChanged, this, &QgsMssqlNewConnection::updateOkButtonState );
@ -253,6 +252,6 @@ void QgsMssqlNewConnection::showHelp()
void QgsMssqlNewConnection::updateOkButtonState()
{
QListWidgetItem *item = listDatabase->currentItem();
bool enabled = !txtName->text().isEmpty() && !txtService->text().isEmpty() && !txtHost->text().isEmpty() && item;
bool enabled = !txtName->text().isEmpty() && !txtHost->text().isEmpty() && item;
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
}