summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpageranges.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-13 10:46:55 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-17 19:55:04 +0100
commit63f03f5e2da2714407933f9bafe7fc675a8e7a89 (patch)
tree94f53253907070e2a127bfed2080373233e399ea /src/gui/painting/qpageranges.h
parentf5010c49a37729375e37e6fe8cea60dd4b880d83 (diff)
Make QPageRanges::detach public, add data stream operators
As per QUIP-19 discussion, value types should have streaming operators, and detach should be public. detach() is still documented as \internal, like other public detach methods in value types. Change-Id: I30451909ad5226088fb05206f83983dda5b0c6b5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qpageranges.h')
-rw-r--r--src/gui/painting/qpageranges.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/painting/qpageranges.h b/src/gui/painting/qpageranges.h
index 481fee109b..823d83665b 100644
--- a/src/gui/painting/qpageranges.h
+++ b/src/gui/painting/qpageranges.h
@@ -49,6 +49,7 @@
QT_BEGIN_NAMESPACE
class QDebug;
+class QDataStream;
class QPageRangesPrivate;
QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPageRangesPrivate, Q_GUI_EXPORT)
@@ -97,13 +98,19 @@ public:
int firstPage() const;
int lastPage() const;
+ void detach();
+
private:
bool isEqual(const QPageRanges &other) const noexcept;
- void detach();
QExplicitlySharedDataPointer<QPageRangesPrivate> d;
};
+#ifndef QT_NO_DATASTREAM
+Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPageRanges &);
+Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPageRanges &);
+#endif
+
#ifndef QT_NO_DEBUG_STREAM
Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QPageRanges &pageRanges);
#endif