Skip to content
Permalink
Browse files

Deprecate QgsDataItem API for setting item CRS

This is no longer used by QGIS (it was only ever used by the standalone
browser)

(cherry picked from commit d61694c)
  • Loading branch information
nyalldawson committed Feb 5, 2019
1 parent 0a15809 commit 964c99f0960f76087a137c91a676ec6c1d701cb3
Showing with 11 additions and 3 deletions.
  1. +3 −1 python/core/auto_generated/qgsdataitem.sip.in
  2. +8 −2 src/core/qgsdataitem.h
@@ -205,10 +205,12 @@ Items that return valid URI will be returned in mime data when dragging a select
typedef QFlags<QgsDataItem::Capability> Capabilities;


virtual bool setCrs( const QgsCoordinateReferenceSystem &crs );
virtual bool setCrs( const QgsCoordinateReferenceSystem &crs ) /Deprecated/;
%Docstring
Writes the selected crs into data source. The original data source will be modified when calling this
method.

.. deprecated:: since QGIS 3.6. This method is no longer used by QGIS and will be removed in QGIS 4.0.
%End

virtual bool rename( const QString &name );
@@ -207,7 +207,7 @@ class CORE_EXPORT QgsDataItem : public QObject
enum Capability
{
NoCapabilities = 0,
SetCrs = 1 << 0, //!< Can set CRS on layer or group of layers
SetCrs = 1 << 0, //!< Can set CRS on layer or group of layers. \deprecated in QGIS 3.6 -- no longer used by QGIS and will be removed in QGIS 4.0
Fertile = 1 << 1, //!< Can create children. Even items without this capability may have children, but cannot create them, it means that children are created by item ancestors.
Fast = 1 << 2, //!< CreateChildren() is fast enough to be run in main thread when refreshing items, most root items (wms,wfs,wcs,postgres...) are considered fast because they are reading data only from QgsSettings
Collapse = 1 << 3, //!< The collapse/expand status for this items children should be ignored in order to avoid undesired network connections (wms etc.)
@@ -218,8 +218,14 @@ class CORE_EXPORT QgsDataItem : public QObject
/**
* Writes the selected crs into data source. The original data source will be modified when calling this
* method.
*
* \deprecated since QGIS 3.6. This method is no longer used by QGIS and will be removed in QGIS 4.0.
*/
virtual bool setCrs( const QgsCoordinateReferenceSystem &crs ) { Q_UNUSED( crs ); return false; }
Q_DECL_DEPRECATED virtual bool setCrs( const QgsCoordinateReferenceSystem &crs ) SIP_DEPRECATED
{
Q_UNUSED( crs );
return false;
}

/**
* Sets a new \a name for the item, and returns true if the item was successfully renamed.

0 comments on commit 964c99f

Please sign in to comment.
You can’t perform that action at this time.