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>
This commit is contained in:
parent
d3d78c8175
commit
c5e6f7d572
@ -327,7 +327,7 @@ public:
|
|||||||
QT_ASCII_CAST_WARN int indexOf(const QString &s, int from = 0) const;
|
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;
|
QT_ASCII_CAST_WARN int lastIndexOf(const QString &s, int from = -1) const;
|
||||||
#endif
|
#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;
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user