diff options
author | hjk <hjk@theqtcompany.com> | 2016-03-23 09:39:21 +0100 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-03-23 10:06:40 +0000 |
commit | c5e6f7d57208c04715dbc00b03e4e4a49f145ca6 (patch) | |
tree | de4f53936a2a9fc4ee6e926693c4bf12afbd207d /src/corelib/tools/qbytearray.h | |
parent | d3d78c81754f2737b7686c8989460105a0a0c0e7 (diff) |
Hide mixed comparisons with QT_RESTRICTED_CAST_FROM_ASCII
While the implementation of the QByteArray::operatorX(const QString &s2)
for X \in { ==, !=, <, <=, >, >=} was already inavailable when
QT_RESTRICTED_CAST_FROM_ASCII was defined, the declaration was
still visible, leading effectively to a linking error.
This change hides the declaration, too, creating a compiler error as
intended, and as present with the QString::operatorX(const QByteArray &s2)
functions.
Change-Id: Ifdb0b85b7423b3b9c69212639b1512b0808a7983
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qbytearray.h')
-rw-r--r-- | src/corelib/tools/qbytearray.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index f0032227e8..eb826bae4e 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -327,7 +327,7 @@ public: 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; #endif -#ifndef QT_NO_CAST_FROM_ASCII +#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; |