Skip to content
Permalink
Browse files

add Python __repr__ method to QgsGeometry.Error (#8198)

  • Loading branch information
3nids committed Oct 15, 2018
1 parent 440d8d8 commit 32d4bcc425d9a6635b59673cd3802e5a0543bd8b
Showing with 14 additions and 0 deletions.
  1. +6 −0 python/core/auto_generated/geometry/qgsgeometry.sip.in
  2. +8 −0 src/core/geometry/qgsgeometry.h
@@ -1497,6 +1497,12 @@ The coordinates at which the error is located and should be visualized.
True if the location available from :py:func:`where` is valid.
%End

SIP_PYOBJECT __repr__();
%MethodCode
QString str = QStringLiteral( "<QgsGeometry.Error: %1>" ).arg( sipCpp->what() );
sipRes = PyUnicode_FromString( str.toUtf8().data() );
%End

};

enum ValidationMethod
@@ -1449,6 +1449,14 @@ class CORE_EXPORT QgsGeometry
*/
bool hasWhere() const;

#ifdef SIP_RUN
SIP_PYOBJECT __repr__();
% MethodCode
QString str = QStringLiteral( "<QgsGeometry.Error: %1>" ).arg( sipCpp->what() );
sipRes = PyUnicode_FromString( str.toUtf8().data() );
% End
#endif

private:
QString mMessage;
QgsPointXY mLocation;

0 comments on commit 32d4bcc

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