From e6d4eb5454af0ad75eafc4f1a726b27e92da8bc1 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 28 May 2016 20:02:00 +0000 Subject: [PATCH] fix ###'es in qrect.h upstream commits: https://github.com/qtproject/qtbase/commit/3b973971fb1e483b9b3514358a415781c3c24ba8 Signed-off-by: Ivailo Monev --- src/core/tools/qrect.h | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/core/tools/qrect.h b/src/core/tools/qrect.h index f7bccf0b7..7de9cab31 100644 --- a/src/core/tools/qrect.h +++ b/src/core/tools/qrect.h @@ -137,9 +137,7 @@ public: bool contains(int x, int y) const; // inline methods, _don't_ merge these bool contains(int x, int y, bool proper) const; bool contains(const QRect &r, bool proper = false) const; - QRect unite(const QRect &r) const; // ### Qt 5: make QT4_SUPPORT QRect united(const QRect &other) const; - QRect intersect(const QRect &r) const; // ### Qt 5: make QT4_SUPPORT QRect intersected(const QRect &other) const; bool intersects(const QRect &r) const; @@ -151,19 +149,10 @@ private: #if defined(Q_WS_X11) friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2); #endif - // ### Qt 5; remove the ifdef and just have the same order on all platforms. -#if defined(Q_OS_MAC) - int y1; - int x1; - int y2; - int x2; -#else int x1; int y1; int x2; int y2; -#endif - }; Q_DECLARE_TYPEINFO(QRect, Q_MOVABLE_TYPE); @@ -446,24 +435,14 @@ inline QRect& QRect::operator&=(const QRect &r) return *this; } -inline QRect QRect::intersect(const QRect &r) const +inline QRect QRect::intersected(const QRect &r) const { return *this & r; } -inline QRect QRect::intersected(const QRect &other) const -{ - return intersect(other); -} - -inline QRect QRect::unite(const QRect &r) const -{ - return *this | r; -} - inline QRect QRect::united(const QRect &r) const { - return unite(r); + return *this | r; } inline bool operator==(const QRect &r1, const QRect &r2) -- 2.11.0