diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-03-04 15:56:34 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-03-12 01:05:45 +0100 |
commit | 65859635830b1476ce5c3e22f86438a08d4894cf (patch) | |
tree | 0f98ffe6b2859a864d4835480d0d02b6b0319e1e /qmake | |
parent | 28d25144280503cf9131b6f9325d1d7f168af8d9 (diff) |
Deprecate {QString, QByteArray}::count()
And remove their uses.
[ChangeLog][QtCore][Deprecation Notice] Deprecated QString::count()
and QByteArray::count() that take no parameters, to avoid confusion
with the algorithm overloads of the same name. They can be replaced
by size() or length() methods.
Change-Id: I6541e3235ab58cf750d89568d66d3b1d9bbd4a04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/xmloutput.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp index c43f8d810b..78d6518dab 100644 --- a/qmake/generators/xmloutput.cpp +++ b/qmake/generators/xmloutput.cpp @@ -103,7 +103,7 @@ void XmlOutput::decreaseIndent() QString XmlOutput::doConversion(const QString &text) { - if (!text.count()) + if (!text.size()) return QString(); else if (conversion == NoConversion) return text; @@ -112,10 +112,10 @@ QString XmlOutput::doConversion(const QString &text) if (conversion == XMLConversion) { // this is a way to escape characters that shouldn't be converted - for (int i=0; i<text.count(); ++i) { + for (int i=0; i<text.size(); ++i) { const QChar c = text.at(i); if (c == QLatin1Char('&')) { - if ( (i + 7) < text.count() && + if ( (i + 7) < text.size() && text.at(i + 1) == QLatin1Char('#') && text.at(i + 2) == QLatin1Char('x') && text.at(i + 7) == QLatin1Char(';') ) { @@ -184,9 +184,9 @@ XmlOutput& XmlOutput::operator<<(const xml_output& o) addRaw(QString("\n%1<Import %2=\"%3\" />").arg(currentIndent).arg(o.xo_text).arg(o.xo_value)); break; case tCloseTag: - if (o.xo_value.count()) + if (o.xo_value.size()) closeAll(); - else if (o.xo_text.count()) + else if (o.xo_text.size()) closeTo(o.xo_text); else closeTag(); @@ -201,7 +201,7 @@ XmlOutput& XmlOutput::operator<<(const xml_output& o) { // Special case to be able to close tag in normal // way ("</tag>", not "/>") without using addRaw().. - if (!o.xo_text.count()) { + if (!o.xo_text.size()) { closeOpen(); break; } @@ -230,14 +230,14 @@ XmlOutput& XmlOutput::operator<<(const xml_output& o) // Output functions ---------------------------------------------------------- void XmlOutput::newTag(const QString &tag) { - Q_ASSERT_X(tag.count(), "XmlOutput", "Cannot open an empty tag"); + Q_ASSERT_X(tag.size(), "XmlOutput", "Cannot open an empty tag"); newTagOpen(tag); closeOpen(); } void XmlOutput::newTagOpen(const QString &tag) { - Q_ASSERT_X(tag.count(), "XmlOutput", "Cannot open an empty tag"); + Q_ASSERT_X(tag.size(), "XmlOutput", "Cannot open an empty tag"); closeOpen(); if (format == NewLine) |