diff options
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qglyphrun.h | 8 | ||||
-rw-r--r-- | src/gui/text/qrawfont.h | 10 | ||||
-rw-r--r-- | src/gui/text/qstatictext.h | 7 | ||||
-rw-r--r-- | src/gui/text/qtextcursor.h | 5 |
4 files changed, 20 insertions, 10 deletions
diff --git a/src/gui/text/qglyphrun.h b/src/gui/text/qglyphrun.h index d3034b7546..9f51a49a6d 100644 --- a/src/gui/text/qglyphrun.h +++ b/src/gui/text/qglyphrun.h @@ -59,9 +59,13 @@ public: QGlyphRun(); QGlyphRun(const QGlyphRun &other); +#ifdef Q_COMPILER_RVALUE_REFS + QGlyphRun &operator=(QGlyphRun &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QGlyphRun &operator=(const QGlyphRun &other); ~QGlyphRun(); - void swap(QGlyphRun &other) { qSwap(d, other.d); } + void swap(QGlyphRun &other) Q_DECL_NOTHROW { qSwap(d, other.d); } QRawFont rawFont() const; void setRawFont(const QRawFont &rawFont); @@ -78,8 +82,6 @@ public: void clear(); - QGlyphRun &operator=(const QGlyphRun &other); - bool operator==(const QGlyphRun &other) const; inline bool operator!=(const QGlyphRun &other) const { return !operator==(other); } diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h index 3798555de5..d710658a9b 100644 --- a/src/gui/text/qrawfont.h +++ b/src/gui/text/qrawfont.h @@ -72,13 +72,15 @@ public: qreal pixelSize, QFont::HintingPreference hintingPreference = QFont::PreferDefaultHinting); QRawFont(const QRawFont &other); +#ifdef Q_COMPILER_RVALUE_REFS + QRawFont &operator=(QRawFont &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QRawFont &operator=(const QRawFont &other); ~QRawFont(); - bool isValid() const; + void swap(QRawFont &other) Q_DECL_NOTHROW { qSwap(d, other.d); } - QRawFont &operator=(const QRawFont &other); - - void swap(QRawFont &other) { qSwap(d, other.d); } + bool isValid() const; bool operator==(const QRawFont &other) const; inline bool operator!=(const QRawFont &other) const diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h index d2825e73ac..0a1d9429b4 100644 --- a/src/gui/text/qstatictext.h +++ b/src/gui/text/qstatictext.h @@ -57,9 +57,13 @@ public: QStaticText(); QStaticText(const QString &text); QStaticText(const QStaticText &other); +#ifdef Q_COMPILER_RVALUE_REFS + QStaticText &operator=(QStaticText &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif + QStaticText &operator=(const QStaticText &); ~QStaticText(); - void swap(QStaticText &other) { qSwap(data, other.data); } + void swap(QStaticText &other) Q_DECL_NOTHROW { qSwap(data, other.data); } void setText(const QString &text); QString text() const; @@ -80,7 +84,6 @@ public: void setPerformanceHint(PerformanceHint performanceHint); PerformanceHint performanceHint() const; - QStaticText &operator=(const QStaticText &); bool operator==(const QStaticText &) const; bool operator!=(const QStaticText &) const; diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h index f04055603c..350f38cd02 100644 --- a/src/gui/text/qtextcursor.h +++ b/src/gui/text/qtextcursor.h @@ -66,10 +66,13 @@ public: explicit QTextCursor(const QTextBlock &block); explicit QTextCursor(QTextCursorPrivate *d); QTextCursor(const QTextCursor &cursor); +#ifdef Q_COMPILER_RVALUE_REFS + QTextCursor &operator=(QTextCursor &&other) Q_DECL_NOTHROW { swap(other); return *this; } +#endif QTextCursor &operator=(const QTextCursor &other); ~QTextCursor(); - void swap(QTextCursor &other) { qSwap(d, other.d); } + void swap(QTextCursor &other) Q_DECL_NOTHROW { qSwap(d, other.d); } bool isNull() const; |