diff options
author | David Faure <faure@kde.org> | 2012-01-20 11:22:09 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-20 14:17:41 +0100 |
commit | 47d5d349d8f5bc590ca7cdf30bf13b69bddf3225 (patch) | |
tree | be75994c1d77e479d562d571ef9cfaf48f9583d9 /src/corelib/io | |
parent | 841b0c4fac8e8a96ebb2120b704cf7bbf1260543 (diff) |
Remove QBool and use bool instead.
QBool was introduced with Qt-4.0, to detect Qt3-like code like
if (c.contains(d) == 2) and break compilation on such constructs.
This isn't necessary anymore, given that such code couldn't possibly
compile in Qt4 times.
And QBool was confusing developers, and creating compile errors (e.g.
QVariant doesn't have support for it), so better remove it for Qt 5.
Change-Id: I6642f43f5e12b872f98abb56600186179f072b09
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qdebug.cpp | 8 | ||||
-rw-r--r-- | src/corelib/io/qdebug.h | 1 | ||||
-rw-r--r-- | src/corelib/io/qtextstream.cpp | 9 | ||||
-rw-r--r-- | src/corelib/io/qtextstream.h | 1 |
4 files changed, 0 insertions, 19 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index 8ca15b19ca..18f6d1692d 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -165,14 +165,6 @@ */ /*! - \fn QDebug &QDebug::operator<<(QBool t) - \internal - - Writes the boolean value, \a t, to the stream and returns a reference to the - stream. -*/ - -/*! \fn QDebug &QDebug::operator<<(bool t) Writes the boolean value, \a t, to the stream and returns a reference to the diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 54663d5d65..a86cdb68a8 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -93,7 +93,6 @@ public: inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; } inline QDebug &operator<<(QChar t) { stream->ts << '\'' << t << '\''; return maybeSpace(); } - inline QDebug &operator<<(QBool t) { stream->ts << (bool(t != 0) ? "true" : "false"); return maybeSpace(); } inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); } inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); } inline QDebug &operator<<(signed short t) { stream->ts << t; return maybeSpace(); } diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 8c7f57fddf..e26a2034dc 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -2324,15 +2324,6 @@ void QTextStreamPrivate::putNumber(qulonglong number, bool negative) } /*! - \internal - \overload -*/ -QTextStream &QTextStream::operator<<(QBool b) -{ - return *this << bool(b); -} - -/*! Writes the character \a c to the stream, then returns a reference to the QTextStream. diff --git a/src/corelib/io/qtextstream.h b/src/corelib/io/qtextstream.h index 0531d4017d..9c3b98d8ac 100644 --- a/src/corelib/io/qtextstream.h +++ b/src/corelib/io/qtextstream.h @@ -175,7 +175,6 @@ public: QTextStream &operator>>(QByteArray &array); QTextStream &operator>>(char *c); - QTextStream &operator<<(QBool b); QTextStream &operator<<(QChar ch); QTextStream &operator<<(char ch); QTextStream &operator<<(signed short i); |