Skip to content

Commit

Permalink
Make QgsSpatialIndex protected members private
Browse files Browse the repository at this point in the history
The class is not designed to be subclassed
  • Loading branch information
nyalldawson committed Jun 1, 2017
1 parent ff171ea commit d8d1752
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
5 changes: 5 additions & 0 deletions doc/api_break.dox
Original file line number Diff line number Diff line change
Expand Up @@ -2060,6 +2060,11 @@ QgsSnapper {#qgis_api_break_3_0_QgsSnapper}
- Constructor variant with QgsMapRenderer has been removed. Use the variant with QgsMapSettings.
- Signature for snapPoint() has changed.

QgsSpatialIndex {#qgis_api_break_3_0_QgsSpatialIndex}
---------------

- The protected members were made private. QgsSpatialIndex is not designed to be subclassed.


QgsSublayersDialog {#qgis_api_break_3_0_QgsSublayersDialog}
------------------
Expand Down
16 changes: 0 additions & 16 deletions python/core/qgsspatialindex.sip
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,6 @@ get reference count - just for debugging!
:rtype: QAtomicInt
%End

protected:


static bool featureInfo( const QgsFeature &f, QgsRectangle &rect, QgsFeatureId &id );
%Docstring
Calculates feature info to insert into index.
\param f input feature
\param rect will be set to feature's geometry bounding box
\param id will be set to feature's ID
:return: true if feature info was successfully retrieved and the feature can be added to
the index
.. versionadded:: 3.0
:rtype: bool
%End


};


Expand Down
7 changes: 3 additions & 4 deletions src/core/qgsspatialindex.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,16 @@ class CORE_EXPORT QgsSpatialIndex
//! get reference count - just for debugging!
QAtomicInt SIP_PYTYPE( int ) refs() const;

protected:
//! \note not available in Python bindings
static SpatialIndex::Region rectToRegion( const QgsRectangle &rect ) SIP_SKIP;
private:

static SpatialIndex::Region rectToRegion( const QgsRectangle &rect );

/** Calculates feature info to insert into index.
* \param f input feature
* \param r will be set to spatial index region
* \param id will be set to feature's ID
* \returns true if feature info was successfully retrieved and the feature can be added to
* the index
* \note not available in Python bindings
*/
static bool featureInfo( const QgsFeature &f, SpatialIndex::Region &r, QgsFeatureId &id ) SIP_SKIP;

Expand Down

0 comments on commit d8d1752

Please sign in to comment.