Skip to content
Permalink
Browse files

Enables Postgresql service based connections without database name

  • Loading branch information
jgrocha committed May 1, 2020
1 parent 752d0ad commit 79e7bdeb2eadf6fac3f4f1cb970016f9a2a7d2b7
@@ -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 );
}
@@ -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();
@@ -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

0 comments on commit 79e7bde

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