summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-11-06 21:23:24 +0000
committerKonstantin Ritt <ritt.ks@gmail.com>2015-11-29 11:45:29 +0000
commitf7ab19955ffde7b0cf9e1dcb66223c515f775926 (patch)
tree2317b70070da09d37bff26f1b53c88fd04c07138 /src/gui
parent9ac0f47e649e44d98d7978619b605cfdbac13569 (diff)
Make a couple of iterators trivially-copyable in Qt 6
Change-Id: I1d1c382fa6214590b3a51d77b18c7df390f2dc70 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qtextobject.cpp4
-rw-r--r--src/gui/text/qtextobject.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index df7c8b9c71..6552309dcb 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -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.
diff --git a/src/gui/text/qtextobject.h b/src/gui/text/qtextobject.h
index fbb90e42b0..29eeddc414 100644
--- a/src/gui/text/qtextobject.h
+++ b/src/gui/text/qtextobject.h
@@ -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;