Skip to content
Permalink
Browse files

[processing] Fix API break in widget wrapper

Fixes #19820
  • Loading branch information
nyalldawson committed Sep 12, 2018
1 parent efed091 commit 6935027ead9e1bd3741e1c265ce5b5b77882a21b
@@ -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.
@@ -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
@@ -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*#/){
@@ -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.
*

0 comments on commit 6935027

Please sign in to comment.
You can’t perform that action at this time.