diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-08-25 13:41:25 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-08-26 09:09:05 +0000 |
commit | 90c084884ea008fa0c37f55e900fbfa0b12bfd02 (patch) | |
tree | aad969965a51fd8c8d7741b9eaff864cf8b6228a /src/corelib/text | |
parent | d8c5fab0d9421b0f0c43286d4518308786203fdc (diff) |
Un-deprecate QByteArray's relational operators taking QString
QString still has the overloads of relational operators taking
QByteArray. Un-deprecate QByteArray's relational operators taking
QString for symmetry. See also the comments of
d7ccd8cb4565c8643b158891c9de3187c1586dc9 for more details.
Change-Id: If3f59376b389fe4cbc2bd649a748bb78378a530c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d8ee1f6385b4dfeb57cb466b6c5f6bcfd3a90dfb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/text')
-rw-r--r-- | src/corelib/text/qbytearray.cpp | 12 | ||||
-rw-r--r-- | src/corelib/text/qbytearray.h | 8 | ||||
-rw-r--r-- | src/corelib/text/qstring.h | 2 |
3 files changed, 1 insertions, 21 deletions
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index 87ca977d91..9a72df58d3 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -3334,8 +3334,6 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba) /*! \fn bool QByteArray::operator==(const QString &str) const - \obsolete - Returns \c true if this byte array is equal to string \a str; otherwise returns \c false. @@ -3353,8 +3351,6 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba) /*! \fn bool QByteArray::operator!=(const QString &str) const - \obsolete - Returns \c true if this byte array is not equal to string \a str; otherwise returns \c false. @@ -3372,8 +3368,6 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba) /*! \fn bool QByteArray::operator<(const QString &str) const - \obsolete - Returns \c true if this byte array is lexically less than string \a str; otherwise returns \c false. @@ -3391,8 +3385,6 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba) /*! \fn bool QByteArray::operator>(const QString &str) const - \obsolete - Returns \c true if this byte array is lexically greater than string \a str; otherwise returns \c false. @@ -3410,8 +3402,6 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba) /*! \fn bool QByteArray::operator<=(const QString &str) const - \obsolete - Returns \c true if this byte array is lexically less than or equal to string \a str; otherwise returns \c false. @@ -3429,8 +3419,6 @@ QDataStream &operator>>(QDataStream &in, QByteArray &ba) /*! \fn bool QByteArray::operator>=(const QString &str) const - \obsolete - Returns \c true if this byte array is greater than or equal to string \a str; otherwise returns \c false. diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h index bb4d22e8ca..f4c335ca93 100644 --- a/src/corelib/text/qbytearray.h +++ b/src/corelib/text/qbytearray.h @@ -353,18 +353,12 @@ public: QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") int lastIndexOf(const QString &s, int from = -1) const; #endif -#if !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII) && QT_DEPRECATED_SINCE(5, 15) - QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") +#if !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII) inline bool operator==(const QString &s2) const; - QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") inline bool operator!=(const QString &s2) const; - QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") inline bool operator<(const QString &s2) const; - QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") inline bool operator>(const QString &s2) const; - QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") inline bool operator<=(const QString &s2) const; - QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") inline bool operator>=(const QString &s2) const; #endif diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index 5cfae878cc..8c09c80f5e 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -1483,7 +1483,6 @@ inline QT_ASCII_CAST_WARN bool QString::operator<=(const QByteArray &s) const inline QT_ASCII_CAST_WARN bool QString::operator>=(const QByteArray &s) const { return QString::compare_helper(constData(), size(), s.constData(), s.size()) >= 0; } -#if QT_DEPRECATED_SINCE(5, 15) inline bool QByteArray::operator==(const QString &s) const { return QString::compare_helper(s.constData(), s.size(), constData(), qstrnlen(constData(), size())) == 0; } inline bool QByteArray::operator!=(const QString &s) const @@ -1496,7 +1495,6 @@ inline bool QByteArray::operator<=(const QString &s) const { return QString::compare_helper(s.constData(), s.size(), constData(), size()) >= 0; } inline bool QByteArray::operator>=(const QString &s) const { return QString::compare_helper(s.constData(), s.size(), constData(), size()) <= 0; } -#endif // QT_DEPRECATED_SINCE(5, 15) #endif // !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII) |