Skip to content

Commit

Permalink
[sip] align missing bits and replace nullptr by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 2, 2017
1 parent 72b061b commit 7d45914
Show file tree
Hide file tree
Showing 92 changed files with 127 additions and 127 deletions.
2 changes: 1 addition & 1 deletion python/analysis/interpolation/NormVecDecorator.sip
Expand Up @@ -31,7 +31,7 @@ class NormVecDecorator : TriDecorator
/** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the PointStates of the triangle points (state1, state2, state3)
* @note not available in Python bindings
*/
//bool getTriangle( double x, double y, Point3D* p1 /Out/, int* ptn1 /Out/, Vector3D* v1 /Out/, PointState* state1 /Out/, Point3D* p2 /Out/, int *ptn2 /Out/, Vector3D *v2 /Out/, PointState *state2 /Out/, Point3D *p3 /Out/, int *ptn3 /Out/, Vector3D *v3 /Out/, PointState *state3 /Out/);
//bool getTriangle( double x, double y, Point3D *p1 /Out/, int *ptn1 /Out/, Vector3D *v1 /Out/, PointState *state1 /Out/, Point3D *p2 /Out/, int *ptn2 /Out/, Vector3D *v2 /Out/, PointState *state2 /Out/, Point3D *p3 /Out/, int *ptn3 /Out/, Vector3D *v3 /Out/, PointState *state3 /Out/);
/** Returns the state of the point with the number 'pointno'*/
PointState getState( int pointno ) const;
/** Sets an interpolator*/
Expand Down
4 changes: 2 additions & 2 deletions python/analysis/raster/qgsderivativefilter.sip
Expand Up @@ -15,7 +15,7 @@ class QgsDerivativeFilter : QgsNineCellFilter

protected:
/** Calculates the first order derivative in x-direction according to Horn (1981)*/
float calcFirstDerX( float* x11, float* x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 );
float calcFirstDerX( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 );
/** Calculates the first order derivative in y-direction according to Horn (1981)*/
float calcFirstDerY( float* x11, float* x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 );
float calcFirstDerY( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 );
};
2 changes: 1 addition & 1 deletion python/core/annotations/qgsannotation.sip
Expand Up @@ -23,7 +23,7 @@ class QgsAnnotation : QObject

public:

QgsAnnotation( QObject *parent /TransferThis/ = nullptr );
QgsAnnotation( QObject *parent /TransferThis/ = 0 );

virtual QgsAnnotation *clone() const = 0 /Factory/;

Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposerlegend.sip
Expand Up @@ -249,6 +249,6 @@ class QgsComposerLegend : QgsComposerItem
void synchronizeWithModel();
/** Sets mCompositionMap to 0 if the map is deleted*/
void invalidateCurrentMap();
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = nullptr );
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );

};
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposermodel.sip
Expand Up @@ -244,7 +244,7 @@ class QgsComposerProxyModel: QSortFilterProxyModel
* @param composition composition to attach model to
* @param parent optional parent
*/
QgsComposerProxyModel( QgsComposition *composition, QObject *parent /TransferThis/ = nullptr );
QgsComposerProxyModel( QgsComposition *composition, QObject *parent /TransferThis/ = 0 );

/** Returns the current item type filter, or QgsComposerItem::ComposerItem if no
* item type filter is set.
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposerscalebar.sip
Expand Up @@ -275,6 +275,6 @@ class QgsComposerScaleBar: QgsComposerItem
void updateSegmentSize();
/** Sets mCompositionMap to 0 if the map is deleted*/
void invalidateCurrentMap();
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = nullptr );
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );

};
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposition.sip
Expand Up @@ -475,7 +475,7 @@ class QgsComposition : QGraphicsScene, QgsExpressionContextGenerator
* @param dpi set to DPI of exported file, or leave as -1 to use composition's DPI.
* @note added in QGIS 2.16
*/
void georeferenceOutput( const QString& file, QgsComposerMap* referenceMap = nullptr,
void georeferenceOutput( const QString& file, QgsComposerMap* referenceMap = 0,
const QRectF &exportRegion = QRectF(), double dpi = -1 ) const;

/** Compute world file parameters. Assumes the whole page containing the associated map item
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgsgroupungroupitemscommand.sip
Expand Up @@ -26,7 +26,7 @@ class QgsGroupUngroupItemsCommand: QObject, QUndoCommand
* @param parent parent command, if any
*
*/
QgsGroupUngroupItemsCommand( State s, QgsComposerItemGroup *item, QgsComposition *c, const QString &text, QUndoCommand *parent = nullptr );
QgsGroupUngroupItemsCommand( State s, QgsComposerItemGroup *item, QgsComposition *c, const QString &text, QUndoCommand *parent = 0 );
~QgsGroupUngroupItemsCommand();

void redo();
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsexpressioncontext.sip
Expand Up @@ -545,7 +545,7 @@ class QgsExpressionContextUtils
* @param symbolScope pointer to an existing scope to update
* @note added in QGIS 2.14
*/
static QgsExpressionContextScope *updateSymbolScope( const QgsSymbol *symbol, QgsExpressionContextScope *symbolScope = nullptr );
static QgsExpressionContextScope *updateSymbolScope( const QgsSymbol *symbol, QgsExpressionContextScope *symbolScope = 0 );

/** Creates a new scope which contains variables and functions relating to a QgsComposition.
* For instance, number of pages and page sizes.
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsjsonutils.sip
Expand Up @@ -18,7 +18,7 @@ class QgsJSONExporter
* @param vectorLayer associated vector layer (required for related attribute export)
* @param precision maximum number of decimal places to use for geometry coordinates
*/
QgsJSONExporter( const QgsVectorLayer *vectorLayer = nullptr, int precision = 17 );
QgsJSONExporter( const QgsVectorLayer *vectorLayer = 0, int precision = 17 );

/** Sets the maximum number of decimal places to use in geometry coordinates.
* @param precision number of decimal places
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmapthemecollection.sip
Expand Up @@ -22,7 +22,7 @@ class QgsMapThemeCollection : QObject
{
public:
//! Initialize layer record with a map layer - it will be stored as a weak pointer
MapThemeLayerRecord( QgsMapLayer *l = nullptr );
MapThemeLayerRecord( QgsMapLayer *l = 0 );

bool operator==( const QgsMapThemeCollection::MapThemeLayerRecord &other ) const;
bool operator!=( const QgsMapThemeCollection::MapThemeLayerRecord &other ) const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsogcutils.sip
Expand Up @@ -63,7 +63,7 @@ class QgsOgcUtils
* @return valid OGC expression QDomElement on success,
* otherwise null QDomElement
*/
static QDomElement expressionToOgcExpression( const QgsExpression &exp, QDomDocument &doc, QString *errorMessage = nullptr );
static QDomElement expressionToOgcExpression( const QgsExpression &exp, QDomDocument &doc, QString *errorMessage = 0 );

};

2 changes: 1 addition & 1 deletion python/core/qgspointlocator.sip
Expand Up @@ -26,7 +26,7 @@ class QgsPointLocator : QObject
* @arg extent if not null, will index only a subset of the layer
*/
explicit QgsPointLocator( QgsVectorLayer* layer, const QgsCoordinateReferenceSystem& destinationCrs = QgsCoordinateReferenceSystem(),
const QgsRectangle *extent = nullptr );
const QgsRectangle *extent = 0 );

~QgsPointLocator();

Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsproject.sip
Expand Up @@ -28,7 +28,7 @@ class QgsProject : QObject, QgsExpressionContextGenerator
*
* Most of the time you want to use QgsProject::instance() instead as many components of QGIS work with the singleton.
*/
explicit QgsProject( QObject *parent /TransferThis/ = nullptr );
explicit QgsProject( QObject *parent /TransferThis/ = 0 );

~QgsProject();

Expand Down
12 changes: 6 additions & 6 deletions python/core/qgsproperty.sip
Expand Up @@ -117,17 +117,17 @@ class QgsProperty

virtual QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext() ) const;

QVariant value( const QgsExpressionContext &context, const QVariant &defaultValue = QVariant(), bool *ok /Out/ = nullptr ) const;
QVariant value( const QgsExpressionContext &context, const QVariant &defaultValue = QVariant(), bool *ok /Out/ = 0 ) const;

QString valueAsString( const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok /Out/ = nullptr ) const;
QString valueAsString( const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok /Out/ = 0 ) const;

QColor valueAsColor( const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok /Out/ = nullptr ) const;
QColor valueAsColor( const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok /Out/ = 0 ) const;

double valueAsDouble( const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok /Out/ = nullptr ) const;
double valueAsDouble( const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok /Out/ = 0 ) const;

int valueAsInt( const QgsExpressionContext &context, int defaultValue = 0, bool *ok /Out/ = nullptr ) const;
int valueAsInt( const QgsExpressionContext &context, int defaultValue = 0, bool *ok /Out/ = 0 ) const;

bool valueAsBool( const QgsExpressionContext &context, bool defaultValue = false, bool *ok /Out/ = nullptr ) const;
bool valueAsBool( const QgsExpressionContext &context, bool defaultValue = false, bool *ok /Out/ = 0 ) const;
QVariant toVariant() const;
bool loadVariant( const QVariant &property );

Expand Down
10 changes: 5 additions & 5 deletions python/core/qgspropertycollection.sip
Expand Up @@ -33,15 +33,15 @@ class QgsAbstractPropertyCollection

virtual QVariant value( int key, const QgsExpressionContext &context, const QVariant &defaultValue = QVariant() ) const = 0;

QString valueAsString( int key, const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok /Out/ = nullptr ) const;
QString valueAsString( int key, const QgsExpressionContext &context, const QString &defaultString = QString(), bool *ok /Out/ = 0 ) const;

QColor valueAsColor( int key, const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok /Out/ = nullptr ) const;
QColor valueAsColor( int key, const QgsExpressionContext &context, const QColor &defaultColor = QColor(), bool *ok /Out/ = 0 ) const;

double valueAsDouble( int key, const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok /Out/ = nullptr ) const;
double valueAsDouble( int key, const QgsExpressionContext &context, double defaultValue = 0.0, bool *ok /Out/ = 0 ) const;

int valueAsInt( int key, const QgsExpressionContext &context, int defaultValue = 0, bool *ok /Out/ = nullptr ) const;
int valueAsInt( int key, const QgsExpressionContext &context, int defaultValue = 0, bool *ok /Out/ = 0 ) const;

bool valueAsBool( int key, const QgsExpressionContext &context, bool defaultValue = false, bool *ok /Out/ = nullptr ) const;
bool valueAsBool( int key, const QgsExpressionContext &context, bool defaultValue = false, bool *ok /Out/ = 0 ) const;

virtual bool prepare( const QgsExpressionContext &context = QgsExpressionContext() ) const = 0;

Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsrelationmanager.sip
Expand Up @@ -11,7 +11,7 @@ class QgsRelationManager : QObject
/** Constructor for QgsRelationManager.
* @param project associated project (used to notify project of changes)
*/
explicit QgsRelationManager( QgsProject *project = nullptr );
explicit QgsRelationManager( QgsProject *project = 0 );

/**
* Will set the specified relations and remove any relation currently set.
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgssnappingconfig.sip
Expand Up @@ -87,7 +87,7 @@ class QgsSnappingConfig
/**
* Constructor with default parameters defined in global settings
*/
explicit QgsSnappingConfig( QgsProject *project = nullptr );
explicit QgsSnappingConfig( QgsProject *project = 0 );

~QgsSnappingConfig();

Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsstringutils.sip
Expand Up @@ -185,5 +185,5 @@ class QgsStringUtils
* @returns string with inserted links
* @note added in QGIS 3.0
*/
static QString insertLinks( const QString &string, bool *foundLinks = nullptr );
static QString insertLinks( const QString &string, bool *foundLinks = 0 );
};
2 changes: 1 addition & 1 deletion python/core/qgstaskmanager.sip
Expand Up @@ -235,7 +235,7 @@ class QgsTaskManager : QObject
/** Constructor for QgsTaskManager.
* @param parent parent QObject
*/
QgsTaskManager( QObject *parent /TransferThis/ = nullptr );
QgsTaskManager( QObject *parent /TransferThis/ = 0 );

virtual ~QgsTaskManager();

Expand Down
2 changes: 1 addition & 1 deletion python/core/qgstracer.sip
Expand Up @@ -62,7 +62,7 @@ class QgsTracer : QObject
//! Given two points, find the shortest path and return points on the way.
//! The optional "error" argument may receive error code (PathError enum) if it is not null
//! @return array of points - trace of linestrings of other features (empty array one error)
QVector<QgsPoint> findShortestPath( const QgsPoint &p1, const QgsPoint &p2, QgsTracer::PathError *error /Out/ = nullptr );
QVector<QgsPoint> findShortestPath( const QgsPoint &p1, const QgsPoint &p2, QgsTracer::PathError *error /Out/ = 0 );

//! Find out whether the point is snapped to a vertex or edge (i.e. it can be used for tracing start/stop)
bool isPointSnapped( const QgsPoint &pt );
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgstrackedvectorlayertools.sip
Expand Up @@ -25,7 +25,7 @@ class QgsTrackedVectorLayerTools : QgsVectorLayerTools
bool startEditing( QgsVectorLayer *layer ) const ;
bool stopEditing( QgsVectorLayer *layer, bool allowCancel ) const ;
bool saveEdits( QgsVectorLayer *layer ) const ;
bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request, double dx = 0, double dy = 0, QString *errorMsg = nullptr ) const;
bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request, double dx = 0, double dy = 0, QString *errorMsg = 0 ) const;

/**
* Set the vector layer tools that will be used to interact with the data
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsvectordataprovider.sip
Expand Up @@ -171,7 +171,7 @@ class QgsVectorDataProvider : QgsDataProvider, QgsFeatureSink
* @returns list of unique strings containing substring
*/
virtual QStringList uniqueStringsMatching( int index, const QString& substring, int limit = -1,
QgsFeedback *feedback = nullptr ) const;
QgsFeedback *feedback = 0 ) const;

/** Calculates an aggregated value from the layer's features. The base implementation does nothing,
* but subclasses can override this method to handoff calculation of aggregates to the provider.
Expand Down
10 changes: 5 additions & 5 deletions python/core/qgsvectorfilewriter.sip
Expand Up @@ -210,7 +210,7 @@ class QgsVectorFileWriter : QgsFeatureSink
bool forceMulti = false,
bool includeZ = false,
const QgsAttributeList& attributes = QgsAttributeList(),
FieldValueConverter* fieldValueConverter = nullptr
FieldValueConverter* fieldValueConverter = 0
);

/** Writes a layer out to a vector file.
Expand Down Expand Up @@ -255,7 +255,7 @@ class QgsVectorFileWriter : QgsFeatureSink
bool forceMulti = false,
bool includeZ = false,
const QgsAttributeList& attributes = QgsAttributeList(),
FieldValueConverter* fieldValueConverter = nullptr
FieldValueConverter* fieldValueConverter = 0
);


Expand Down Expand Up @@ -339,8 +339,8 @@ class QgsVectorFileWriter : QgsFeatureSink
static WriterError writeAsVectorFormat( QgsVectorLayer* layer,
const QString& fileName,
const SaveVectorOptions& options,
QString *newFilename = nullptr,
QString *errorMessage = nullptr );
QString *newFilename = 0,
QString *errorMessage = 0 );

/** Create a new vector file writer */
QgsVectorFileWriter( const QString& vectorFileName,
Expand All @@ -351,7 +351,7 @@ class QgsVectorFileWriter : QgsFeatureSink
const QString& driverName = "ESRI Shapefile",
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList(),
QString *newFilename = nullptr,
QString *newFilename = 0,
SymbologyExport symbologyExport = NoSymbology
);

Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsvectorlayereditutils.sip
Expand Up @@ -72,7 +72,7 @@ class QgsVectorLayerEditUtils
* @note available in python bindings as addCurvedRing
*/
// TODO QGIS 3.0 returns an enum instead of a magic constant
int addRing( QgsCurve *ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = nullptr ) /PyName=addCurvedRing/;
int addRing( QgsCurve *ring, const QgsFeatureIds &targetFeatureIds = QgsFeatureIds(), QgsFeatureId *modifiedFeatureId = 0 ) /PyName=addCurvedRing/;

/** Adds a new part polygon to a multipart feature
* @return
Expand Down
10 changes: 5 additions & 5 deletions python/core/qgsvectorlayerimport.sip
Expand Up @@ -50,10 +50,10 @@ class QProgressDialog;
const QString& providerKey,
const QgsCoordinateReferenceSystem& destCRS,
bool onlySelected = false,
QString *errorMessage /Out/ = nullptr,
QString *errorMessage /Out/ = 0,
bool skipAttributeCreation = false,
QMap<QString, QVariant> *options = nullptr,
QProgressDialog *progress = nullptr
QMap<QString, QVariant> *options = 0,
QProgressDialog *progress = 0
);

/** Constructor for QgsVectorLayerImport.
Expand All @@ -73,8 +73,8 @@ class QProgressDialog;
QgsWkbTypes::Type geometryType,
const QgsCoordinateReferenceSystem& crs,
bool overwrite = false,
const QMap<QString, QVariant> *options = nullptr,
QProgressDialog *progress = nullptr
const QMap<QString, QVariant> *options = 0,
QProgressDialog *progress = 0
);

/** Checks whether there were any errors */
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsvectorlayertools.sip
Expand Up @@ -60,5 +60,5 @@ class QgsVectorLayerTools : QObject
*
* TODO QGIS 3: remove const qualifier
*/
virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request /In,Out/, double dx = 0, double dy = 0, QString *errorMsg /Out/ = nullptr ) const;
virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request /In,Out/, double dx = 0, double dy = 0, QString *errorMsg /Out/ = 0 ) const;
};
2 changes: 1 addition & 1 deletion python/core/qgsvectorlayerutils.sip
Expand Up @@ -46,6 +46,6 @@ class QgsVectorLayerUtils
static QgsFeature createFeature( QgsVectorLayer* layer,
const QgsGeometry& geometry = QgsGeometry(),
const QgsAttributeMap& attributes = QgsAttributeMap(),
QgsExpressionContext *context = nullptr );
QgsExpressionContext *context = 0 );

};
2 changes: 1 addition & 1 deletion python/core/raster/qgsbrightnesscontrastfilter.sip
Expand Up @@ -15,7 +15,7 @@ class QgsBrightnessContrastFilter : QgsRasterInterface

bool setInput( QgsRasterInterface *input );

QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = nullptr ) /Factory/;
QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback = 0 ) /Factory/;

void setBrightness( int brightness );
int brightness() const;
Expand Down

0 comments on commit 7d45914

Please sign in to comment.