Skip to content
Permalink
Browse files

Geometry error string is not shared

Instead move it to a private QgsGeometry member. It's copied
with QgsGeometry, but not the underlying private geometry
data.

This means the error string can be changed without detaching
(and copying) the geometry data.

Also make greater use of error string for all use of GEOS
functions.
  • Loading branch information
nyalldawson committed Aug 30, 2017
1 parent a73c099 commit c2f8a8224b6b24332acaa65146f221342271066c
Showing with 163 additions and 78 deletions.
  1. +4 −3 python/core/geometry/qgsgeometry.sip
  2. +152 −72 src/core/geometry/qgsgeometry.cpp
  3. +7 −3 src/core/geometry/qgsgeometry.h
@@ -1292,10 +1292,11 @@ Returns an extruded version of this geometry.
:rtype: int
%End

QString error() const;
QString lastError() const;
%Docstring
Returns an error string referring to an error that was produced
when this geometry was created.
Returns an error string referring to the last error encountered
either when this geometry was created or when an operation
was performed on the geometry.

.. versionadded:: 3.0
:rtype: str

0 comments on commit c2f8a82

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