Make a couple of iterators trivially-copyable in Qt 6

Change-Id: I1d1c382fa6214590b3a51d77b18c7df390f2dc70
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Sérgio Martins 2015-11-06 21:23:24 +00:00 committed by Konstantin Ritt
parent 9ac0f47e64
commit f7ab19955f
2 changed files with 8 additions and 0 deletions

View File

@ -663,6 +663,8 @@ QTextFrame::iterator::iterator(QTextFrame *frame, int block, int begin, int end)
cb = block;
}
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
/*!
Copy constructor. Constructs a copy of the \a other iterator.
*/
@ -689,6 +691,8 @@ QTextFrame::iterator &QTextFrame::iterator::operator=(const iterator &other)
return *this;
}
#endif
/*!
Returns the current frame pointed to by the iterator, or 0 if the
iterator currently points to a block.

View File

@ -143,8 +143,10 @@ public:
iterator(QTextFrame *frame, int block, int begin, int end);
public:
iterator();
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
iterator(const iterator &o);
iterator &operator=(const iterator &o);
#endif
QTextFrame *parentFrame() const { return f; }
@ -248,7 +250,9 @@ public:
iterator(const QTextDocumentPrivate *priv, int begin, int end, int f) : p(priv), b(begin), e(end), n(f) {}
public:
iterator() : p(Q_NULLPTR), b(0), e(0), n(0) {}
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
iterator(const iterator &o) : p(o.p), b(o.b), e(o.e), n(o.n) {}
#endif
QTextFragment fragment() const;