Skip to content

Commit

Permalink
Enables Postgresql service based connections without database name
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrocha committed May 1, 2020
1 parent 752d0ad commit 79e7bde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspgnewconnection.cpp
Expand Up @@ -249,7 +249,7 @@ void QgsPgNewConnection::showHelp()
void QgsPgNewConnection::updateOkButtonState()
{
bool enabled = !txtName->text().isEmpty() && (
( !txtService->text().isEmpty() && !txtDatabase->text().isEmpty() ) ||
( !txtService->text().isEmpty() && txtDatabase->text().isEmpty() ) ||
( !txtHost->text().isEmpty() && !txtPort->text().isEmpty() && !txtDatabase->text().isEmpty() ) );
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
}
1 change: 1 addition & 0 deletions src/providers/postgres/qgspgsourceselect.cpp
Expand Up @@ -345,6 +345,7 @@ void QgsPgSourceSelect::btnLoad_clicked()
void QgsPgSourceSelect::btnEdit_clicked()
{
QgsPgNewConnection *nc = new QgsPgNewConnection( this, cmbConnections->currentText() );
nc->setWindowTitle( tr( "Edit PostGIS Connection" ) );
if ( nc->exec() )
{
populateConnectionList();
Expand Down
1 change: 1 addition & 0 deletions src/providers/postgres/qgspostgresdataitemguiprovider.cpp
Expand Up @@ -185,6 +185,7 @@ void QgsPostgresDataItemGuiProvider::newConnection( QgsDataItem *item )
void QgsPostgresDataItemGuiProvider::editConnection( QgsDataItem *item )
{
QgsPgNewConnection nc( nullptr, item->name() );
nc.setWindowTitle( tr( "Edit PostGIS Connection" ) );
if ( nc.exec() )
{
// the parent should be updated
Expand Down

0 comments on commit 79e7bde

Please sign in to comment.