summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpageranges.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make QPageRanges::detach public, add data stream operatorsVolker Hilsheimer2020-11-171-0/+35
| | | | | | | | | | | 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>
* Rename QRangeCollection to QPageRanges, make it a proper value typeVolker Hilsheimer2020-11-081-0/+365
The type is specific about printing, so give it a name in line with QPageLayout and QPageSize. As per API review comment, it's not clear why this type should not be a regular, copyable and movable value type. It stores a list of intervals. Give it value-type semantics, as an implicitly shared class. Convert the parse method into a static factory function. Add a Range type and use it instead of the semantic-free QPair. Move QPrinter getter into QPagedPainteDevice, make it return a copy rather than a pointer, and add a setter. Extend test case to cover all members and more merge cases. Fix bugs found that way. Fixes: QTBUG-88113 Change-Id: If17ea4d410d49f16b097e88b7979db5d72add820 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>