Skip to content
Permalink
Browse files

[processing] Add operators for parameter type flags, push warning

to message log for duplicate parameter registration
  • Loading branch information
nyalldawson committed Mar 6, 2018
1 parent 74d14ae commit 227f7062879402aee57fc2ad252385f31fd642d5
@@ -69,6 +69,9 @@ The default implementation returns an empty map.
%End
};

QFlags<QgsProcessingParameterType::ParameterFlag> operator|(QgsProcessingParameterType::ParameterFlag f1, QFlags<QgsProcessingParameterType::ParameterFlag> f2);


/************************************************************************
* This file has been generated automatically from *
* *
@@ -86,4 +86,6 @@ class CORE_EXPORT QgsProcessingParameterType
virtual QVariantMap metadata() const;
};

Q_DECLARE_OPERATORS_FOR_FLAGS( QgsProcessingParameterType::ParameterFlags )

#endif // QGSPROCESSINGPARAMETERTYPE_H
@@ -163,8 +163,11 @@ bool QgsProcessingRegistry::addParameterType( QgsProcessingParameterType *type )
}
else
{
QgsLogger::warning( QStringLiteral( "Duplicate parameter type %1 (\"%2\") registered" ).arg( type->id(), type->name() ) );

if ( mParameterTypes.value( type->id() ) != type )
delete type;

return false;
}
}

5 comments on commit 227f706

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids replied Mar 7, 2018

@nyalldawson ProcessingQgisAlgorithmsTest is broken, could it be this one?

@nyalldawson

This comment has been minimized.

Copy link
Collaborator Author

@nyalldawson nyalldawson replied Mar 7, 2018

@3nids it's not this - has there been a gdal update on the docker image? I suspect that's what's happened and the new hash needs to be added to the acceptable list.

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn replied Mar 7, 2018

@nyalldawson , is there a way to look at the raster story on Travis to make sure it rendered okay prior to adding the hash?

@nyalldawson

This comment has been minimized.

Copy link
Collaborator Author

@nyalldawson nyalldawson replied Mar 7, 2018

@nirvn nope - all you get is that hash. You make the call whether it's acceptable! (you CAN visual a raster just from a hash, right?)

@alexbruy

This comment has been minimized.

Copy link
Contributor

@alexbruy alexbruy replied Mar 7, 2018

BTW, for me on Ubuntu 1.6.04 build failed with

/home/alex/devel/qgis/src/core/processing/qgsprocessingparametertypeimpl.h: In member function ‘virtual QgsProcessingParameterType::ParameterFlags QgsProcessingParameterTypeVectorDestination::flags() const’:
/home/alex/devel/qgis/src/core/processing/qgsprocessingparametertypeimpl.h:396:13: error: ‘QgsProcessingParameterType::ParameterFlags {aka class QFlags<QgsProcessingParameterType::ParameterFlag>}’ has no member named ‘setFlag’
       flags.setFlag( ParameterFlag::ExposeToModeler, false );
Please sign in to comment.
You can’t perform that action at this time.