mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
add Python __repr__ method to QgsGeometry.Error (#8198)
This commit is contained in:
parent
440d8d854c
commit
32d4bcc425
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user