Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aa78d75

Browse files
authoredApr 4, 2023
fix save connection dialog
fixes #52519
1 parent 8f5476e commit aa78d75

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed
 

‎src/gui/qgsmanageconnectionsdialog.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ bool QgsManageConnectionsDialog::populateConnections()
237237
// Export mode. Populate connections list from settings
238238
if ( mDialogMode == Export )
239239
{
240-
QStringList connections;
241-
QgsSettings settings;
240+
const QStringList connections;
242241
switch ( mConnectionType )
243242
{
244243
case WMS:
@@ -273,19 +272,12 @@ bool QgsManageConnectionsDialog::populateConnections()
273272
connections = QgsVectorTileProviderConnection::sTreeConnectionVectorTile->items();
274273
break;
275274
}
276-
if ( !settings.group().isEmpty() )
277-
{
278-
QStringList keys = settings.childGroups();
279-
QStringList::Iterator it = keys.begin();
280-
while ( it != keys.end() )
275+
for ( const QString& connection : connections)
281276
{
282277
QListWidgetItem *item = new QListWidgetItem();
283-
item->setText( *it );
278+
item->setText( connection );
284279
listConnections->addItem( item );
285-
++it;
286280
}
287-
settings.endGroup();
288-
}
289281
}
290282
// Import mode. Populate connections list from file
291283
else

0 commit comments

Comments
 (0)
Please sign in to comment.