diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-05-30 14:57:17 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-05-31 22:40:29 +0200 |
commit | e13aa3d6d5ad231afb49c428b4f75e3a62f84eff (patch) | |
tree | d78e50e6ac7ba38cf9dc24572ff95fc4004075be /src/pdfquick | |
parent | 16b529138869b24425cf96c6516b3eb1e63c0b85 (diff) | |
download | qtwebengine-e13aa3d6d5ad231afb49c428b4f75e3a62f84eff.tar.gz |
Rename QPdfDocument::pageSize() to QPdfDocument::pagePointSize()
It is in fact the size in points (1/72 of an inch), so we might as well
be consistent about the naming between QML and C++ APIs.
Change-Id: I8f8b05eeecc635a4d105558959834ae0e15add81
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/pdfquick')
-rw-r--r-- | src/pdfquick/qquickpdfdocument.cpp | 6 | ||||
-rw-r--r-- | src/pdfquick/qquickpdfdocument_p.h | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/pdfquick/qquickpdfdocument.cpp b/src/pdfquick/qquickpdfdocument.cpp index 9e870f262..543a2f532 100644 --- a/src/pdfquick/qquickpdfdocument.cpp +++ b/src/pdfquick/qquickpdfdocument.cpp @@ -177,10 +177,6 @@ QString QQuickPdfDocument::error() const Returns the size of the given \a page in points. */ -QSizeF QQuickPdfDocument::pagePointSize(int page) const -{ - return m_doc->pageSize(page); -} qreal QQuickPdfDocument::maxPageWidth() const { @@ -219,7 +215,7 @@ void QQuickPdfDocument::updateMaxPageSize() const qreal h = 0; const int count = m_doc->pageCount(); for (int i = 0; i < count; ++i) { - auto size = pagePointSize(i); + auto size = m_doc->pagePointSize(i); w = qMax(w, size.width()); h = qMax(w, size.height()); } diff --git a/src/pdfquick/qquickpdfdocument_p.h b/src/pdfquick/qquickpdfdocument_p.h index af9cab410..27a253e1a 100644 --- a/src/pdfquick/qquickpdfdocument_p.h +++ b/src/pdfquick/qquickpdfdocument_p.h @@ -107,7 +107,6 @@ public: QDateTime creationDate() { return m_doc->metaData(QPdfDocument::MetaDataField::CreationDate).toDateTime(); } QDateTime modificationDate() { return m_doc->metaData(QPdfDocument::MetaDataField::ModificationDate).toDateTime(); } - Q_INVOKABLE QSizeF pagePointSize(int page) const; qreal maxPageWidth() const; qreal maxPageHeight() const; |