summaryrefslogtreecommitdiffstats
path: root/src/pdfquick
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-10-07 17:38:05 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-10-07 17:44:32 +0300
commit183d0101f41fd5a1007708a9416d1f12db31c1cb (patch)
tree969a5e91aef3b4c6805331e56c24fa6be8738f6b /src/pdfquick
parent17e9f29577ea6573c7c348083ff510ee60c7e8cc (diff)
parent13381ca9e80578d038835c8a4dc609d75dfdec4c (diff)
Merge tag 'v6.2.10-lts' into tqtc/lts-6.2-opensourcev6.2.10-lts-lgpl6.2.10
Qt 6.2.10-lts release Conflicts solved: CHROMIUM_VERSION dependencies.yaml src/core/web_engine_context.cpp Change-Id: Ia54316ba0df3488d8e13c8f14fead1d90099519b
Diffstat (limited to 'src/pdfquick')
-rw-r--r--src/pdfquick/PdfMultiPageView.qml13
-rw-r--r--src/pdfquick/doc/src/qtquickpdf-module.qdoc4
-rw-r--r--src/pdfquick/qquickpdfdocument.cpp5
3 files changed, 9 insertions, 13 deletions
diff --git a/src/pdfquick/PdfMultiPageView.qml b/src/pdfquick/PdfMultiPageView.qml
index 0f62a229d..10683f55d 100644
--- a/src/pdfquick/PdfMultiPageView.qml
+++ b/src/pdfquick/PdfMultiPageView.qml
@@ -298,14 +298,7 @@ Item {
property point jumpLocationMargin: Qt.point(10, 10) // px away from viewport edges
anchors.fill: parent
anchors.leftMargin: 2
- model: modelInUse && root.document ? root.document.pageCount : 0
- // workaround to make TableView do scheduleRebuildTable(RebuildOption::All) in cases when forceLayout() doesn't
- property bool modelInUse: true
- function rebuild() {
- modelInUse = false
- modelInUse = true
- }
- // end workaround
+ model: root.document ? root.document.pageCount : 0
rowSpacing: 6
property real rotationNorm: Math.round((360 + (root.pageRotation % 360)) % 360)
property bool rot90: rotationNorm == 90 || rotationNorm == 270
@@ -528,8 +521,8 @@ Item {
// and don't force layout either, because positionViewAtCell() will do that
if (pageNavigator.jumping)
return
- // make TableView rebuild from scratch, because otherwise it doesn't know the delegates are changing size
- tableView.rebuild()
+ // page size changed: TableView needs to redo layout to avoid overlapping delegates or gaps between them
+ tableView.forceLayout()
const cell = tableView.cellAtPos(root.width / 2, root.height / 2)
const currentItem = tableView.itemAtCell(cell)
if (currentItem) {
diff --git a/src/pdfquick/doc/src/qtquickpdf-module.qdoc b/src/pdfquick/doc/src/qtquickpdf-module.qdoc
index 1d31f6148..a4ca0d9e8 100644
--- a/src/pdfquick/doc/src/qtquickpdf-module.qdoc
+++ b/src/pdfquick/doc/src/qtquickpdf-module.qdoc
@@ -12,7 +12,7 @@
To use the types in this module, import the module with the following line:
- \code
+ \qml
import QtQuick.Pdf
- \endcode
+ \endqml
*/
diff --git a/src/pdfquick/qquickpdfdocument.cpp b/src/pdfquick/qquickpdfdocument.cpp
index 492c320d6..a9f0d196e 100644
--- a/src/pdfquick/qquickpdfdocument.cpp
+++ b/src/pdfquick/qquickpdfdocument.cpp
@@ -36,7 +36,10 @@ QQuickPdfDocument::QQuickPdfDocument(QObject *parent)
/*!
\internal
*/
-QQuickPdfDocument::~QQuickPdfDocument() = default;
+QQuickPdfDocument::~QQuickPdfDocument()
+{
+ delete m_carrierFile;
+};
void QQuickPdfDocument::classBegin()
{