diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-04-04 23:59:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-08 22:06:31 +0200 |
commit | 9f924338a8c003c01864a44569ed2fb4cbba7d2d (patch) | |
tree | 0e65b9b10b44d008a72eb2ea6500a096ddde9653 /src/gui/painting/qpagesize.cpp | |
parent | 6115ba4f4e30808fb48948fbc02f33b5de5ed9b3 (diff) |
QPageSize: make op== non-member
Better style, since it treats the left-hand and right-hand size symmetrically,
e.g. for implicit conversions.
Change-Id: If1ffa9dc2a018e402c884f60bfbc82e799daeb92
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qpagesize.cpp')
-rw-r--r-- | src/gui/painting/qpagesize.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp index 7d19d49b4e..9cf7f192e8 100644 --- a/src/gui/painting/qpagesize.cpp +++ b/src/gui/painting/qpagesize.cpp @@ -1255,15 +1255,18 @@ QPageSize &QPageSize::operator=(const QPageSize &other) */ /*! - Returns \c true if this page is equal to the \a other page, i.e. if the - page has the same attributes. Current attributes are size and name. + \relates QPageSize + + Returns \c true if page size \a lhs is equal to page size \a rhs, + i.e. if the page sizes have the same attributes. Current + attributes are size and name. */ -bool QPageSize::operator==(const QPageSize &other) const +bool operator==(const QPageSize &lhs, const QPageSize &rhs) { - if (d == other.d) + if (lhs.d == rhs.d) return true; - return d && other.d && *d == *other.d; + return lhs.d && rhs.d && *lhs.d == *rhs.d; } /*! |