Skip to content

Commit

Permalink
Expose QgsWeakRelation constructor to sip
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 30, 2022
1 parent f045fa2 commit 724bf9e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
17 changes: 17 additions & 0 deletions python/core/auto_generated/qgsweakrelation.sip.in
Expand Up @@ -44,6 +44,23 @@ and cannot be translated to :py:class:`QgsRelations` or respected in QGIS relati
Default constructor for an invalid relation.
%End

QgsWeakRelation( const QString &relationId,
const QString &relationName,
const Qgis::RelationshipStrength strength,
const QString &referencingLayerId,
const QString &referencingLayerName,
const QString &referencingLayerSource,
const QString &referencingLayerProviderKey,
const QString &referencedLayerId,
const QString &referencedLayerName,
const QString &referencedLayerSource,
const QString &referencedLayerProviderKey
);
%Docstring
Creates a QgsWeakRelation.

.. versionadded:: 3.30
%End

QList< QgsRelation > resolvedRelations( const QgsProject *project ) const;
%Docstring
Expand Down
5 changes: 1 addition & 4 deletions src/core/qgsweakrelation.h
Expand Up @@ -58,12 +58,10 @@ class CORE_EXPORT QgsWeakRelation
*/
QgsWeakRelation();

#ifndef SIP_RUN

/**
* Creates a QgsWeakRelation.
*
* \note Not available in Python bindings.
* \since QGIS 3.30
*/
QgsWeakRelation( const QString &relationId,
const QString &relationName,
Expand All @@ -77,7 +75,6 @@ class CORE_EXPORT QgsWeakRelation
const QString &referencedLayerSource,
const QString &referencedLayerProviderKey
);
#endif

/**
* Resolves a weak relation in the given \a project returning a list of possibly invalid QgsRelations
Expand Down

0 comments on commit 724bf9e

Please sign in to comment.