From 6aaac9a3b19115272faeff2a7a2275c2538fc197 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 25 Jun 2015 18:41:14 +0200 Subject: QtGui: make all Q_DECLARE_SHARED types nothrow move-assignable Excepting QBitmap and the QTextFormat heirarchy, which don't have 100% value semantics (still pondering them). In QPolygon(F), adding the move assignment operator disables the implicitly-defined copy assignment operator, which therefore have to be made user-defined. That doesn't change the ABI of the class, since the base class QVector already had a user-defined copy assignment operator. Change-Id: I0b111c1d21cf47f559ada6357c982e3dc26aca68 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/gui/painting/qpagelayout.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/gui/painting/qpagelayout.h') diff --git a/src/gui/painting/qpagelayout.h b/src/gui/painting/qpagelayout.h index 17e5eeece2..7eac348c43 100644 --- a/src/gui/painting/qpagelayout.h +++ b/src/gui/painting/qpagelayout.h @@ -75,14 +75,13 @@ public: const QMarginsF &margins, Unit units = Point, const QMarginsF &minMargins = QMarginsF(0, 0, 0, 0)); QPageLayout(const QPageLayout &other); - ~QPageLayout(); - - QPageLayout &operator=(const QPageLayout &other); - #ifdef Q_COMPILER_RVALUE_REFS - QPageLayout &operator=(QPageLayout &&other) { swap(other); return *this; } +#ifdef Q_COMPILER_RVALUE_REFS + QPageLayout &operator=(QPageLayout &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif + QPageLayout &operator=(const QPageLayout &other); + ~QPageLayout(); - void swap(QPageLayout &other) { d.swap(other.d); } + void swap(QPageLayout &other) Q_DECL_NOTHROW { qSwap(d, other.d); } friend Q_GUI_EXPORT bool operator==(const QPageLayout &lhs, const QPageLayout &rhs); bool isEquivalentTo(const QPageLayout &other) const; -- cgit v1.2.3