Skip to content

Commit

Permalink
[processing] Fix API break in widget wrapper
Browse files Browse the repository at this point in the history
Fixes #19820
  • Loading branch information
nyalldawson committed Sep 12, 2018
1 parent efed091 commit 6935027
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Returns the current wrapped label, if any.
Returns the parameter definition associated with this wrapper.
%End

%Property( name = param, get = parameterDefinition )

void setParameterValue( const QVariant &value, QgsProcessingContext &context );
%Docstring
Sets the current ``value`` for the parameter.
Expand Down
1 change: 0 additions & 1 deletion python/plugins/processing/gui/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ def __init__(self, param, dialog, row=0, col=0, **kwargs):
self.dialogType = dialogTypes.get(dialog.__class__.__name__, QgsProcessingGui.Standard)
super().__init__(param, self.dialogType)

self.param = param
self.dialog = dialog
self.row = row
self.col = col
Expand Down
7 changes: 7 additions & 0 deletions scripts/sipify.pl
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,13 @@ sub detect_non_method_member{
write_output("COD", $LINE."\n");
next;
}
# do not process SIP code %Property
if ( $SIP_RUN == 1 && $LINE =~ m/^ *% *(Property)(.*)?$/ ){
$LINE = "%$1$2";
$COMMENT = '';
write_output("COD", $LINE."\n");
next;
}

# Skip preprocessor stuff
if ($LINE =~ m/^\s*#/){
Expand Down
5 changes: 5 additions & 0 deletions src/gui/processing/qgsprocessingwidgetwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ class GUI_EXPORT QgsAbstractProcessingParameterWidgetWrapper : public QObject
*/
const QgsProcessingParameterDefinition *parameterDefinition() const;

// TODO QGIS 4.0 -- remove
#ifdef SIP_RUN
% Property( name = param, get = parameterDefinition )
#endif

/**
* Sets the current \a value for the parameter.
*
Expand Down

0 comments on commit 6935027

Please sign in to comment.