Skip to content

Commit

Permalink
adapt bindings to sip 4.19 (fixes #16071)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 11, 2017
1 parent 274f61f commit 718581f
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 18 deletions.
1 change: 0 additions & 1 deletion python/analysis/analysis.sip
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
%Module(name=qgis._analysis,
version=0,
keyword_arguments="Optional")

%Import QtCore/QtCoremod.sip
Expand Down
1 change: 0 additions & 1 deletion python/analysis/network/networkanalysis.sip
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
%Module(name=qgis._networkanalysis,
version=0,
keyword_arguments="Optional")

%Import QtCore/QtCoremod.sip
Expand Down
6 changes: 3 additions & 3 deletions python/core/conversions.sip
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ template<TYPE>

// QMap<qint64, TYPE> is implemented as a Python dictionary.
template<TYPE>
%MappedType QMap<qint64, TYPE> /DocType="dict-of-qint64-TYPE"/
%MappedType QMap<qint64, TYPE>
{
%TypeHeaderCode
#include <qmap.h>
Expand Down Expand Up @@ -1873,7 +1873,7 @@ template <TYPE>
};

// QList<QgsField> is implemented as a Python list of QgsField.
%MappedType QList<QgsField> /DocType="list-of-qgsfield"/
%MappedType QList<QgsField>
{
%TypeHeaderCode
#include <qgsfield.h>
Expand Down Expand Up @@ -1978,7 +1978,7 @@ template <TYPE>

%If (QVECTORINT_CONVERSION)
// QVector<int> is implemented as a Python list of integers.
%MappedType QVector<int> /DocType="list-of-int"/
%MappedType QVector<int>
{
%TypeHeaderCode
#include <qvector.h>
Expand Down
1 change: 0 additions & 1 deletion python/core/core.sip
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
%Module(name=qgis._core,
version=0,
keyword_arguments="Optional")

%Feature QT5_SUPPORT
Expand Down
3 changes: 2 additions & 1 deletion python/core/qgscoordinatetransform.sip
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
class QgsCoordinateTransform : QObject
{
%TypeHeaderCode
extern PyObject *sipExportedExceptions__core[2]; // workaround: sipExportedExceptions__core is only defined in the first sip part
#include <qgscoordinatetransform.h>
%End

Expand Down Expand Up @@ -215,5 +216,5 @@ class QgsCoordinateTransform : QObject

signals:
/** Signal when an invalid pj_transform() has occurred */
void invalidTransformInput() const;
void invalidTransformInput() const;
};
2 changes: 1 addition & 1 deletion python/core/qgsfeature.sip
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ typedef QMap<int, QVariant> QgsAttributeMap;
typedef QVector<QVariant> QgsAttributes;

// QgsAttributes is implemented as a Python list of Python objects.
%MappedType QgsAttributes /DocType="list-of-attributes"/
%MappedType QgsAttributes
{
%TypeHeaderCode
#include <qgsfeature.h>
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgspallabeling.sip
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// QMap<QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined*> is implemented as a Python dictionary.
%MappedType QMap<QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined*> /DocType="dict-of-QgsPalLayerSettings.DataDefinedProperties-QgsDataDefined*"/
%MappedType QMap<QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined*>
{
%TypeHeaderCode
#include <qmap.h>
Expand Down
3 changes: 2 additions & 1 deletion python/core/qgsvectorlayerfeatureiterator.sip
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ class QgsVectorLayerFeatureIterator : QgsAbstractFeatureIterator
//void updateFeatureGeometry( QgsFeature& f );

private:
QgsVectorLayerFeatureIterator();
QgsVectorLayerFeatureIterator( const QgsVectorLayerFeatureIterator &rhs );

};
2 changes: 1 addition & 1 deletion python/core/raster/qgsrasterprojector.sip
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class QgsRasterProjector : QgsRasterInterface

int bandCount() const;

int dataType( int bandNo ) const;
QGis::DataType dataType( int bandNo ) const;

/** \brief set source and destination CRS */
void setCRS( const QgsCoordinateReferenceSystem & theSrcCRS, const QgsCoordinateReferenceSystem & theDestCRS,
Expand Down
3 changes: 2 additions & 1 deletion python/gui/editorwidgets/qgsdatetimeedit.sip
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class QgsDateTimeEdit : QDateTimeEdit

protected:
virtual void resizeEvent( QResizeEvent* event );

void mousePressEvent( QMouseEvent*event );
virtual void fixup(QString & input) const;
virtual QValidator::State validate(QString &text, int &pos) const;
};
1 change: 1 addition & 0 deletions python/gui/editorwidgets/qgsdoublespinbox.sip
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ class QgsDoubleSpinBox : QDoubleSpinBox
protected:
virtual void changeEvent( QEvent* event );
virtual void paintEvent( QPaintEvent* event );
virtual void fixup(QString & input) const;
};
2 changes: 1 addition & 1 deletion python/gui/editorwidgets/qgsspinbox.sip
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class QgsSpinBox : QSpinBox
virtual QValidator::State validate( QString & input, int & pos ) const;

protected:

virtual void changeEvent( QEvent* event );
virtual void paintEvent( QPaintEvent* event );
virtual void fixup(QString &input) const;
};
1 change: 0 additions & 1 deletion python/gui/gui.sip
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
%Module(name=qgis._gui,
version=0,
keyword_arguments="Optional")

%Feature HAVE_QSCI_SIP
Expand Down
4 changes: 3 additions & 1 deletion python/gui/qgslonglongvalidator.sip
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class QgsLongLongValidator : QValidator
QgsLongLongValidator( qint64 bottom, qint64 top, QObject *parent );
~QgsLongLongValidator();

QValidator::State validate( QString &input, int& ) const;
virtual QValidator::State validate( QString &input, int& ) const;

void setBottom( qint64 bottom );
void setTop( qint64 top );
Expand All @@ -17,4 +17,6 @@ class QgsLongLongValidator : QValidator

qint64 bottom() const;
qint64 top() const;

virtual void fixup(QString &input) const;
};
2 changes: 1 addition & 1 deletion python/server/qgswmsconfigparser.sip
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class QgsWMSConfigParser
virtual void setScaleDenominator( double denom ) = 0;
virtual void addExternalGMLData( const QString& layerName, QDomDocument* gmlDoc ) = 0;

virtual QList< QPair< QString, QgsLayerCoordinateTransform > > layerCoordinateTransforms() const = 0;
// virtual QList< QPair< QString, QgsLayerCoordinateTransform > > layerCoordinateTransforms() const = 0;

virtual int nLayers() const = 0;

Expand Down
2 changes: 1 addition & 1 deletion python/server/qgswmsprojectparser.sip
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class QgsWMSProjectParser : public QgsWMSConfigParser
void setScaleDenominator( double ) /*override*/;
void addExternalGMLData( const QString&, QDomDocument* ) /*override*/ ;

QList< QPair< QString, QgsLayerCoordinateTransform > > layerCoordinateTransforms() const /*override*/ ;
// QList< QPair< QString, QgsLayerCoordinateTransform > > layerCoordinateTransforms() const /*override*/ ;

/** Fills a layer and a style list. The two list have the same number of entries and the style and the layer at a position belong together (similar to the HTTP parameters 'Layers' and 'Styles'. Returns 0 in case of success*/
int layersAndStyles( QStringList& layers, QStringList& styles ) const /*override*/ ;
Expand Down
1 change: 0 additions & 1 deletion python/server/server.sip
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
%Module(name=qgis._server,
version=0,
keyword_arguments="Optional")


Expand Down

0 comments on commit 718581f

Please sign in to comment.