Skip to content
Permalink
Browse files

Minimal encode/decode uri implementations for ept data provider

  • Loading branch information
nyalldawson committed Oct 26, 2020
1 parent aadca8c commit 539f235071d956e21ab5e660d6b8db34f0c7751e
Showing with 16 additions and 0 deletions.
  1. +14 −0 src/core/providers/ept/qgseptprovider.cpp
  2. +2 −0 src/core/providers/ept/qgseptprovider.h
@@ -84,4 +84,18 @@ QList<QgsDataItemProvider *> QgsEptProviderMetadata::dataItemProviders() const
return providers;
}

QVariantMap QgsEptProviderMetadata::decodeUri( const QString &uri )
{
const QString path = uri;
QVariantMap uriComponents;
uriComponents.insert( QStringLiteral( "path" ), path );
return uriComponents;
}

QString QgsEptProviderMetadata::encodeUri( const QVariantMap &parts )
{
const QString path = parts.value( QStringLiteral( "path" ) ).toString();
return path;
}

///@endcond
@@ -63,6 +63,8 @@ class QgsEptProviderMetadata : public QgsProviderMetadata
QgsEptProviderMetadata();
QgsEptProvider *createProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() ) override;
QList< QgsDataItemProvider * > dataItemProviders() const override;
QString encodeUri( const QVariantMap &parts ) override;
QVariantMap decodeUri( const QString &uri ) override;
};

///@endcond

0 comments on commit 539f235

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