Skip to content

Commit

Permalink
replace our QGISDEPRECATED with Qt's Q_DECL_DEPRECATED
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15435 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 11, 2011
1 parent c034d19 commit 78a1ae2
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 50 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsapplication.h
Expand Up @@ -116,8 +116,8 @@ class CORE_EXPORT QgsApplication: public QApplication
static const QStringList svgPaths();

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

//! Returns the path to the application prefix directory.
static const QString prefixPath();
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgscoordinatereferencesystem.h
Expand Up @@ -119,7 +119,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* @return bool TRUE if success else false
* @deprecated use createFromOgcWmsCrs()
*/
QGISDEPRECATED bool createFromEpsg( const long theEpsg );
Q_DECL_DEPRECATED bool createFromEpsg( const long theEpsg );

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

/*! Get the authority identifier for this srs
* @return QString the Authority identifier for this srs
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsdistancearea.h
Expand Up @@ -51,7 +51,7 @@ class CORE_EXPORT QgsDistanceArea
void setSourceCrs( long srsid );

//! sets source spatial reference system (by EpsgCrsId)
QGISDEPRECATED void setSourceEpsgCrsId( long epsgId );
Q_DECL_DEPRECATED void setSourceEpsgCrsId( long epsgId );

//! sets source spatial reference system by authid
void setSourceAuthId( QString authid );
Expand Down
12 changes: 6 additions & 6 deletions src/core/qgslabel.h
Expand Up @@ -103,11 +103,11 @@ class CORE_EXPORT QgsLabel
* \param rasterScaleFactor raster scale
* \deprecated
*/
QGISDEPRECATED void renderLabel( QPainter* painter, const QgsRectangle& viewExtent,
QgsCoordinateTransform* coordinateTransform,
const QgsMapToPixel *transform,
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0,
double sizeScale = 1., double rasterScaleFactor = 1.0 )
Q_DECL_DEPRECATED void renderLabel( QPainter* painter, const QgsRectangle& viewExtent,
QgsCoordinateTransform* coordinateTransform,
const QgsMapToPixel *transform,
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0,
double sizeScale = 1., double rasterScaleFactor = 1.0 )
{
QgsRenderContext r;
r.setExtent( viewExtent );
Expand Down Expand Up @@ -148,7 +148,7 @@ class CORE_EXPORT QgsLabel
/** Pointer to default attributes.
* @deprecated in version 2 as it is badly named. Rather use attributes.
* @see labelAttributes method rather */
QGISDEPRECATED QgsLabelAttributes *layerAttributes( void );
Q_DECL_DEPRECATED QgsLabelAttributes *layerAttributes( void );

/** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method.
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsmaplayer.h
Expand Up @@ -76,7 +76,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
* @deprecated use id()
**/
QGISDEPRECATED QString getLayerID() const { return id(); }
Q_DECL_DEPRECATED QString getLayerID() const { return id(); }

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

/** Sets layer's spatial reference system
@note emitSignal added in 1.4 */
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaprenderer.h
Expand Up @@ -135,7 +135,7 @@ class CORE_EXPORT QgsMapRenderer : public QObject

//! Return the measuring object
//! @deprecated
QGISDEPRECATED QgsDistanceArea *distanceArea() { return mDistArea; }
Q_DECL_DEPRECATED QgsDistanceArea *distanceArea() { return mDistArea; }
QGis::UnitType mapUnits() const;
void setMapUnits( QGis::UnitType u );

Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsoverlayobject.h
Expand Up @@ -43,11 +43,11 @@ class CORE_EXPORT QgsOverlayObject
/**Returns the feature geometry in geos format. The calling function does _not_ take
ownership of the generated object. The geometry is in map coordinates
@deprecated Please use geometry() and QgsGeometry::asGeos instead*/
QGISDEPRECATED GEOSGeometry* getGeosGeometry();
Q_DECL_DEPRECATED GEOSGeometry* getGeosGeometry();
/**Feature geometry is released when object is destructed so this function is empty.
* @deprecated nop
*/
QGISDEPRECATED void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }
Q_DECL_DEPRECATED void releaseGeosGeometry( GEOSGeometry *the_geom ) { Q_UNUSED( the_geom ); }

//getters
int width() const {return mWidth;}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrasterdataprovider.h
Expand Up @@ -458,7 +458,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider
static QString makeTableCells( QStringList const & values );

/** \brief Set null value in char */
QByteArray noValueBytes(int theBandNo);
QByteArray noValueBytes( int theBandNo );

protected:
/**Dots per intch. Extended WMS (e.g. QGIS mapserver) support DPI dependent output and therefore
Expand Down
14 changes: 7 additions & 7 deletions src/core/qgssearchtreenode.h
Expand Up @@ -161,7 +161,7 @@ class CORE_EXPORT QgsSearchTreeNode
bool checkAgainst( const QgsFieldMap& fields, QgsFeature &f );

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

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

//! @deprecated
QGISDEPRECATED bool getValue( QgsSearchTreeValue& value,
QgsSearchTreeNode* node,
const QgsFieldMap &fields,
const QgsAttributeMap &attributes,
QgsGeometry* geom = 0 );
Q_DECL_DEPRECATED bool getValue( QgsSearchTreeValue& value,
QgsSearchTreeNode* node,
const QgsFieldMap &fields,
const QgsAttributeMap &attributes,
QgsGeometry* geom = 0 );

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

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

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

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

/** Returns true if the provider is strict about the type of inserted features
(e.g. no multipolygon in a polygon layer)
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorfilewriter.h
Expand Up @@ -58,15 +58,15 @@ class CORE_EXPORT QgsVectorFileWriter

/** Write contents of vector layer to a shapefile
@deprecated Use writeAsVectorFormat instead*/
QGISDEPRECATED static WriterError writeAsShapefile( QgsVectorLayer* layer,
Q_DECL_DEPRECATED static WriterError writeAsShapefile( QgsVectorLayer* layer,
const QString& shapefileName,
const QString& fileEncoding,
const QgsCoordinateReferenceSystem *destCRS,
bool onlySelected = false,
QString *errorMessage = 0,
const QStringList &datasourceOptions = QStringList(), // added in 1.6
const QStringList &layerOptions = QStringList() // added in 1.6
);
);

/** Write contents of vector layer to an (OGR supported) vector formt
@note: this method was added in version 1.5*/
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.h
Expand Up @@ -499,7 +499,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
/** add an attribute field (but does not commit it)
returns true if the field was added
@deprecated */
QGISDEPRECATED bool addAttribute( QString name, QString type );
Q_DECL_DEPRECATED bool addAttribute( QString name, QString type );

/**Sets an alias (a display name) for attributes to display in dialogs
@note added in version 1.2*/
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgisinterface.h
Expand Up @@ -154,7 +154,7 @@ class GUI_EXPORT QgisInterface : public QObject
\deprecated use QgsLegendInterface::refreshLayerSymbology
*/
#ifndef Q_MOC_RUN
QGISDEPRECATED
Q_DECL_DEPRECATED
#endif
virtual void refreshLegend( QgsMapLayer *l ) = 0;

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

Expand Down
16 changes: 3 additions & 13 deletions src/gui/qgsgenericprojectionselector.h
Expand Up @@ -64,24 +64,14 @@ class GUI_EXPORT QgsGenericProjectionSelector : public QDialog, private Ui::QgsG
long selectedCrsId();
QString selectedAuthId();

#ifndef Q_MOC_RUN
QGISDEPRECATED
#endif
QString selectedProj4String();

#ifndef Q_MOC_RUN
QGISDEPRECATED
#endif
long selectedEpsg();
Q_DECL_DEPRECATED QString selectedProj4String();
Q_DECL_DEPRECATED long selectedEpsg();

void setSelectedCrsName( QString theName );
void setSelectedCrsId( long theID );
void setSelectedAuthId( QString authId );

#ifndef Q_MOC_RUN
QGISDEPRECATED
#endif
void setSelectedEpsg( long theID );
Q_DECL_DEPRECATED void setSelectedEpsg( long theID );

/**
* \brief filters this dialog by the given CRSs
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvas.h
Expand Up @@ -119,7 +119,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView

//! Accessor for the canvas pixmap
//! @deprecated use canvasPaintDevice()
QGISDEPRECATED QPixmap& canvasPixmap();
Q_DECL_DEPRECATED QPixmap& canvasPixmap();

//! Accessor for the canvas paint device
QPaintDevice &canvasPaintDevice();
Expand Down
7 changes: 2 additions & 5 deletions src/gui/qgsprojectionselector.h
Expand Up @@ -71,7 +71,7 @@ class GUI_EXPORT QgsProjectionSelector: public QWidget, private Ui::QgsProjectio

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

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

//! Get the selected coordinate system
// @deprecated there are other authorities - so not always defined
#ifndef Q_MOC_RUN
QGISDEPRECATED
#endif
void setSelectedEpsg( long epsg );
Q_DECL_DEPRECATED void setSelectedEpsg( long epsg );

QString selectedProj4String();

Expand Down

0 comments on commit 78a1ae2

Please sign in to comment.