Skip to content
Browse files

[GUI] OGR Database connection dialog: relax checks to enable 'OK' button

Currently when defining a new OGR Database connection, one must fill
the database, host and port numbers. Some/most of them are optional on the
OGR side (for example the MYSQL driver only requires the database name,
but the PG driver could for example work without any depending on the PG
config), so do not require them at all. The 'Test connection' button is
already there for users to check they've properly filled the form.
  • Loading branch information
rouault authored and nyalldawson committed Oct 1, 2020
1 parent 75512b4 commit 9d9d0c0f5c343e91f73b5279d2dc6d34b39af29b
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/ogr/qgsnewogrconnection.cpp
@@ -123,7 +123,7 @@ void QgsNewOgrConnection::showHelp()

void QgsNewOgrConnection::updateOkButtonState()
bool enabled = !txtName->text().isEmpty() && !txtHost->text().isEmpty() && !txtDatabase->text().isEmpty() && !txtPort->text().isEmpty();
bool enabled = !txtName->text().isEmpty();
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );

0 comments on commit 9d9d0c0

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