fix: Update getHtmlToPdfPath for Qt version compatibility and include cmath in XpsDocument#189
Merged
lzwind merged 2 commits intolinuxdeepin:masterfrom Sep 4, 2025
Merged
Conversation
… cmath in XpsDocument - Updated getHtmlToPdfPath() to use conditional compilation for Qt version compatibility. - Included <cmath> in XpsDocument.cpp for mathematical operations.
|
TAG Bot TAG: 6.5.37 |
- update version to 6.5.37 log: update version to 6.5.37
8d51376 to
8a359bb
Compare
deepin pr auto review根据提供的git diff,我将对代码进行审查,并提出以下改进建议: 1. 版本更新
2. getHtmlToPdfPath函数改进 (reader/document/Model.cpp)#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优点:
改进建议:
path = QLibraryInfo::path(QLibraryInfo::LibrariesPath)
+ QDir::separator()
+ "deepin-reader"
+ QDir::separator()
+ "htmltopdf";
if (path.isEmpty()) {
qWarning() << "Failed to get htmltopdf path";
return QString();
}3. XpsDocument.cpp改进#include <cmath>改进建议:
4. changelog记录改进建议:
5. 整体建议
6. 安全性考虑
总的来说,这次更新主要关注了Qt版本兼容性和依赖头文件的添加,这些都是良好的实践。建议在后续开发中继续保持对代码质量和安全性的关注。 |
lzwind
approved these changes
Sep 4, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This was referenced Sep 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: Update getHtmlToPdfPath for Qt version compatibility and include cmath in XpsDocument