Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
adapt bindings to sip 4.19 (fixes #16071)
(cherry picked from commit 718581f)
  • Loading branch information
jef-n committed Feb 12, 2017
1 parent aba58a2 commit 70f51ae
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 17 deletions.
1 change: 0 additions & 1 deletion python/analysis/analysis.sip
@@ -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
@@ -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
Expand Up @@ -745,7 +745,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 @@ -1806,7 +1806,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 @@ -1911,7 +1911,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
@@ -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
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
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
@@ -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
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
Expand Up @@ -54,7 +54,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
Expand Up @@ -33,6 +33,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
Expand Up @@ -58,4 +58,5 @@ class QgsDoubleSpinBox : QDoubleSpinBox
virtual void resizeEvent( QResizeEvent* event );
virtual void changeEvent( QEvent* event );
virtual void paintEvent( QPaintEvent* event );
virtual void fixup(QString & input) const;
};
1 change: 1 addition & 0 deletions python/gui/editorwidgets/qgsspinbox.sip
Expand Up @@ -58,4 +58,5 @@ class QgsSpinBox : QSpinBox
virtual void resizeEvent( QResizeEvent* event );
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
@@ -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
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
Expand Up @@ -109,7 +109,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
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
@@ -1,5 +1,4 @@
%Module(name=qgis._server,
version=0,
keyword_arguments="Optional")


Expand Down

0 comments on commit 70f51ae

Please sign in to comment.