Skip to content

Commit 78a1ae2

Browse files
author
jef
committed
replace our QGISDEPRECATED with Qt's Q_DECL_DEPRECATED
git-svn-id: http://svn.osgeo.org/qgis/trunk@15435 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c034d19 commit 78a1ae2

16 files changed

+37
-50
lines changed

src/core/qgsapplication.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ class CORE_EXPORT QgsApplication: public QApplication
116116
static const QStringList svgPaths();
117117

118118
//! Returns the paths to svg applications svg directory.
119-
//! @deprecated since 1.4
120-
QGISDEPRECATED static const QString svgPath();
119+
//! @deprecated since 1.4 - use svgPaths()
120+
Q_DECL_DEPRECATED static const QString svgPath();
121121

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

src/core/qgscoordinatereferencesystem.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
119119
* @return bool TRUE if success else false
120120
* @deprecated use createFromOgcWmsCrs()
121121
*/
122-
QGISDEPRECATED bool createFromEpsg( const long theEpsg );
122+
Q_DECL_DEPRECATED bool createFromEpsg( const long theEpsg );
123123

124124
/*! Set up this srs by fetching the appropriate information from the
125125
* sqlite backend. If the srsid is < 100000, only the system srs.db
@@ -263,7 +263,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
263263
* @return long theEpsg the EPSG identifier for this srs (defaults to 0)
264264
* @deprecated there are other authorities - use authid()
265265
*/
266-
QGISDEPRECATED long epsg() const;
266+
Q_DECL_DEPRECATED long epsg() const;
267267

268268
/*! Get the authority identifier for this srs
269269
* @return QString the Authority identifier for this srs

src/core/qgsdistancearea.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class CORE_EXPORT QgsDistanceArea
5151
void setSourceCrs( long srsid );
5252

5353
//! sets source spatial reference system (by EpsgCrsId)
54-
QGISDEPRECATED void setSourceEpsgCrsId( long epsgId );
54+
Q_DECL_DEPRECATED void setSourceEpsgCrsId( long epsgId );
5555

5656
//! sets source spatial reference system by authid
5757
void setSourceAuthId( QString authid );

src/core/qgslabel.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ class CORE_EXPORT QgsLabel
103103
* \param rasterScaleFactor raster scale
104104
* \deprecated
105105
*/
106-
QGISDEPRECATED void renderLabel( QPainter* painter, const QgsRectangle& viewExtent,
107-
QgsCoordinateTransform* coordinateTransform,
108-
const QgsMapToPixel *transform,
109-
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0,
110-
double sizeScale = 1., double rasterScaleFactor = 1.0 )
106+
Q_DECL_DEPRECATED void renderLabel( QPainter* painter, const QgsRectangle& viewExtent,
107+
QgsCoordinateTransform* coordinateTransform,
108+
const QgsMapToPixel *transform,
109+
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0,
110+
double sizeScale = 1., double rasterScaleFactor = 1.0 )
111111
{
112112
QgsRenderContext r;
113113
r.setExtent( viewExtent );
@@ -148,7 +148,7 @@ class CORE_EXPORT QgsLabel
148148
/** Pointer to default attributes.
149149
* @deprecated in version 2 as it is badly named. Rather use attributes.
150150
* @see labelAttributes method rather */
151-
QGISDEPRECATED QgsLabelAttributes *layerAttributes( void );
151+
Q_DECL_DEPRECATED QgsLabelAttributes *layerAttributes( void );
152152

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

src/core/qgsmaplayer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
7676
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
7777
* @deprecated use id()
7878
**/
79-
QGISDEPRECATED QString getLayerID() const { return id(); }
79+
Q_DECL_DEPRECATED QString getLayerID() const { return id(); }
8080

8181
/** Set the display name of the layer
8282
* @param name New name for the layer
@@ -224,7 +224,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
224224
and will be deprecated in 2.0
225225
@deprecated use crs()
226226
*/
227-
QGISDEPRECATED const QgsCoordinateReferenceSystem& srs();
227+
Q_DECL_DEPRECATED const QgsCoordinateReferenceSystem& srs();
228228

229229
/** Sets layer's spatial reference system
230230
@note emitSignal added in 1.4 */

src/core/qgsmaprenderer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class CORE_EXPORT QgsMapRenderer : public QObject
135135

136136
//! Return the measuring object
137137
//! @deprecated
138-
QGISDEPRECATED QgsDistanceArea *distanceArea() { return mDistArea; }
138+
Q_DECL_DEPRECATED QgsDistanceArea *distanceArea() { return mDistArea; }
139139
QGis::UnitType mapUnits() const;
140140
void setMapUnits( QGis::UnitType u );
141141

src/core/qgsoverlayobject.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ class CORE_EXPORT QgsOverlayObject
4343
/**Returns the feature geometry in geos format. The calling function does _not_ take
4444
ownership of the generated object. The geometry is in map coordinates
4545
@deprecated Please use geometry() and QgsGeometry::asGeos instead*/
46-
QGISDEPRECATED GEOSGeometry* getGeosGeometry();
46+
Q_DECL_DEPRECATED GEOSGeometry* getGeosGeometry();
4747
/**Feature geometry is released when object is destructed so this function is empty.
4848
* @deprecated nop
4949
*/
50-
QGISDEPRECATED void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
50+
Q_DECL_DEPRECATED void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
5151

5252
//getters
5353
int width() const {return mWidth;}

src/core/qgsrasterdataprovider.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider
458458
static QString makeTableCells( QStringList const & values );
459459

460460
/** \brief Set null value in char */
461-
QByteArray noValueBytes(int theBandNo);
461+
QByteArray noValueBytes( int theBandNo );
462462

463463
protected:
464464
/**Dots per intch. Extended WMS (e.g. QGIS mapserver) support DPI dependent output and therefore

src/core/qgssearchtreenode.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class CORE_EXPORT QgsSearchTreeNode
161161
bool checkAgainst( const QgsFieldMap& fields, QgsFeature &f );
162162

163163
//! @deprecated
164-
QGISDEPRECATED bool checkAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
164+
Q_DECL_DEPRECATED bool checkAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
165165

166166
//! checks if there were errors during evaluation
167167
bool hasError() { return ( !mError.isEmpty() ); }
@@ -177,11 +177,11 @@ class CORE_EXPORT QgsSearchTreeNode
177177
QgsFeature &f );
178178

179179
//! @deprecated
180-
QGISDEPRECATED bool getValue( QgsSearchTreeValue& value,
181-
QgsSearchTreeNode* node,
182-
const QgsFieldMap &fields,
183-
const QgsAttributeMap &attributes,
184-
QgsGeometry* geom = 0 );
180+
Q_DECL_DEPRECATED bool getValue( QgsSearchTreeValue& value,
181+
QgsSearchTreeNode* node,
182+
const QgsFieldMap &fields,
183+
const QgsAttributeMap &attributes,
184+
QgsGeometry* geom = 0 );
185185

186186
//! return a list of referenced columns in the tree
187187
//! @note added in 1.5
@@ -217,7 +217,7 @@ class CORE_EXPORT QgsSearchTreeNode
217217
QgsSearchTreeValue valueAgainst( const QgsFieldMap& fields, QgsFeature &f );
218218

219219
//! @deprecated
220-
QGISDEPRECATED QgsSearchTreeValue valueAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
220+
Q_DECL_DEPRECATED QgsSearchTreeValue valueAgainst( const QgsFieldMap& fields, const QgsAttributeMap& attributes, QgsGeometry* geom = 0 );
221221

222222
//! strips mText when node is of string type
223223
void stripText();

src/core/qgsvectordataprovider.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
237237
* @return true in case of success and false in case of failure
238238
* @deprecated
239239
*/
240-
QGISDEPRECATED virtual bool addAttributes( const QMap<QString, QString> &attributes );
240+
Q_DECL_DEPRECATED virtual bool addAttributes( const QMap<QString, QString> &attributes );
241241

242242
/**
243243
* Deletes existing attributes
@@ -347,7 +347,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
347347
* Returns the names of the supported types
348348
* @deprecated use nativeTypes()
349349
*/
350-
QGISDEPRECATED const QMap<QString, QVariant::Type> &supportedNativeTypes() const;
350+
Q_DECL_DEPRECATED const QMap<QString, QVariant::Type> &supportedNativeTypes() const;
351351

352352
/** Returns true if the provider is strict about the type of inserted features
353353
(e.g. no multipolygon in a polygon layer)

src/core/qgsvectorfilewriter.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ class CORE_EXPORT QgsVectorFileWriter
5858

5959
/** Write contents of vector layer to a shapefile
6060
@deprecated Use writeAsVectorFormat instead*/
61-
QGISDEPRECATED static WriterError writeAsShapefile( QgsVectorLayer* layer,
61+
Q_DECL_DEPRECATED static WriterError writeAsShapefile( QgsVectorLayer* layer,
6262
const QString& shapefileName,
6363
const QString& fileEncoding,
6464
const QgsCoordinateReferenceSystem *destCRS,
6565
bool onlySelected = false,
6666
QString *errorMessage = 0,
6767
const QStringList &datasourceOptions = QStringList(), // added in 1.6
6868
const QStringList &layerOptions = QStringList() // added in 1.6
69-
);
69+
);
7070

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

src/core/qgsvectorlayer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
499499
/** add an attribute field (but does not commit it)
500500
returns true if the field was added
501501
@deprecated */
502-
QGISDEPRECATED bool addAttribute( QString name, QString type );
502+
Q_DECL_DEPRECATED bool addAttribute( QString name, QString type );
503503

504504
/**Sets an alias (a display name) for attributes to display in dialogs
505505
@note added in version 1.2*/

src/gui/qgisinterface.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class GUI_EXPORT QgisInterface : public QObject
154154
\deprecated use QgsLegendInterface::refreshLayerSymbology
155155
*/
156156
#ifndef Q_MOC_RUN
157-
QGISDEPRECATED
157+
Q_DECL_DEPRECATED
158158
#endif
159159
virtual void refreshLegend( QgsMapLayer *l ) = 0;
160160

@@ -195,7 +195,7 @@ class GUI_EXPORT QgisInterface : public QObject
195195
* url to the QGIS documentation directory path (prefix/share/doc)
196196
*/
197197
#ifndef Q_MOC_RUN
198-
QGISDEPRECATED
198+
Q_DECL_DEPRECATED
199199
#endif
200200
virtual void openURL( QString url, bool useQgisDocDirectory = true ) = 0;
201201

src/gui/qgsgenericprojectionselector.h

+3-13
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,14 @@ class GUI_EXPORT QgsGenericProjectionSelector : public QDialog, private Ui::QgsG
6464
long selectedCrsId();
6565
QString selectedAuthId();
6666

67-
#ifndef Q_MOC_RUN
68-
QGISDEPRECATED
69-
#endif
70-
QString selectedProj4String();
71-
72-
#ifndef Q_MOC_RUN
73-
QGISDEPRECATED
74-
#endif
75-
long selectedEpsg();
67+
Q_DECL_DEPRECATED QString selectedProj4String();
68+
Q_DECL_DEPRECATED long selectedEpsg();
7669

7770
void setSelectedCrsName( QString theName );
7871
void setSelectedCrsId( long theID );
7972
void setSelectedAuthId( QString authId );
8073

81-
#ifndef Q_MOC_RUN
82-
QGISDEPRECATED
83-
#endif
84-
void setSelectedEpsg( long theID );
74+
Q_DECL_DEPRECATED void setSelectedEpsg( long theID );
8575

8676
/**
8777
* \brief filters this dialog by the given CRSs

src/gui/qgsmapcanvas.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
119119

120120
//! Accessor for the canvas pixmap
121121
//! @deprecated use canvasPaintDevice()
122-
QGISDEPRECATED QPixmap& canvasPixmap();
122+
Q_DECL_DEPRECATED QPixmap& canvasPixmap();
123123

124124
//! Accessor for the canvas paint device
125125
QPaintDevice &canvasPaintDevice();

src/gui/qgsprojectionselector.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProjectio
7171

7272
//! Gets the current EpsgCrsId-style projection identifier
7373
// @deprecated there are other authorities - use selectedAuthId()
74-
QGISDEPRECATED long selectedEpsg();
74+
Q_DECL_DEPRECATED long selectedEpsg();
7575

7676
//! Gets the current InternalCrsId-style projection identifier
7777
long selectedSrsid();
@@ -90,10 +90,7 @@ class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProjectio
9090

9191
//! Get the selected coordinate system
9292
// @deprecated there are other authorities - so not always defined
93-
#ifndef Q_MOC_RUN
94-
QGISDEPRECATED
95-
#endif
96-
void setSelectedEpsg( long epsg );
93+
Q_DECL_DEPRECATED void setSelectedEpsg( long epsg );
9794

9895
QString selectedProj4String();
9996

0 commit comments

Comments
 (0)