Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move QGIS 3 todos to QGIS 4
  • Loading branch information
m-kuhn committed Feb 7, 2019
1 parent 6c1036c commit 90f7989
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 43 deletions.
14 changes: 7 additions & 7 deletions python/core/auto_generated/qgscoordinatereferencesystem.sip.in
Expand Up @@ -191,7 +191,7 @@ If no prefix is specified, WKT definition is assumed.
:param definition: A String containing a coordinate reference system definition.

.. seealso:: :py:func:`createFromString`
/ // TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
/ // TODO QGIS 4: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
%End

explicit QgsCoordinateReferenceSystem( long id, CrsType type = PostgisCrsId );
Expand All @@ -205,7 +205,7 @@ Constructor a CRS object using a PostGIS SRID, an EPSG code or an internal QGIS

:param id: The ID valid for the chosen CRS ID type
:param type: One of the types described in CrsType
/ // TODO QGIS 3: remove type and always use EPSG code
/ // TODO QGIS 4: remove type and always use EPSG code
%End

QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem &srs );
Expand Down Expand Up @@ -304,7 +304,7 @@ Sets this CRS by lookup of the given ID in the CRS database.

We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code
wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
/ // TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg
/ // TODO QGIS 4: remove type and always use EPSG code, rename to createFromEpsg
%End

bool createFromOgcWmsCrs( const QString &crs );
Expand All @@ -322,7 +322,7 @@ and refer to QGIS internal CRS IDs.
this method uses an internal cache. Call invalidateCache() to clear the cache.

.. seealso:: :py:func:`fromOgcWmsCrs`
/ // TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
/ // TODO QGIS 4: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
%End

bool createFromSrid( long srid );
Expand All @@ -332,7 +332,7 @@ Sets this CRS by lookup of the given PostGIS SRID in the CRS database.
:param srid: The PostGIS SRID for the desired spatial reference system.

:return: True on success else false
/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
/ // TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
%End

bool createFromWkt( const QString &wkt );
Expand Down Expand Up @@ -500,7 +500,7 @@ pieces of information about CRS.
The ellipsoid and projection acronyms must be set as well as the proj4string!

:return: long the SrsId of the matched CRS, zero if no match was found
/ // TODO QGIS 3: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
/ // TODO QGIS 4: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
%End

bool operator==( const QgsCoordinateReferenceSystem &srs ) const;
Expand Down Expand Up @@ -543,7 +543,7 @@ Returns the internal CRS ID, if available.
Returns PostGIS SRID for the CRS.

:return: the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0)
/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
/ // TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
%End

QString authid() const;
Expand Down
10 changes: 5 additions & 5 deletions python/core/auto_generated/qgsvectorlayertools.sip.in
Expand Up @@ -38,7 +38,7 @@ This method should/will be called, whenever a new feature will be added to the l
:return: - True in case of success, False if the operation failed/was aborted
- feature: Updated feature after adding will be written back to this

TODO QGIS 3: remove const qualifier
TODO QGIS 4: remove const qualifier
%End

virtual bool startEditing( QgsVectorLayer *layer ) const = 0;
Expand All @@ -51,7 +51,7 @@ If successful layer->startEditing() will be called and true returned.

:return: True, if the editing session was started

TODO QGIS 3: remove const qualifier
TODO QGIS 4: remove const qualifier
%End

virtual bool stopEditing( QgsVectorLayer *layer, bool allowCancel = true ) const = 0;
Expand All @@ -64,7 +64,7 @@ Appropriate dialogs should be shown like

:return: True if successful

TODO QGIS 3: remove const qualifier
TODO QGIS 4: remove const qualifier
%End

virtual bool saveEdits( QgsVectorLayer *layer ) const = 0;
Expand All @@ -75,7 +75,7 @@ Should be called, when the features should be committed but the editing session

:return: True if successful

TODO QGIS 3: remove const qualifier
TODO QGIS 4: remove const qualifier
%End

virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request /In,Out/, double dx = 0, double dy = 0, QString *errorMsg /Out/ = 0 ) const;
Expand All @@ -90,7 +90,7 @@ Copy and move features with defined translation.
:return: - True if all features could be copied.
- errorMsg: If given, it will contain the error message

TODO QGIS 3: remove const qualifier
TODO QGIS 4: remove const qualifier
%End

};
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometry.h
Expand Up @@ -585,7 +585,7 @@ class CORE_EXPORT QgsGeometry
* \param sqrDist will be set to the square distance between the closest vertex and the specified point
* \returns closest point in geometry. If not found (empty geometry), returns null point nad sqrDist is negative.
*/
//TODO QGIS 3.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
//TODO QGIS 4.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
QgsPointXY closestVertex( const QgsPointXY &point, int &atVertex SIP_OUT, int &beforeVertex SIP_OUT, int &afterVertex SIP_OUT, double &sqrDist SIP_OUT ) const;

/**
Expand Down
14 changes: 7 additions & 7 deletions src/core/qgscoordinatereferencesystem.h
Expand Up @@ -223,7 +223,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* If no prefix is specified, WKT definition is assumed.
* \param definition A String containing a coordinate reference system definition.
* \see createFromString()
*/ // TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
*/ // TODO QGIS 4: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
explicit QgsCoordinateReferenceSystem( const QString &definition );

/**
Expand All @@ -232,7 +232,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
* \param id The ID valid for the chosen CRS ID type
* \param type One of the types described in CrsType
*/ // TODO QGIS 3: remove type and always use EPSG code
*/ // TODO QGIS 4: remove type and always use EPSG code
explicit QgsCoordinateReferenceSystem( long id, CrsType type = PostgisCrsId );

//! Copy constructor
Expand Down Expand Up @@ -310,7 +310,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* \returns True on success else false
* \note We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code
* wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
*/ // TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg
*/ // TODO QGIS 4: remove type and always use EPSG code, rename to createFromEpsg
bool createFromId( long id, CrsType type = PostgisCrsId );

/**
Expand All @@ -322,14 +322,14 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* \returns True on success else false
* \note this method uses an internal cache. Call invalidateCache() to clear the cache.
* \see fromOgcWmsCrs()
*/ // TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
*/ // TODO QGIS 4: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
bool createFromOgcWmsCrs( const QString &crs );

/**
* Sets this CRS by lookup of the given PostGIS SRID in the CRS database.
* \param srid The PostGIS SRID for the desired spatial reference system.
* \returns True on success else false
*/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
*/ // TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
bool createFromSrid( long srid );

/**
Expand Down Expand Up @@ -450,7 +450,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* pieces of information about CRS.
* \note The ellipsoid and projection acronyms must be set as well as the proj4string!
* \returns long the SrsId of the matched CRS, zero if no match was found
*/ // TODO QGIS 3: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
*/ // TODO QGIS 4: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
long findMatchingProj();

/**
Expand Down Expand Up @@ -507,7 +507,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
/**
* Returns PostGIS SRID for the CRS.
* \returns the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0)
*/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
*/ // TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
long postgisSrid() const;

/**
Expand Down
10 changes: 5 additions & 5 deletions src/core/qgspallabeling.h
Expand Up @@ -132,7 +132,7 @@ class CORE_EXPORT QgsPalLayerSettings
/**
* Placement modes which determine how label candidates are generated for a feature.
*/
//TODO QGIS 3.0 - move to QgsLabelingEngine
//TODO QGIS 4.0 - move to QgsLabelingEngine
enum Placement
{
AroundPoint, //!< Arranges candidates in a circle around a point (or centroid of a polygon). Applies to point or polygon layers only.
Expand All @@ -146,7 +146,7 @@ class CORE_EXPORT QgsPalLayerSettings
};

//! Positions for labels when using the QgsPalLabeling::OrderedPositionsAroundPoint placement mode
//TODO QGIS 3.0 - move to QgsLabelingEngine
//TODO QGIS 4.0 - move to QgsLabelingEngine
enum PredefinedPointPosition
{
TopLeft, //!< Label on top-left of point
Expand All @@ -167,7 +167,7 @@ class CORE_EXPORT QgsPalLayerSettings
* Behavior modifier for label offset and distance, only applies in some
* label placement modes.
*/
//TODO QGIS 3.0 - move to QgsLabelingEngine
//TODO QGIS 4.0 - move to QgsLabelingEngine
enum OffsetType
{
FromPoint, //!< Offset distance applies from point geometry
Expand All @@ -177,7 +177,7 @@ class CORE_EXPORT QgsPalLayerSettings
/**
* Line placement flags, which control how candidates are generated for a linear feature.
*/
//TODO QGIS 3.0 - move to QgsLabelingEngine, rename to LinePlacementFlag, use Q_DECLARE_FLAGS to make
//TODO QGIS 4.0 - move to QgsLabelingEngine, rename to LinePlacementFlag, use Q_DECLARE_FLAGS to make
//LinePlacementFlags type, and replace use of pal::LineArrangementFlag
enum LinePlacementFlags
{
Expand Down Expand Up @@ -233,7 +233,7 @@ class CORE_EXPORT QgsPalLayerSettings
* Valid obstacle types, which affect how features within the layer will act as obstacles
* for labels.
*/
//TODO QGIS 3.0 - Move to QgsLabelingEngine
//TODO QGIS 4.0 - Move to QgsLabelingEngine
enum ObstacleType
{
PolygonInterior, /*!< avoid placing labels over interior of polygon (prefer placing labels totally
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsproject.h
Expand Up @@ -859,7 +859,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
* \see removeMapLayer()
* \see removeAllMapLayers()
*/
//TODO QGIS 3.0 - add PyName alias to avoid list type conversion error
//TODO QGIS 4.0 - add PyName alias to avoid list type conversion error
void removeMapLayers( const QList<QgsMapLayer *> &layers );

/**
Expand Down Expand Up @@ -1285,7 +1285,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
* layerWillBeRemoved() signals will still be emitted following this signal.
* You can use this signal to do easy (and fast) cleanup.
*/
//TODO QGIS 3.0 - rename to past tense
//TODO QGIS 4.0 - rename to past tense
void removeAll();

/**
Expand Down
10 changes: 5 additions & 5 deletions src/core/qgsvectorlayertools.h
Expand Up @@ -52,7 +52,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
* \param feature Updated feature after adding will be written back to this
* \returns True in case of success, False if the operation failed/was aborted
*
* TODO QGIS 3: remove const qualifier
* TODO QGIS 4: remove const qualifier
*/
virtual bool addFeature( QgsVectorLayer *layer, const QgsAttributeMap &defaultValues = QgsAttributeMap(), const QgsGeometry &defaultGeometry = QgsGeometry(), QgsFeature *feature SIP_OUT = nullptr ) const = 0;

Expand All @@ -65,7 +65,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
*
* \returns True, if the editing session was started
*
* TODO QGIS 3: remove const qualifier
* TODO QGIS 4: remove const qualifier
*/
virtual bool startEditing( QgsVectorLayer *layer ) const = 0;

Expand All @@ -77,7 +77,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
* \param allowCancel True if a cancel button should be offered
* \returns True if successful
*
* TODO QGIS 3: remove const qualifier
* TODO QGIS 4: remove const qualifier
*/
virtual bool stopEditing( QgsVectorLayer *layer, bool allowCancel = true ) const = 0;

Expand All @@ -87,7 +87,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
* \param layer The layer to commit
* \returns True if successful
*
* TODO QGIS 3: remove const qualifier
* TODO QGIS 4: remove const qualifier
*/
virtual bool saveEdits( QgsVectorLayer *layer ) const = 0;

Expand All @@ -101,7 +101,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
* \param errorMsg If given, it will contain the error message
* \returns True if all features could be copied.
*
* TODO QGIS 3: remove const qualifier
* TODO QGIS 4: remove const qualifier
*/
virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request SIP_INOUT, double dx = 0, double dy = 0, QString *errorMsg SIP_OUT = nullptr ) const;

Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsattributetablemodel.h
Expand Up @@ -224,7 +224,7 @@ class GUI_EXPORT QgsAttributeTableModel: public QAbstractTableModel
/**
* Gets the the feature request
*/
// TODO QGIS 3: return copy instead of reference
// TODO QGIS 4: return copy instead of reference
const QgsFeatureRequest &request() const;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/core/qgssearchwidgetwrapper.h
Expand Up @@ -179,7 +179,7 @@ class GUI_EXPORT QgsSearchWidgetWrapper : public QgsWidgetWrapper
* \returns filter expression
* \since QGIS 2.16
*/
// TODO QGIS 3.0 - make pure virtual
// TODO QGIS 4.0 - make pure virtual
virtual QString createExpression( FilterFlags flags ) const { Q_UNUSED( flags ); return QStringLiteral( "TRUE" ); }

/**
Expand Down
6 changes: 3 additions & 3 deletions src/gui/qgsattributeform.h
Expand Up @@ -78,21 +78,21 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
* Hides the button box (OK/Cancel) and enables auto-commit
* \note set Embed in QgsAttributeEditorContext in constructor instead
*/
// TODO QGIS 3.0 - make private
// TODO QGIS 4.0 - make private
void hideButtonBox();

/**
* Shows the button box (OK/Cancel) and disables auto-commit
* \note set Embed in QgsAttributeEditorContext in constructor instead
*/
// TODO QGIS 3.0 - make private
// TODO QGIS 4.0 - make private
void showButtonBox();

/**
* Disconnects the button box (OK/Cancel) from the accept/resetValues slots
* If this method is called, you have to create these connections from outside
*/
// TODO QGIS 3.0 - make private
// TODO QGIS 4.0 - make private
void disconnectButtonBox();

/**
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -76,7 +76,7 @@ email : sherman at mrcc.com
* Deprecated to be deleted, stuff from here should be moved elsewhere.
* \note not available in Python bindings
*/
//TODO QGIS 3.0 - remove
//TODO QGIS 4.0 - remove
class QgsMapCanvas::CanvasProperties
{
public:
Expand Down
8 changes: 4 additions & 4 deletions src/gui/qgsmaptoolcapture.h
Expand Up @@ -121,7 +121,7 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
* 1 if the current layer is null or not a vector layer
* 2 if the transformation failed
*/
// TODO QGIS 3.0 returns an enum instead of a magic constant
// TODO QGIS 4.0 returns an enum instead of a magic constant
int nextPoint( const QgsPoint &mapPoint, QgsPoint &layerPoint );

/**
Expand All @@ -134,7 +134,7 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
* 1 if the current layer is null or not a vector layer
* 2 if the transformation failed
*/
// TODO QGIS 3.0 returns an enum instead of a magic constant
// TODO QGIS 4.0 returns an enum instead of a magic constant
int nextPoint( QPoint p, QgsPoint &layerPoint, QgsPoint &mapPoint );

/**
Expand All @@ -143,7 +143,7 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
* \returns 0 in case of success, 1 if not applicable (CRS mismatch), 2 in case of failure
* \since QGIS 2.14
*/
// TODO QGIS 3.0 returns an enum instead of a magic constant
// TODO QGIS 4.0 returns an enum instead of a magic constant
int fetchLayerPoint( const QgsPointLocator::Match &match, QgsPoint &layerPoint );

/**
Expand Down Expand Up @@ -175,7 +175,7 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
* Adds a point to the rubber band (in map coordinates) and to the capture list (in layer coordinates)
* \returns 0 in case of success, 1 if current layer is not a vector layer, 2 if coordinate transformation failed
*/
// TODO QGIS 3.0 returns an enum instead of a magic constant
// TODO QGIS 4.0 returns an enum instead of a magic constant
int addVertex( const QgsPointXY &point );

/**
Expand Down
2 changes: 1 addition & 1 deletion src/gui/raster/qgsrasterrendererwidget.h
Expand Up @@ -39,7 +39,7 @@ class GUI_EXPORT QgsRasterRendererWidget: public QWidget

public:

//TODO QGIS 3.0 - remove extent parameter, replace with map canvas parameter
//TODO QGIS 4.0 - remove extent parameter, replace with map canvas parameter
QgsRasterRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent )
: mRasterLayer( layer )
, mExtent( extent )
Expand Down

0 comments on commit 90f7989

Please sign in to comment.