Skip to content

Commit

Permalink
connections XML import dialog: deal properly with duplicate connectio…
Browse files Browse the repository at this point in the history
…n names (fixes #39758)
  • Loading branch information
rouault authored and nyalldawson committed Jan 27, 2021
1 parent b94e9ae commit 1fe2355
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/gui/qgsmanageconnectionsdialog.cpp
Expand Up @@ -908,10 +908,17 @@ void QgsManageConnectionsDialog::loadOWSConnections( const QDomDocument &doc, co
}
}

if ( keys.contains( connectionName ) && !overwrite )
if ( keys.contains( connectionName ) )
{
child = child.nextSiblingElement();
continue;
if ( !overwrite )
{
child = child.nextSiblingElement();
continue;
}
}
else
{
keys << connectionName;
}

// no dups detected or overwrite is allowed
Expand Down

0 comments on commit 1fe2355

Please sign in to comment.