summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytearray.h
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-03-04 15:56:34 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2022-03-12 01:05:45 +0100
commit65859635830b1476ce5c3e22f86438a08d4894cf (patch)
tree0f98ffe6b2859a864d4835480d0d02b6b0319e1e /src/corelib/text/qbytearray.h
parentUse qstringfwd.h when forward declaring string classes (diff)
downloadqtbase-65859635830b1476ce5c3e22f86438a08d4894cf.tar.xz
qtbase-65859635830b1476ce5c3e22f86438a08d4894cf.zip
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 'src/corelib/text/qbytearray.h')
-rw-r--r--src/corelib/text/qbytearray.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h
index d3b3c3ca6e..bacc023cdf 100644
--- a/src/corelib/text/qbytearray.h
+++ b/src/corelib/text/qbytearray.h
@@ -468,7 +468,10 @@ public:
inline std::string toStdString() const;
inline qsizetype size() const noexcept { return d->size; }
+#if QT_DEPRECATED_SINCE(6, 4)
+ QT_DEPRECATED_VERSION_X_6_4("Use size() or length() instead.")
inline qsizetype count() const noexcept { return size(); }
+#endif
inline qsizetype length() const noexcept { return size(); }
bool isNull() const noexcept;