Skip to content

Commit 4b78b1c

Browse files
committedAug 1, 2016
Make all QgsGeometry methods return values, not pointers
Reduces likelihood of crashes and leaks
1 parent bd7d913 commit 4b78b1c

File tree

103 files changed

+1158
-1562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1158
-1562
lines changed
 

‎doc/api_break.dox

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,18 @@ true, as the method will return an empty geometry if the feature has no geometry
226226
<li>setFields( const QgsFields*, bool ) has been removed, use setFields( const QgsFields&, bool ) instead.</li>
227227
</ul>
228228

229+
\subsection qgis_api_break_3_0_QgsGeometry QgsGeometry
230+
231+
<ul>
232+
<li>All QgsGeometry methods now accept geometry references instead of pointers, and return a QgsGeometry
233+
value instead of a pointer.</li>
234+
</ul>
235+
229236
\subsection qgis_api_break_3_0_QgsGeometryAnalyzer QgsGeometryAnalyzer
230237

231238
<ul>
232-
<li>locateBetweenMeasures() and locateAlongMeasure() now take geometry references, not pointers</li>
239+
<li>locateBetweenMeasures() and locateAlongMeasure() now take geometry references, not pointers, and return
240+
a QgsGeometry value rather than a pointer.</li>
233241
</ul>
234242

235243
\subsection qgis_api_break_3_0_QgsGroupWMSDataDialog QgsGroupWMSDataDialog

‎python/analysis/vector/qgsgeometryanalyzer.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ class QgsGeometryAnalyzer
9595
bool forceSingleGeometry = false, QgsVectorDataProvider* memoryProvider = 0, QProgressDialog* p = 0 );
9696

9797
/** Returns linear reference geometry as a multiline (or 0 if no match). Currently, the z-coordinates are considered to be the measures (no support for m-values in QGIS)*/
98-
QgsGeometry* locateBetweenMeasures( double fromMeasure, double toMeasure, const QgsGeometry& lineGeom );
98+
QgsGeometry locateBetweenMeasures( double fromMeasure, double toMeasure, const QgsGeometry& lineGeom );
9999
/** Returns linear reference geometry. Unlike the PostGIS function, this method always returns multipoint or 0 if no match (not geometry collection).
100100
* Currently, the z-coordinates are considered to be the measures (no support for m-values in QGIS)
101101
*/
102-
QgsGeometry* locateAlongMeasure( double measure, const QgsGeometry& lineGeom );
102+
QgsGeometry locateAlongMeasure( double measure, const QgsGeometry& lineGeom );
103103

104104
};

0 commit comments

Comments
 (0)
Please sign in to comment.