Skip to content

Commit

Permalink
add 'deprecated' annotation to SIP bindings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15209 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Feb 19, 2011
1 parent 4d0aaf0 commit 932176e
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 17 deletions.
4 changes: 2 additions & 2 deletions python/core/qgsapplication.sip
Expand Up @@ -159,8 +159,8 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
static const QStringList svgPaths();

//! Returns the path to the applications svg paths
//! @deprecated
static const QString svgPath();
//! @deprecated use svgPaths()
static const QString svgPath() /Deprecated/;

//! Returns the path to the application prefix directory.
static const QString prefixPath();
Expand Down
4 changes: 2 additions & 2 deletions python/core/qgslabel.sip
Expand Up @@ -54,7 +54,7 @@ public:
void renderLabel ( QPainter* painter, QgsRectangle& viewExtent,
QgsCoordinateTransform* coordinateTransform,
QgsMapToPixel *transform,
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes=0, double sizeScale = 1, double rasterScaleFactor = 1);
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes=0, double sizeScale = 1, double rasterScaleFactor = 1) /Deprecated/;

/** \brief render label
* \param renderContext renderer context
Expand Down Expand Up @@ -85,7 +85,7 @@ public:
/** Pointer to default attributes.
* @deprecated in version 2 badly named. Rather use attributes.
* @see labelAttributes method rather */
QgsLabelAttributes *layerAttributes( );
QgsLabelAttributes *layerAttributes( ) /Deprecated/;

/** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method.
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmaplayer.sip
Expand Up @@ -65,7 +65,7 @@ public:
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
* @deprecated in 1.7
*/
QString getLayerID() const;
QString getLayerID() const /Deprecated/;

/** Set the display name of the layer
* @param name New name for the layer
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmaprenderer.sip
Expand Up @@ -104,7 +104,7 @@ class QgsMapRenderer : QObject
//! Recalculate the map scale
void updateScale();

QgsDistanceArea* distanceArea();
QgsDistanceArea* distanceArea() /Deprecated/;
QGis::UnitType mapUnits() const;
void setMapUnits(QGis::UnitType u);

Expand Down
6 changes: 3 additions & 3 deletions python/core/qgssearchtreenode.sip
Expand Up @@ -105,7 +105,7 @@ class QgsSearchTreeNode
bool checkAgainst( const QMap<int,QgsField>& fields, QgsFeature &f );

//! @deprecated
bool checkAgainst( const QMap<int,QgsField>& fields, const QMap<int, QVariant>& attributes, QgsGeometry* geom = 0 );
bool checkAgainst( const QMap<int,QgsField>& fields, const QMap<int, QVariant>& attributes, QgsGeometry* geom = 0 ) /Deprecated/;

//! checks if there were errors during evaluation
bool hasError();
Expand All @@ -121,7 +121,7 @@ class QgsSearchTreeNode

//! @deprecated
bool getValue( QgsSearchTreeValue& value /Out/, QgsSearchTreeNode* node,
const QMap<int,QgsField>& fields, const QMap<int,QVariant>& attributes, QgsGeometry* geom = 0 );
const QMap<int,QgsField>& fields, const QMap<int,QVariant>& attributes, QgsGeometry* geom = 0 ) /Deprecated/;

//! return a list of referenced columns in the tree
//! @note added in 1.5
Expand Down Expand Up @@ -150,7 +150,7 @@ class QgsSearchTreeNode
QgsSearchTreeValue valueAgainst( const QMap<int,QgsField>& fields, QgsFeature &f );

//! @deprecated
QgsSearchTreeValue valueAgainst( const QMap<int,QgsField>& fields, const QMap<int,QVariant>& attributes, QgsGeometry* geom = 0 );
QgsSearchTreeValue valueAgainst( const QMap<int,QgsField>& fields, const QMap<int,QVariant>& attributes, QgsGeometry* geom = 0 ) /Deprecated/;

//! strips mText when node is of string type
void stripText();
Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsvectordataprovider.sip
Expand Up @@ -198,7 +198,7 @@ class QgsVectorDataProvider : QgsDataProvider
* @return true in case of success and false in case of failure
* @deprecated
*/
virtual bool addAttributes(const QMap<QString, QString> &attributes);
virtual bool addAttributes(const QMap<QString, QString> &attributes) /Deprecated/;

/**
* Deletes existing attributes
Expand Down Expand Up @@ -284,7 +284,7 @@ class QgsVectorDataProvider : QgsDataProvider

/**Returns the names of the numerical types
@deprecated */
const QMap<QString,QVariant::Type> &supportedNativeTypes() const;
const QMap<QString,QVariant::Type> &supportedNativeTypes() const /Deprecated/;

/**
* Set whether provider should return also features that don't have
Expand Down
6 changes: 4 additions & 2 deletions python/core/qgsvectorfilewriter.sip
Expand Up @@ -24,15 +24,17 @@ public:
ErrCreateLayer
};

/** Write contents of vector layer to a shapefile */
/** Write contents of vector layer to a shapefile
@deprecated use writeAsVectorFormat instead
*/
static WriterError writeAsShapefile(QgsVectorLayer* layer,
const QString& shapefileName,
const QString& fileEncoding,
const QgsCoordinateReferenceSystem*,
bool onlySelected = FALSE,
QString *errorMessage = 0,
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() );
const QStringList &layerOptions = QStringList() ) /Deprecated/;

/** Write contents of vector layer to an (OGR supported) vector formt
@note: this method was added in version 1.5*/
Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -396,11 +396,11 @@ public:
returns true in case of success
@deprecated
*/
bool addAttribute( QString name, QString type );
bool addAttribute( QString name, QString type ) /Deprecated/;

/**Sets an alias (a display name) for attributes to display in dialogs
@note added in version 1.2*/
void addAttributeAlias( int attIndex, QString aliasString );
void addAttributeAlias( int attIndex, QString aliasString );

/**Returns the alias of an attribute name or an empty string if there is no alias
@note added in version 1.2*/
Expand Down
5 changes: 3 additions & 2 deletions python/gui/qgisinterface.sip
Expand Up @@ -74,8 +74,9 @@ class QgisInterface : QObject
* @param url URL to open
* @param useQgisDocDirectory If true, the URL will be formed by concatenating
* url to the QGIS documentation directory path (<prefix>/share/doc)
* @deprecated
*/
virtual void openURL(QString url, bool useQgisDocDirectory=true)=0;
virtual void openURL(QString url, bool useQgisDocDirectory=true)=0 /Deprecated/;

/** Return a pointer to the map canvas */
virtual QgsMapCanvas * mapCanvas()=0;
Expand Down Expand Up @@ -110,7 +111,7 @@ class QgisInterface : QObject
/** refresh legend of a layer
\note deprecated - use QgsLegendInterface::refreshLayerSymbology()
*/
virtual void refreshLegend( QgsMapLayer * layer )=0;
virtual void refreshLegend( QgsMapLayer * layer )=0 /Deprecated/;

/** open layer properties
\note added in 1.5
Expand Down

0 comments on commit 932176e

Please sign in to comment.