Skip to content

Commit 7e81226

Browse files
rouaultnyalldawson
authored andcommittedOct 6, 2018
Replace toUtf8().data() by toUtf8().constData()
All your uses of toUtf8().data() actually just need a const char* So use constData() that is semantically more correct, and documented to be faster. From http://doc.qt.io/qt-5/qbytearray.html#data "For read-only access, constData() is faster because it never causes a deep copy to occur."
1 parent f5d2d85 commit 7e81226

Some content is hidden

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

52 files changed

+100
-100
lines changed
 

‎python/core/auto_generated/expression/qgsexpression.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ value. The value may be null.
590590
SIP_PYOBJECT __repr__();
591591
%MethodCode
592592
QString str = QStringLiteral( "<QgsExpression: '%1'>" ).arg( sipCpp->expression() );
593-
sipRes = PyUnicode_FromString( str.toUtf8().data() );
593+
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
594594
%End
595595

596596
};

‎python/core/auto_generated/geometry/qgscircle.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Returns true if the circle contains the ``point``.
256256
SIP_PYOBJECT __repr__();
257257
%MethodCode
258258
QString str = QStringLiteral( "<QgsCircle: %1>" ).arg( sipCpp->toString() );
259-
sipRes = PyUnicode_FromString( str.toUtf8().data() );
259+
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
260260
%End
261261
};
262262

0 commit comments

Comments
 (0)