diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-02-05 15:53:57 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-02-11 08:29:28 +0100 |
commit | 09a6eac4a63b32548ecc1ff5b16a5d8fc3ba1c04 (patch) | |
tree | 924c615feb59f8d3372886ec53121b05b1701d28 /src/pdf/qpdfdocument.cpp | |
parent | 25a371caa376c513f22d5c01e425a18629657fdc (diff) |
Add QPdfDestination; NavigationStack stores page, location and zoom
Push/back/forward behavior seems more correct now, but still no
autotest yet.
QPdfDestination might be useful to represent locations of search results,
for link destinations and maybe named destinations too.
Fixes: QTBUG-77512
Change-Id: I113b2c535a2cd302106e6546104c64e12985d387
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/pdf/qpdfdocument.cpp')
-rw-r--r-- | src/pdf/qpdfdocument.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pdf/qpdfdocument.cpp b/src/pdf/qpdfdocument.cpp index 3719938a2..42cd2492d 100644 --- a/src/pdf/qpdfdocument.cpp +++ b/src/pdf/qpdfdocument.cpp @@ -345,6 +345,9 @@ void QPdfDocumentPrivate::checkComplete() bool QPdfDocumentPrivate::checkPageComplete(int page) { + if (page < 0 || page >= pageCount) + return false; + if (loadComplete) return true; |