Skip to content

Commit 474ca93

Browse files
committed
fix #5023
1 parent df5ba53 commit 474ca93

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/providers/postgres/qgspgsourceselect.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,14 +371,10 @@ QgsPgSourceSelect::~QgsPgSourceSelect()
371371

372372
void QgsPgSourceSelect::populateConnectionList()
373373
{
374-
QStringList keys = QgsPostgresConn::connectionList();
375-
QStringList::Iterator it = keys.begin();
374+
cmbConnections->blockSignals( true );
376375
cmbConnections->clear();
377-
while ( it != keys.end() )
378-
{
379-
cmbConnections->addItem( *it );
380-
++it;
381-
}
376+
cmbConnections->addItems( QgsPostgresConn::connectionList() );
377+
cmbConnections->blockSignals( false );
382378

383379
setConnectionListPosition();
384380

@@ -606,6 +602,7 @@ void QgsPgSourceSelect::setConnectionListPosition()
606602
{
607603
// If possible, set the item currently displayed database
608604
QString toSelect = QgsPostgresConn::selectedConnection();
605+
609606
cmbConnections->setCurrentIndex( cmbConnections->findText( toSelect ) );
610607

611608
if ( cmbConnections->currentIndex() < 0 )

0 commit comments

Comments
 (0)