Skip to content

Commit

Permalink
Fix sip __hash__ for qgsactionscope
Browse files Browse the repository at this point in the history
to allow use in actionScopeRegistry. Fixes #29225
  • Loading branch information
stev-0 committed Apr 6, 2020
1 parent d2360da commit 1730815
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/core/auto_generated/qgsactionscope.sip.in
Expand Up @@ -36,6 +36,9 @@ form.</dd>
#include "qgsactionscope.h"
%End
public:
%TypeCode
#include <QHash>
%End

explicit QgsActionScope();
%Docstring
Expand Down Expand Up @@ -109,6 +112,10 @@ in here, they are extracted automatically from the expressionContextScope().
Returns if this scope is valid.

.. versionadded:: 3.0
%End
long __hash__();
%MethodCode
sipRes = qHash( *sipCpp );
%End

};
Expand Down
11 changes: 11 additions & 0 deletions src/core/qgsactionscope.h
Expand Up @@ -46,6 +46,11 @@
class CORE_EXPORT QgsActionScope
{
public:
#ifdef SIP_RUN
% TypeCode
#include <QHash>
% End
#endif

/**
* Creates a new invalid action scope.
Expand Down Expand Up @@ -117,6 +122,12 @@ class CORE_EXPORT QgsActionScope
* \since QGIS 3.0
*/
bool isValid() const;
#ifdef SIP_RUN
long __hash__();
% MethodCode
sipRes = qHash( *sipCpp );
% End
#endif

private:
QString mId;
Expand Down

0 comments on commit 1730815

Please sign in to comment.