| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QPdfPageNavigator did not emit the page history signals when pages were
jumped.
This patch ensures correct signal emission in all cases.
It adds a new auto test class for QPdfPageNavigator.
Fixes: QTBUG-112614
Pick-to: 6.5 6.2
Change-Id: I67af5a4d22a8e76b9c12c72c168fa5b3b4390f2c
Reviewed-by: Yigit Akcay <yigit.akcay@qt.io>
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Make cmake aware of test data, this will make data
deployable on android.
Task-number: QTBUG-83459
Change-Id: Id4271f54f8351e955a6ee57c3a36656d69a2a682
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
| |
QTimeZone now packages Qt::TimeSpec details, unifying QDateTime APIs.
Task-number: QTBUG-108199
Change-Id: I62d9837fac01b5d95e9fd0cff034cb450854c9e7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to
handle typedefs and accesses through pointers, too:
const std::string o = "object";
auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); };
auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) {
auto exprOfDeclaredType = [&](auto decl) {
return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o);
};
return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))));
};
auto renameMethod = [&] (ArrayRef<StringRef> classes,
StringRef from, StringRef to) {
return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)),
callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))),
changeTo(cat(access(o, cat(to)), "()")),
cat("use '", to, "' instead of '", from, "'"));
};
renameMethod(<classes>, "count", "size");
renameMethod(<classes>, "length", "size");
a.k.a qt-port-to-std-compatible-api V4 with config Scope: 'Container'.
Change-Id: I3e6fef8eca212da0c4f0b464545ba96183b4476f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Use name for temporary file otherwise is can not be
opened on qemu.
Task-number: QTBUG-105342
Pick-to: 6.4 6.3
Change-Id: I7f9ed244c32b866ead6832ed942e2293be24811b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-105718
Change-Id: I2ad190e5536cdbdc8d2656e61892545d66911a02
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
| |
Change-Id: I31bd3dd7d7be0f32b999b3874cc996815758c146
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Existing copyright statements remain intact
Task-number: QTBUG-88621
Change-Id: I118bd63694cfe2c9a413af4a38828a31727f8e86
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
This API is available for both C++ and QML.
The pageModel makes it easier to populate item-views with per-page
information, such as thumbnails labeled with page labels.
Fixes: QTBUG-102271
Change-Id: I70df481b378efed0327e7bb89a63c7669daecc70
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Give them unique labels. This was done with pdftk:
$ pdftk resources/test.pdf update_info_utf8 update output test.pdf
where the file "update" contains
PageLabelBegin
PageLabelNewIndex: 1
PageLabelStart: 1
PageLabelPrefix: Qt
PageLabelNumStyle: NoNumber
PageLabelBegin
PageLabelNewIndex: 2
PageLabelStart: 1
PageLabelNumStyle: DecimalArabicNumerals
PageLabelBegin
PageLabelNewIndex: 3
PageLabelStart: 1
PageLabelNumStyle: LowercaseRomanNumerals
The instructions to do this came from
https://emacs.stackexchange.com/questions/58315/edit-pdf-page-labels-in-pdf-tools
Task-number: QTBUG-102271
Change-Id: I97df7ca538690baf3329fcbef371dcd92c4d8966
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This might reduce some confusion about the fact that the back/forward
"stack" isn't strictly a stack in the data structure sense: it's more
like QUndoStack. It causes a QML source incompatibility relative to
Qt 5, but keeps the C++ class name the same as it has been in QtPdf for
a long time. Amends 3ad445f9f24a9d3f259ed1781460a63346a728e4
[ChangeLog][QtPDF] The PdfNavigationStack QML type has been renamed to
PdfPageNavigator, matching the C++ type QPdfPageNavigator. These
remember navigation history within a document, and are helpful to
implement back/forward buttons similar to those on a web browser
in both Qt Quick and widget-based viewer applications.
Change-Id: Id8dc17aa416bb7064b1f0f300a47c07c83b7f47e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Bookmarks are naturally a tree. It's unusual for a QAIM to have the
internal ability to flatten a tree to a list, and we don't need it in
any of our viewers or examples. This patch could be reverted if it turns
out that anybody misses this feature; or else flattening could be done
in a proxy model.
Change-Id: I5cf60a39cb699932cc7c61e33a5129323d648344
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I6335c1b13ef50dc04d50bd1ce66b3524e2615b3f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: Iad3f8da130abe86a464d63323920a2a39d6fa955
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: Ife034dc0578268c1bed660bbacc163f393a50c29
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
We need them for more accurate navigation.
Switch to initializing BookmarkNode's variables where declared,
while we're at it.
Task-number: QTBUG-77510
Change-Id: Ia6762c9b6336c9148a85ad782e71e5b59feab754
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
- link, search and bookmark models have similar role names now
- being an enum class allows the role name to be shorter
- the Role enum name is the same as the name in roleNames(), lowercased
Change-Id: I2e710d7acb8479995d82ef2d324807b6cd4e10e5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQuickPdfNavigationStack was implemented independently until now, but
users will need the same functionality in widget-based PDF viewers.
QPdfPageNavigation on the other hand may have eventually had the same
aspiration, but was just a glorified up/down counter thus far, with
questionable API; so we get rid of it, and make the API for page
navigation as much the same as possible between Quick and Widgets.
We rename push() to jump() along with removing the emitJumped argument.
Now jump() always emits (so we have to be more careful when to call it).
Change-Id: Icb07158a351e29b81e58ec037cd323bc0f54a1a1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... as part of tst_QPdfDocument.
The smaller QtPdf classes should probably all have their own
tests. The existing tests are far from being sufficient.
Pick-to: 6.3
Change-Id: I01ff2b7abbdbe43ee596d682c256001539fde1bf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3
instead of LICENSES.LGPL3. For the examples, use BSD.
Change-Id: I1fae49110160c1183327ec54c9dc447c69588a65
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: Ibad2e50d840a2eb0ccb9ac65158e512249a2bc79
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Port QtPdf to Qt6:
* QtPdf,QtPdfWidgets,QtPdfQuick libs
* QtPdfQuickPlugin, QtPdfPlugin (imageformat) plugins
* widget and quick examples
* qtpdf tests
To fit gn cmake integration and new repo layout code is a bit
reshuffled.
Compared to qmke build following features are not ported yet:
* ios fat libs
* qtbase 3rdparty static dependencies
WebEngine build can be skipped with setting
QT_FEATURE_qtwebengine_build=OFF
Note this patch needs follow up for 6.2 branch to disable qtpdf
builds by default, since this should not part of qt 6.2 release.
Pick-to: 6.2
Task-number: QTBUG-95353
Change-Id: I4dd9f3934bdd478fb6d2fa686074a24d91f09953
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-84469
Change-Id: I666a060351f73783e15e3f96884c9393a5cd7e46
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
| |
Avoid having the enum name in the enum values.
Change-Id: Ida5b3405e6922eb1a2a37edc6fb650019254f4d4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables searching a PDF for a text string and getting the
boundaries of the areas where it is found. The boundaries are returned
as polygons intended to be rendered with PathMultiline.
PdfPageView is a QML component intended to be a drop-in viewer for use
in applications that need the most common PDF viewing functionality.
More advanced applications are free to use it as a starting point for
customization.
Task-number: QTBUG-77507
Task-number: QTBUG-77514
Change-Id: Id08ac30224e41b6cdfb9300cc4288d5750259f78
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: Ifdac9ae6b216605166cefc9dbab60f5ab4b1dcbf
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds two new modules to qtwebengine repository.
New modules do not depend on webengine module, however webengine
chromium source code and Chromium "gn" configuration is
required to build QtPdf.
Adding two unrelated modules to webengine might look crazy:
however sharing gn build configuration and Chromium code base
with necessary qt adaptations simplifies code maintenance and
minimises required code checkouts. Back porting of security
patches for Chromium also affects Pdfium. Moreover, Pdfium is no
longer a separate project, but integrated into Chromium:
therefore moving it out of Chromium source tree would require
extra effort.
Rename webengine-core feature to build-qtwebengine-core, this
makes consistent feature naming with build-qtpdf
At the moment two new modules have integrated build, with possible
shortcuts:
qmake -- --no-build-qtwebengine-core
qmake -- --no-build-qtpdf
Webengine build is disabled by default now.
Change-Id: Iac3d9927d51f3ac316db0148d275eda843dcc19b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code has been imported from git://code.qt.io/qt-labs/qtpdf to
src/pdf, src/pdfwidgets, examples/pdfwidgets and tests/auto/pdf.
Some git revision history was rewritten to remove conflicting files
like src.pro, examples.pro, tests.pro, .gitingnore, .gitmodules,
sync.profile, .qmake.conf, 3rdparty
Removed unneeded leftovers after import.
Change-Id: Ifc1e02828adfefe8db68d596cd2cb238de22408b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The QPdfPageRenderer renders a page of a QPdfDocument for a given
zoom factor. Depending on its render mode, it does the rendering
in the UI thread or a worker thread. Subsequent requests are queued
and processed in order.
Change-Id: I95820cd318cb443b2572f6d3db5a0bee53939bd1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QPdfPageNavigation class encapsulates the logic of navigating
inside a QPdfDocument. It has the notion of a 'current' page and
provides slots to navigate to the previous/next page or jump
directly to a given page.
Additionally it provides properties to indicate whether there is
a previous or next page, relative to the current one.
Change-Id: I053f3c49ab4a70b2610b64d96d2c274c3d0f629b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
|
|
|
|
|
|
|
| |
Emit the signal whenever the amount of pages changes on
loading/closing the document.
Change-Id: I0555a9cad93cb1f125ded19889eda91e08725592
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Provide the referenced page of an bookmark entry through a
model role.
Change-Id: Ia1657d75acf0128389ef0de896b242b4e8df87fe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
| |
Change-Id: I2caed38ece8067ecdad877dcc278f7828a3cb0bb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|
|
|
|
| |
Change-Id: I000a398d2347870916bd93b290a1ddf5023fb0ce
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Introduce a status property, which describes the current status
of the QPdfDocument during loading/closing workflow.
Change-Id: I2c095c41cfaacb4cd325682def71f80ffe6ab6d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: Ib25ae8940ff8a35627093031a82c1f25c7c940fc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
The passwordChanged() signal is emitted whenever the password
on the document is changed.
Change-Id: I8c35274dba7160b81555eac5bbda37d47cb8c9b7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
The close() method will close an open document and emit
the aboutToBeClosed() signal, so that other component, which
keep a pointer to QPdfDocument, can react to it.
Change-Id: I93200eb0b4bf96479fc114b43c9f6f2af4d15ffa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I86bd5779ae4fee7dfba0b7a2121128120dbe3a5b
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
|
|
|
|
| |
Unify the load API and implementation to always go through FPDFAvail.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|