summaryrefslogtreecommitdiff
path: root/src/pdfquick
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-03-14 21:57:14 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2022-03-16 14:21:27 +0100
commit90c9b79ba866b5d46c978881a937d9a4a440d4fb (patch)
tree60c453905bfdb8f9d82f965b63695f86614959ca /src/pdfquick
parent97dbda8d5ab3e02ca5ead1a077ce7fcb813b7885 (diff)
downloadqtwebengine-90c9b79ba866b5d46c978881a937d9a4a440d4fb.tar.gz
Remove PdfDocument::heightSumBeforePage
It was a workaround for missing features in Qt 5's TableView, but it's no longer needed now. Pick-to: 6.3 Change-Id: I7318c0be83a2189bd594066e36b66a5dc09a0f20 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/pdfquick')
-rw-r--r--src/pdfquick/qquickpdfdocument.cpp26
-rw-r--r--src/pdfquick/qquickpdfdocument_p.h1
2 files changed, 0 insertions, 27 deletions
diff --git a/src/pdfquick/qquickpdfdocument.cpp b/src/pdfquick/qquickpdfdocument.cpp
index bdfad3905..f2c45dd87 100644
--- a/src/pdfquick/qquickpdfdocument.cpp
+++ b/src/pdfquick/qquickpdfdocument.cpp
@@ -198,32 +198,6 @@ qreal QQuickPdfDocument::maxPageHeight() const
/*!
\internal
- \qmlmethod size PdfDocument::heightSumBeforePage(int page)
-
- Returns the sum of the heights, in points, of all sets of \a facingPages
- pages from 0 to the given \a page, exclusive.
-
- That is, if the pages were laid out end-to-end in adjacent sets of
- \a facingPages, what would be the distance in points from the top of the
- first page to the top of the given page.
-*/
-// Workaround for lack of something analogous to ListView.positionViewAtIndex() in TableView
-qreal QQuickPdfDocument::heightSumBeforePage(int page, qreal spacing, int facingPages) const
-{
- qreal ret = 0;
- for (int i = 0; i < page; i+= facingPages) {
- if (i + facingPages > page)
- break;
- qreal facingPagesHeight = 0;
- for (int j = i; j < i + facingPages; ++j)
- facingPagesHeight = qMax(facingPagesHeight, pagePointSize(j).height());
- ret += facingPagesHeight + spacing;
- }
- return ret;
-}
-
-/*!
- \internal
Returns a QPdfFile instance that can carry this document down into
QPdfIOHandler::load(QIODevice *). It should not be used for other purposes.
*/
diff --git a/src/pdfquick/qquickpdfdocument_p.h b/src/pdfquick/qquickpdfdocument_p.h
index fb7f06b97..ca5be7b16 100644
--- a/src/pdfquick/qquickpdfdocument_p.h
+++ b/src/pdfquick/qquickpdfdocument_p.h
@@ -118,7 +118,6 @@ public:
Q_INVOKABLE QSizeF pagePointSize(int page) const;
qreal maxPageWidth() const;
qreal maxPageHeight() const;
- Q_INVOKABLE qreal heightSumBeforePage(int page, qreal spacing = 0, int facingPages = 1) const;
Q_SIGNALS:
void sourceChanged();