Skip to content
Permalink
Browse files

Implement decodeUri for the delimited text & spatialite providers

  • Loading branch information
nirvn committed Aug 16, 2018
1 parent 45b209c commit 1ab87166882e268ad9ffcd1cb744dc9cdaa964ae
@@ -1135,6 +1135,13 @@ QString QgsDelimitedTextProvider::description() const
return TEXT_PROVIDER_DESCRIPTION;
}

QGISEXTERN QVariantMap decodeUri( const QString &uri )
{
QVariantMap components;
components.insert( QStringLiteral( "path" ), QUrl( uri ).toLocalFile() );
return components;
}

/**
* Class factory to return a pointer to a newly created
* QgsDelimitedTextProvider object
@@ -5294,6 +5294,16 @@ void QgsSpatiaLiteProvider::invalidateConnections( const QString &connection )
QgsSpatiaLiteConnPool::instance()->invalidateConnections( connection );
}

QGISEXTERN QVariantMap decodeUri( const QString &uri )
{
QgsDataSourceUri dsUri = QgsDataSourceUri( uri );

QVariantMap components;
components.insert( QStringLiteral( "path" ), dsUri.database() );
components.insert( QStringLiteral( "layerName" ), dsUri.table() );
return components;
}

/**
* Class factory to return a pointer to a newly created
* QgsSpatiaLiteProvider object

0 comments on commit 1ab8716

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