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/global/qglobal.h | |
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/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 2b868df75d..4a606f556e 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1922,23 +1922,6 @@ public: #endif -class QBool -{ - bool b; - -public: - inline explicit QBool(bool B) : b(B) {} - inline operator const void *() const - { return b ? static_cast<const void *>(this) : static_cast<const void *>(0); } -}; - -inline bool operator==(QBool b1, bool b2) { return !b1 == !b2; } -inline bool operator==(bool b1, QBool b2) { return !b1 == !b2; } -inline bool operator==(QBool b1, QBool b2) { return !b1 == !b2; } -inline bool operator!=(QBool b1, bool b2) { return !b1 != !b2; } -inline bool operator!=(bool b1, QBool b2) { return !b1 != !b2; } -inline bool operator!=(QBool b1, QBool b2) { return !b1 != !b2; } - Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) { return (qAbs(p1 - p2) <= 0.000000000001 * qMin(qAbs(p1), qAbs(p2))); |