Skip to content
Permalink
Browse files

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

  • Loading branch information
github-actions authored and nyalldawson committed Jun 29, 2020
1 parent c30379c commit f5defcd536e108c7e991302ce8ee18954f0f3eff
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/providers/mssql/qgsmssqlnewconnection.cpp
@@ -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 );
}

0 comments on commit f5defcd

Please sign in to comment.
You can’t perform that action at this time.