Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
  • Loading branch information
notguiltyspark committed Nov 21, 2024
1 parent 7fc21c0 commit 297fb7b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/gui/ogr/qgsgdalguiutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ QString QgsGdalGuiUtils::createDatabaseURI( const QString &connectionType, const
QString QgsGdalGuiUtils::createProtocolURI( const QString &type, const QString &url, const QString &configId, const QString &username, const QString &password, bool expandAuthConfig )
{
QString uri = url;
QString prefix;
if ( type == QLatin1String( "vsicurl" ) )
{
QString prefix = QStringLiteral( "/vsicurl" );
prefix = QStringLiteral( "/vsicurl" );
if ( !uri.startsWith( prefix ) )
{
// If no protocol is provided in the URL, default to HTTP
Expand All @@ -247,7 +248,7 @@ QString QgsGdalGuiUtils::createProtocolURI( const QString &type, const QString &
|| type == QLatin1String( "vsihdfs" )
)
{
QString prefix = QStringLiteral( "/%1/" ).arg( type );
prefix = QStringLiteral( "/%1/" ).arg( type );
if ( !uri.startsWith( prefix ) )
{
uri.prepend( prefix );
Expand All @@ -256,27 +257,27 @@ QString QgsGdalGuiUtils::createProtocolURI( const QString &type, const QString &
// catching both GeoJSON and GeoJSONSeq
else if ( type.startsWith( QLatin1String( "GeoJSON" ) ) )
{
//uri = url;
// no change needed for now
}
else if ( type == QLatin1String( "CouchDB" ) )
{
QString prefix = QStringLiteral( "couchdb:" );
prefix = QStringLiteral( "couchdb:" );
if ( !uri.startsWith( prefix ) )
{
uri.prepend( prefix );
}
}
else if ( type == QLatin1String( "DODS/OPeNDAP" ) )
{
QString prefix = QStringLiteral( "DODS:" );
prefix = QStringLiteral( "DODS:" );
if ( !uri.startsWith( prefix ) )
{
uri.prepend( prefix );
}
}
else if ( type == QLatin1String( "WFS3" ) )
{
QString prefix = QStringLiteral( "WFS3:" );
prefix = QStringLiteral( "WFS3:" );
if ( !uri.startsWith( prefix ) )
{
uri.prepend( prefix );
Expand Down

0 comments on commit 297fb7b

Please sign in to comment.