From 0e0f656f5031585c6b691d80057dfdc00bc48400 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 17 Oct 2017 07:31:42 -0700 Subject: Mark the previously public qstringalgorithms.h functions private Discussed during Qt Contributor Summit 2017. We concluded that we don't want to make these functions public, as they do not follow Qt coding style API. Specifically, qStartsWith(a, b) is not easily understood which argument is the needle and which argument is the haystack (same problem memcpy() has). Compare that to a.startsWith(b) which can clearly be read in English as a subject-verb-object sentence. This commit removes the unit tests that called compare(). Discussed-on: http://lists.qt-project.org/pipermail/development/2017-October/031060.html Change-Id: Icaa86fc7b54d4b368c0efffd14ee6205eb9043fb Reviewed-by: Friedemann Kleint --- src/corelib/doc/snippets/qstring/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/doc/snippets/qstring/main.cpp') diff --git a/src/corelib/doc/snippets/qstring/main.cpp b/src/corelib/doc/snippets/qstring/main.cpp index f740888fe7..3d09e3618e 100644 --- a/src/corelib/doc/snippets/qstring/main.cpp +++ b/src/corelib/doc/snippets/qstring/main.cpp @@ -333,11 +333,11 @@ void Widget::compareSensitiveFunction() int z = QString::compare("auto", "Car", Qt::CaseInsensitive); // z < 0 //! [16] - //! [qCompareStrings-QSV-QSV] - int x = qCompareStrings(u"aUtO", u"AuTo", Qt::CaseInsensitive); // x == 0 - int y = qCompareStrings(u"auto", u"Car", Qt::CaseSensitive); // y > 0 - int z = qCompareStrings(u"auto", u"Car", Qt::CaseInsensitive); // z < 0 - //! [qCompareStrings-QSV-QSV] + //! [QtPrivate::compareStrings-QSV-QSV] + int x = QtPrivate::compareStrings(u"aUtO", u"AuTo", Qt::CaseInsensitive); // x == 0 + int y = QtPrivate::compareStrings(u"auto", u"Car", Qt::CaseSensitive); // y > 0 + int z = QtPrivate::compareStrings(u"auto", u"Car", Qt::CaseInsensitive); // z < 0 + //! [QtPrivate::compareStrings-QSV-QSV] } void Widget::containsFunction() -- cgit v1.2.3