Skip to content

Commit 1730815

Browse files
committedApr 6, 2020
Fix sip __hash__ for qgsactionscope
to allow use in actionScopeRegistry. Fixes #29225
1 parent d2360da commit 1730815

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
 

‎python/core/auto_generated/qgsactionscope.sip.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ form.</dd>
3636
#include "qgsactionscope.h"
3737
%End
3838
public:
39+
%TypeCode
40+
#include <QHash>
41+
%End
3942

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

111114
.. versionadded:: 3.0
115+
%End
116+
long __hash__();
117+
%MethodCode
118+
sipRes = qHash( *sipCpp );
112119
%End
113120

114121
};

‎src/core/qgsactionscope.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
class CORE_EXPORT QgsActionScope
4747
{
4848
public:
49+
#ifdef SIP_RUN
50+
% TypeCode
51+
#include <QHash>
52+
% End
53+
#endif
4954

5055
/**
5156
* Creates a new invalid action scope.
@@ -117,6 +122,12 @@ class CORE_EXPORT QgsActionScope
117122
* \since QGIS 3.0
118123
*/
119124
bool isValid() const;
125+
#ifdef SIP_RUN
126+
long __hash__();
127+
% MethodCode
128+
sipRes = qHash( *sipCpp );
129+
% End
130+
#endif
120131

121132
private:
122133
QString mId;

0 commit comments

Comments
 (0)
Please sign in to comment.