Skip to content

Commit ce8e3d5

Browse files
author
jef
committed
add 'deprecated' annotation to SIP bindings
git-svn-id: http://svn.osgeo.org/qgis/trunk@15209 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5682341 commit ce8e3d5

9 files changed

+20
-17
lines changed

python/core/qgsapplication.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
159159
static const QStringList svgPaths();
160160

161161
//! Returns the path to the applications svg paths
162-
//! @deprecated
163-
static const QString svgPath();
162+
//! @deprecated use svgPaths()
163+
static const QString svgPath() /Deprecated/;
164164

165165
//! Returns the path to the application prefix directory.
166166
static const QString prefixPath();

python/core/qgslabel.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public:
5454
void renderLabel ( QPainter* painter, QgsRectangle& viewExtent,
5555
QgsCoordinateTransform* coordinateTransform,
5656
QgsMapToPixel *transform,
57-
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes=0, double sizeScale = 1, double rasterScaleFactor = 1);
57+
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes=0, double sizeScale = 1, double rasterScaleFactor = 1) /Deprecated/;
5858

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

9090
/** Pointer to default attributes.
9191
* @note this replaces the to-be-deprecated layerAttributes method.

python/core/qgsmaplayer.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public:
6565
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
6666
* @deprecated in 1.7
6767
*/
68-
QString getLayerID() const;
68+
QString getLayerID() const /Deprecated/;
6969

7070
/** Set the display name of the layer
7171
* @param name New name for the layer

python/core/qgsmaprenderer.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class QgsMapRenderer : QObject
104104
//! Recalculate the map scale
105105
void updateScale();
106106

107-
QgsDistanceArea* distanceArea();
107+
QgsDistanceArea* distanceArea() /Deprecated/;
108108
QGis::UnitType mapUnits() const;
109109
void setMapUnits(QGis::UnitType u);
110110

python/core/qgssearchtreenode.sip

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class QgsSearchTreeNode
105105
bool checkAgainst( const QMap<int,QgsField>& fields, QgsFeature &f );
106106

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

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

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

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

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

155155
//! strips mText when node is of string type
156156
void stripText();

python/core/qgsvectordataprovider.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class QgsVectorDataProvider : QgsDataProvider
198198
* @return true in case of success and false in case of failure
199199
* @deprecated
200200
*/
201-
virtual bool addAttributes(const QMap<QString, QString> &attributes);
201+
virtual bool addAttributes(const QMap<QString, QString> &attributes) /Deprecated/;
202202

203203
/**
204204
* Deletes existing attributes
@@ -284,7 +284,7 @@ class QgsVectorDataProvider : QgsDataProvider
284284

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

289289
/**
290290
* Set whether provider should return also features that don't have

python/core/qgsvectorfilewriter.sip

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ public:
2424
ErrCreateLayer
2525
};
2626

27-
/** Write contents of vector layer to a shapefile */
27+
/** Write contents of vector layer to a shapefile
28+
@deprecated use writeAsVectorFormat instead
29+
*/
2830
static WriterError writeAsShapefile(QgsVectorLayer* layer,
2931
const QString& shapefileName,
3032
const QString& fileEncoding,
3133
const QgsCoordinateReferenceSystem*,
3234
bool onlySelected = FALSE,
3335
QString *errorMessage = 0,
3436
const QStringList &datasourceOptions = QStringList(),
35-
const QStringList &layerOptions = QStringList() );
37+
const QStringList &layerOptions = QStringList() ) /Deprecated/;
3638

3739
/** Write contents of vector layer to an (OGR supported) vector formt
3840
@note: this method was added in version 1.5*/

python/core/qgsvectorlayer.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,11 @@ public:
396396
returns true in case of success
397397
@deprecated
398398
*/
399-
bool addAttribute( QString name, QString type );
399+
bool addAttribute( QString name, QString type ) /Deprecated/;
400400

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

405405
/**Returns the alias of an attribute name or an empty string if there is no alias
406406
@note added in version 1.2*/

python/gui/qgisinterface.sip

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ class QgisInterface : QObject
7474
* @param url URL to open
7575
* @param useQgisDocDirectory If true, the URL will be formed by concatenating
7676
* url to the QGIS documentation directory path (<prefix>/share/doc)
77+
* @deprecated
7778
*/
78-
virtual void openURL(QString url, bool useQgisDocDirectory=true)=0;
79+
virtual void openURL(QString url, bool useQgisDocDirectory=true)=0 /Deprecated/;
7980

8081
/** Return a pointer to the map canvas */
8182
virtual QgsMapCanvas * mapCanvas()=0;
@@ -110,7 +111,7 @@ class QgisInterface : QObject
110111
/** refresh legend of a layer
111112
\note deprecated - use QgsLegendInterface::refreshLayerSymbology()
112113
*/
113-
virtual void refreshLegend( QgsMapLayer * layer )=0;
114+
virtual void refreshLegend( QgsMapLayer * layer )=0 /Deprecated/;
114115

115116
/** open layer properties
116117
\note added in 1.5

0 commit comments

Comments
 (0)