diff options
Diffstat (limited to 'src/corelib/text/qbytearray.h')
-rw-r--r-- | src/corelib/text/qbytearray.h | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h index 2b7d298313..bb4d22e8ca 100644 --- a/src/corelib/text/qbytearray.h +++ b/src/corelib/text/qbytearray.h @@ -334,24 +334,38 @@ public: Q_REQUIRED_RESULT QByteArray repeated(int times) const; -#ifndef QT_NO_CAST_TO_ASCII - QT_ASCII_CAST_WARN QByteArray &append(const QString &s); - QT_ASCII_CAST_WARN QByteArray &insert(int i, const QString &s); - QT_ASCII_CAST_WARN QByteArray &replace(const QString &before, const char *after); - QT_ASCII_CAST_WARN QByteArray &replace(char c, const QString &after); - QT_ASCII_CAST_WARN QByteArray &replace(const QString &before, const QByteArray &after); - - QT_ASCII_CAST_WARN QByteArray &operator+=(const QString &s); - QT_ASCII_CAST_WARN int indexOf(const QString &s, int from = 0) const; - QT_ASCII_CAST_WARN int lastIndexOf(const QString &s, int from = -1) const; +#if !defined(QT_NO_CAST_TO_ASCII) && QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") + QByteArray &append(const QString &s); + QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") + QByteArray &insert(int i, const QString &s); + QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") + QByteArray &replace(const QString &before, const char *after); + QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") + QByteArray &replace(char c, const QString &after); + QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") + QByteArray &replace(const QString &before, const QByteArray &after); + + QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") + QByteArray &operator+=(const QString &s); + QT_DEPRECATED_VERSION_X_5_15("Use QString's toUtf8(), toLatin1() or toLocal8Bit()") + int indexOf(const QString &s, int from = 0) const; + 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) - inline QT_ASCII_CAST_WARN bool operator==(const QString &s2) const; - inline QT_ASCII_CAST_WARN bool operator!=(const QString &s2) const; - inline QT_ASCII_CAST_WARN bool operator<(const QString &s2) const; - inline QT_ASCII_CAST_WARN bool operator>(const QString &s2) const; - inline QT_ASCII_CAST_WARN bool operator<=(const QString &s2) const; - inline QT_ASCII_CAST_WARN bool operator>=(const QString &s2) const; +#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()") + 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 short toShort(bool *ok = nullptr, int base = 10) const; |