Skip to content

Commit

Permalink
Add setId
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Aug 14, 2021
1 parent 8a5fbff commit eb0b0a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/core/auto_generated/qgsaction.sip.in
Expand Up @@ -77,6 +77,7 @@ Returns a unique id for this action.
.. versionadded:: 3.0
%End


bool isValid() const;
%Docstring
Returns ``True`` if this action was a default constructed one.
Expand Down
5 changes: 5 additions & 0 deletions src/core/qgsaction.cpp
Expand Up @@ -27,6 +27,11 @@
#include "qgslogger.h"
#include "qgsexpressioncontextutils.h"

void QgsAction::setId( const QUuid &id )
{
mId = id;
}

bool QgsAction::runable() const
{
return mType == Generic ||
Expand Down
8 changes: 8 additions & 0 deletions src/core/qgsaction.h
Expand Up @@ -132,6 +132,14 @@ class CORE_EXPORT QgsAction
*/
QUuid id() const { return mId; }

/**
* Set the unique \a id for this action.
*
* \note not available in Python bindings
* \since QGIS 3.22
*/
void setId( const QUuid &id ) SIP_SKIP;

/**
* Returns TRUE if this action was a default constructed one.
*
Expand Down

0 comments on commit eb0b0a7

Please sign in to comment.