Skip to content

Commit 6935027

Browse files
committed
[processing] Fix API break in widget wrapper
Fixes #19820
1 parent efed091 commit 6935027

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

python/gui/auto_generated/processing/qgsprocessingwidgetwrapper.sip.in

+2
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ Returns the current wrapped label, if any.
118118
Returns the parameter definition associated with this wrapper.
119119
%End
120120

121+
%Property( name = param, get = parameterDefinition )
122+
121123
void setParameterValue( const QVariant &value, QgsProcessingContext &context );
122124
%Docstring
123125
Sets the current ``value`` for the parameter.

python/plugins/processing/gui/wrappers.py

-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ def __init__(self, param, dialog, row=0, col=0, **kwargs):
155155
self.dialogType = dialogTypes.get(dialog.__class__.__name__, QgsProcessingGui.Standard)
156156
super().__init__(param, self.dialogType)
157157

158-
self.param = param
159158
self.dialog = dialog
160159
self.row = row
161160
self.col = col

scripts/sipify.pl

+7
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,13 @@ sub detect_non_method_member{
534534
write_output("COD", $LINE."\n");
535535
next;
536536
}
537+
# do not process SIP code %Property
538+
if ( $SIP_RUN == 1 && $LINE =~ m/^ *% *(Property)(.*)?$/ ){
539+
$LINE = "%$1$2";
540+
$COMMENT = '';
541+
write_output("COD", $LINE."\n");
542+
next;
543+
}
537544

538545
# Skip preprocessor stuff
539546
if ($LINE =~ m/^\s*#/){

src/gui/processing/qgsprocessingwidgetwrapper.h

+5
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ class GUI_EXPORT QgsAbstractProcessingParameterWidgetWrapper : public QObject
139139
*/
140140
const QgsProcessingParameterDefinition *parameterDefinition() const;
141141

142+
// TODO QGIS 4.0 -- remove
143+
#ifdef SIP_RUN
144+
% Property( name = param, get = parameterDefinition )
145+
#endif
146+
142147
/**
143148
* Sets the current \a value for the parameter.
144149
*

0 commit comments

Comments
 (0)