From 62db4965e7d3cbc86d5e13dfdd734ea758d99ef9 Mon Sep 17 00:00:00 2001 From: dengzhongyuan Date: Thu, 4 Sep 2025 16:55:59 +0800 Subject: [PATCH 1/2] fix: Update getHtmlToPdfPath for Qt version compatibility and include cmath in XpsDocument - Updated getHtmlToPdfPath() to use conditional compilation for Qt version compatibility. - Included in XpsDocument.cpp for mathematical operations. --- reader/document/Model.cpp | 6 +++++- reader/document/XpsDocument.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/reader/document/Model.cpp b/reader/document/Model.cpp index c75463cc..18477cc2 100755 --- a/reader/document/Model.cpp +++ b/reader/document/Model.cpp @@ -29,8 +29,12 @@ QString getHtmlToPdfPath() { qDebug() << "Found htmltopdf in INSTALL_PREFIX: " << path; return path; } - +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) path = QLibraryInfo::path(QLibraryInfo::LibrariesPath) + "/deepin-reader/htmltopdf"; +#else + path = QLibraryInfo::location(QLibraryInfo::LibrariesPath) + "/deepin-reader/htmltopdf"; +#endif + if (QFile::exists(path)) { qDebug() << "Found htmltopdf in LibrariesPath: " << path; return path; diff --git a/reader/document/XpsDocument.cpp b/reader/document/XpsDocument.cpp index 719d585d..cdadba5e 100644 --- a/reader/document/XpsDocument.cpp +++ b/reader/document/XpsDocument.cpp @@ -20,7 +20,7 @@ #include #include #include - +#include namespace deepin_reader { XpsPage::XpsPage(const XpsPageData &pageData, QMutex *mutex) From 8a359bb4266eed8faee882b09e7737ae347e7e28 Mon Sep 17 00:00:00 2001 From: dengzhongyuan Date: Thu, 4 Sep 2025 16:56:29 +0800 Subject: [PATCH 2/2] chore: Update version to 6.5.37 - update version to 6.5.37 log: update version to 6.5.37 --- arm64/linglong.yaml | 2 +- debian/changelog | 6 ++++++ linglong.yaml | 2 +- loong64/linglong.yaml | 2 +- reader/document/Model.cpp | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/arm64/linglong.yaml b/arm64/linglong.yaml index 43747931..a183e4f9 100644 --- a/arm64/linglong.yaml +++ b/arm64/linglong.yaml @@ -7,7 +7,7 @@ version: "1" package: id: org.deepin.reader name: "deepin-reader" - version: 6.5.36.1 + version: 6.5.37.1 kind: app description: | reader for deepin os. diff --git a/debian/changelog b/debian/changelog index c9c24b43..349984e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +deepin-reader (6.5.37) unstable; urgency=medium + + * fix: Update getHtmlToPdfPath for Qt version compatibility and include cmath in XpsDocument + + -- dengzhongyuan Thu, 04 Sep 2025 16:56:23 +0800 + deepin-reader (6.5.36) unstable; urgency=medium * bug: Add dynamic path resolution for htmltopdf diff --git a/linglong.yaml b/linglong.yaml index 1e3198e8..300ad524 100644 --- a/linglong.yaml +++ b/linglong.yaml @@ -7,7 +7,7 @@ version: "1" package: id: org.deepin.reader name: "deepin-reader" - version: 6.5.36.1 + version: 6.5.37.1 kind: app description: | reader for deepin os. diff --git a/loong64/linglong.yaml b/loong64/linglong.yaml index 83102784..aeed5409 100755 --- a/loong64/linglong.yaml +++ b/loong64/linglong.yaml @@ -7,7 +7,7 @@ version: "1" package: id: org.deepin.reader name: "deepin-reader" - version: 6.5.36.1 + version: 6.5.37.1 kind: app description: | reader for deepin os. diff --git a/reader/document/Model.cpp b/reader/document/Model.cpp index 18477cc2..78ca6236 100755 --- a/reader/document/Model.cpp +++ b/reader/document/Model.cpp @@ -29,7 +29,7 @@ QString getHtmlToPdfPath() { qDebug() << "Found htmltopdf in INSTALL_PREFIX: " << path; return path; } -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) +#if (QT_VERSION > QT_VERSION_CHECK(6, 0, 0)) path = QLibraryInfo::path(QLibraryInfo::LibrariesPath) + "/deepin-reader/htmltopdf"; #else path = QLibraryInfo::location(QLibraryInfo::LibrariesPath) + "/deepin-reader/htmltopdf";