Skip to content
Permalink
Browse files

Add Python repr for QgsProviderRegistry::ProviderCandidateDetails

  • Loading branch information
nyalldawson committed Nov 6, 2020
1 parent d506caf commit 9c55b8bd6f8fa199b96ce0c82a777d80e837efb3
Showing with 14 additions and 0 deletions.
  1. +6 −0 python/core/auto_generated/qgsproviderregistry.sip.in
  2. +8 −0 src/core/qgsproviderregistry.h
@@ -311,6 +311,12 @@ Returns a list of map layer types which are valid options for opening the
target using this candidate provider.
%End

SIP_PYOBJECT __repr__();
%MethodCode
QString str = QStringLiteral( "<QgsProviderRegistry.ProviderCandidateDetails: %1>" ).arg( sipCpp->metadata()->key() );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End

};

QList< QgsProviderRegistry::ProviderCandidateDetails > preferredProvidersForUri( const QString &uri ) const;
@@ -313,6 +313,14 @@ class CORE_EXPORT QgsProviderRegistry
*/
QList<QgsMapLayerType> layerTypes() const { return mLayerTypes; }

#ifdef SIP_RUN
SIP_PYOBJECT __repr__();
% MethodCode
QString str = QStringLiteral( "<QgsProviderRegistry.ProviderCandidateDetails: %1>" ).arg( sipCpp->metadata()->key() );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
% End
#endif

private:
QgsProviderMetadata *mMetadata = nullptr;

0 comments on commit 9c55b8b

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