Skip to content
Permalink
Browse files

Add QgsProviderMetadata::SaveLayerMetadata capability to indicate that a

provider has support for saving layer metadata
  • Loading branch information
nyalldawson committed May 4, 2021
1 parent 2f27973 commit 64a23d2645b29e645cf6be8bf1e966ec610e838e
@@ -118,6 +118,7 @@ library object.
enum ProviderCapability
{
FileBasedUris,
SaveLayerMetadata,
};
typedef QFlags<QgsProviderMetadata::ProviderCapability> ProviderCapabilities;

@@ -591,6 +592,7 @@ relating to the connection have been updated.

QFlags<QgsProviderMetadata::ProviderMetadataCapability> operator|(QgsProviderMetadata::ProviderMetadataCapability f1, QFlags<QgsProviderMetadata::ProviderMetadataCapability> f2);

QFlags<QgsProviderMetadata::ProviderCapability> operator|(QgsProviderMetadata::ProviderCapability f1, QFlags<QgsProviderMetadata::ProviderCapability> f2);


/************************************************************************
@@ -7652,6 +7652,6 @@ void QgsOgrProviderMetadata::saveConnection( const QgsAbstractProviderConnection

QgsProviderMetadata::ProviderCapabilities QgsOgrProviderMetadata::providerCapabilities() const
{
return FileBasedUris;
return FileBasedUris | SaveLayerMetadata;
}
///@endcond
@@ -162,6 +162,7 @@ class CORE_EXPORT QgsProviderMetadata : public QObject
enum ProviderCapability
{
FileBasedUris = 1 << 0, //!< Indicates that the provider can utilize URIs which are based on paths to files (as opposed to database or internet paths)
SaveLayerMetadata = 1 << 1, //!< Indicates that the provider supports saving native layer metadata (since QGIS 3.20)
};
Q_DECLARE_FLAGS( ProviderCapabilities, ProviderCapability )

@@ -673,6 +674,6 @@ class CORE_EXPORT QgsProviderMetadata : public QObject
};

Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProviderMetadata::ProviderMetadataCapabilities )

Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProviderMetadata::ProviderCapabilities )

#endif //QGSPROVIDERMETADATA_H

0 comments on commit 64a23d2

Please sign in to comment.