diff options
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextobject.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qtextobject.h | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index 49cf35ecc0..a756549f3e 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -675,7 +675,7 @@ QTextFrame::iterator::iterator(QTextFrame *frame, int block, int begin, int end) /*! Copy constructor. Constructs a copy of the \a other iterator. */ -QTextFrame::iterator::iterator(const iterator &other) +QTextFrame::iterator::iterator(const iterator &other) Q_DECL_NOTHROW { f = other.f; b = other.b; @@ -688,7 +688,7 @@ QTextFrame::iterator::iterator(const iterator &other) Assigns \a other to this iterator and returns a reference to this iterator. */ -QTextFrame::iterator &QTextFrame::iterator::operator=(const iterator &other) +QTextFrame::iterator &QTextFrame::iterator::operator=(const iterator &other) Q_DECL_NOTHROW { f = other.f; b = other.b; diff --git a/src/gui/text/qtextobject.h b/src/gui/text/qtextobject.h index 18df53945c..d3f6b3d0ac 100644 --- a/src/gui/text/qtextobject.h +++ b/src/gui/text/qtextobject.h @@ -148,10 +148,14 @@ public: friend class QTextDocumentLayoutPrivate; iterator(QTextFrame *frame, int block, int begin, int end); public: - iterator(); + iterator(); // ### Qt 6: inline #if QT_VERSION < QT_VERSION_CHECK(6,0,0) - iterator(const iterator &o); - iterator &operator=(const iterator &o); + iterator(const iterator &o) Q_DECL_NOTHROW; // = default + iterator &operator=(const iterator &o) Q_DECL_NOTHROW; // = default + iterator(iterator &&other) Q_DECL_NOTHROW // = default + { memcpy(this, &other, sizeof(iterator)); } + iterator &operator=(iterator &&other) Q_DECL_NOTHROW // = default + { memcpy(this, &other, sizeof(iterator)); return *this; } #endif QTextFrame *parentFrame() const { return f; } |