From 22afdaa2dadc9ef610cbb9c69755ca589fbf907b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 5 Apr 2014 00:00:15 +0200 Subject: QPageSize: provide op!= For consistency. Change-Id: I4375a6f8c2514479a7479c735d397bf8a9876db1 Reviewed-by: Friedemann Kleint Reviewed-by: John Layt --- src/gui/painting/qpagesize.cpp | 8 ++++++++ src/gui/painting/qpagesize.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'src/gui') diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp index 9cf7f192e8..60ca69d1f2 100644 --- a/src/gui/painting/qpagesize.cpp +++ b/src/gui/painting/qpagesize.cpp @@ -1268,6 +1268,14 @@ bool operator==(const QPageSize &lhs, const QPageSize &rhs) return true; return lhs.d && rhs.d && *lhs.d == *rhs.d; } +/*! + \fn bool operator!=(const QPageSize &lhs, const QPageSize &rhs) + \relates QPageSize + + Returns \c true if page size \a lhs is unequal to page size \a + rhs, i.e. if the page size has different attributes. Current + attributes are size and name. +*/ /*! Returns \c true if this page is equivalent to the \a other page, i.e. if the diff --git a/src/gui/painting/qpagesize.h b/src/gui/painting/qpagesize.h index d228f05a4a..8205d2eae4 100644 --- a/src/gui/painting/qpagesize.h +++ b/src/gui/painting/qpagesize.h @@ -299,6 +299,8 @@ private: Q_DECLARE_SHARED(QPageSize) Q_GUI_EXPORT bool operator==(const QPageSize &lhs, const QPageSize &rhs); +inline bool operator!=(const QPageSize &lhs, const QPageSize &rhs) +{ return !operator==(lhs, rhs); } #ifndef QT_NO_DEBUG_STREAM Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QPageSize &pageSize); -- cgit v1.2.3