summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* PdfPageView: Add zoom-to-fit and zoom-to-width featuresShawn Rutledge2020-02-031-1/+56
| | | | | Change-Id: I40b92000a4def105d22a3bd10d0544b0b0f0fe1e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPdfDocumentPrivate::load(): check the first two pagesShawn Rutledge2020-02-031-2/+3
| | | | | | | | | | This seems to make QPdfLinkModel happy for some reason; otherwise QPdfLinkModelPrivate::update() does not succeed in getting page numbers when it calls FPDFDest_GetDestPageIndex(). Amends 9231d3444555945297857ee4aae05919083ea479 Change-Id: Iaed3301a1ab304ac9813c3b605b2f9c7465bf8e7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPdfDocument::pageSize(): add checkPageComplete()Shawn Rutledge2020-02-031-1/+1
| | | | | | | | | | | | | | | | | checkPageComplete() calls FPDFAvail_IsPageAvail(), which does some initialization that is necessary before PDFium is able to provide any information about that page. The static readImage() function in qquickpixmapcache.cpp calls QImageReader::size() before rendering, to determine the size of the image that will be read, and that ends up calling QPdfDocument::pageSize(); so it's important to "go to" that page before attempting to read its size. In summary, checkPageComplete() is the "go to page" function that must be called before any other page-specific function. Amends 9231d3444555945297857ee4aae05919083ea479 Change-Id: Idf5ba9d013b62395c284d055fbfe835fe949df79 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* doc: add QPdfDocumentRenderOptions::scaledClipRect and scaledSizeShawn Rutledge2020-02-031-0/+34
| | | | | | | Amends 4f5f0705bc161ff95899fdb2c5fcdb4581bf15bb. Change-Id: I62563f5be367e8139dc4cdf12866c65f55a576b5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Add information about building the module with CMakeLeena Miettinen2020-02-033-2/+10
| | | | | | | | Task-number: QTBUG-81560 Change-Id: I9d75606634da4c604f34913908f97a91797d1813 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add PdfLinkModelShawn Rutledge2020-01-3011-0/+702
| | | | | | | | | | | | Internal links and web links populate the QALM, which can then be used to drive a Repeater to position highlight rectangles with TapHandlers, which will handle a click by jumping to the link destination. Fixes: QTBUG-77511 Change-Id: I3b5b96d6e82bfd578f31f631f24279173036a080 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add QPdfSelection and QQuickPdfSelectionShawn Rutledge2020-01-3012-0/+758
| | | | | | | | So now you can select text by mouse-drag and copy it to the clipboard. Task-number: QTBUG-77509 Change-Id: I689ee4158974de8bc541c319a5a5cc2f8f3c2ae6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* QPdfDocument and QPdfIOHandler: add scale and clip featuresShawn Rutledge2020-01-303-5/+51
| | | | | | | | Like some other image plugins, the PDF plugin now supports ImageOption::ScaledClipRect and ScaledSize. Change-Id: Ie7278752e49c885cc4580f30af1ec5e6310f8334 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* doc: rename QML type Document -> PdfDocumentShawn Rutledge2020-01-301-17/+17
| | | | | | | | | I would prefer to use the "import as" mechanism to allow the user to customize prefixes rather than hard-coding them, actually; but currently every QML type in the QtPDF module has a hard-coded Pdf prefix. Change-Id: I4c00e7891c58e028280599d6089a821b9e285c1a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Add dependency to the Qt Quick module to fix QDoc warningsLeena Miettinen2020-01-281-1/+2
| | | | | Change-Id: Ia56a07bc2d53bd4a2166566a9c95126a5d2f9154 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add docs for the Qt PDF Viewer exampleLeena Miettinen2020-01-283-1/+45
| | | | | | Task-number: QTBUG-81560 Change-Id: I159747a097a6a6a28c2355e8ff6b6c59a4f3a29a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPdfDocument: check first page in load(), current page in render()Shawn Rutledge2020-01-272-2/+48
| | | | | | | | | | | | When a viewer application is opened with a book-sized PDF, there's no need to check hundreds of pages before we can render the first page. Using it in QPdfIOHandler is even worse because this check needs to be repeated each time we advance from one page to the next. But we do need to ensure that the page we want to render is available. Amends 945840bd067d9ca3179a667f48b451cc2087931b Change-Id: Ib6576b1b91c63c2b57893d14b05632eff8cc4a15 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add missing check when doing qpdf buildMichal Klocek2020-01-271-1/+1
| | | | | | | We need this, since 5.15 branch adds webrtc check. Change-Id: I40b63bf38ed57562562305d34f9f5ce96dec31dd Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Do not share pdf features with webengine-coreMichal Klocek2020-01-275-42/+41
| | | | | | | | The pdfium build for qtwebengine should not use features set for qtpdf. Change-Id: Ibee97b774dda7e9157cadf28aa4a7a862bcba8ed Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Doc: Add periods to the ends of \brief commandsLeena Miettinen2020-01-242-7/+7
| | | | | | | Qdoc no longer adds them automatically. Change-Id: I83463038a515ed7e731795a9a63b3ba48a7c8c94 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Doc: Document the \a mode parameter to fix a QDoc warningLeena Miettinen2020-01-241-1/+1
| | | | | Change-Id: Ic6f66d36ab742cebaf7a1425419e3d2a56f9e56f Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add rotation actions to the QML pdf viewer exampleShawn Rutledge2020-01-231-1/+0
| | | | | | Task-number: QTBUG-77514 Change-Id: Ifa7515dae18b278e038c2e5fad46492ca158b044 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add QPdfSearchModel, QML PdfSearchModel and PdfPageViewShawn Rutledge2020-01-2313-5/+698
| | | | | | | | | | | | | | | | 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>
* Doc: Add QML types from the Qt Quick PDF module to the doc configLeena Miettinen2020-01-222-5/+21
| | | | | | | | | Also add examples, even though the example docs have not been added yet. Task-number: QTBUG-81560 Change-Id: I9ada8e658359788421eda209fffe1eaed967318c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Add QtQuick.Pdf module with QQuickPdfDocument; manual testsShawn Rutledge2020-01-219-5/+514
| | | | | | | | | QQuickPdfDocument is a wrapper for QPdfDocument providing appropriate QML API. Task-number: QTBUG-77506 Change-Id: Ifa2ef50d3d31179f1955c2f673495e727b962bd1 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add fat lib build support on iosMichal Klocek2020-01-172-19/+32
| | | | | | | | | Fat builds disable NEON for arm, therefore when doing release setting CONFIG-=simulator is preferable. Task-number: QTBUG-77931 Change-Id: I59c99f2a38dbc83d15940a691c17277175b5b935 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add support for qtpdf ios buildsMichal Klocek2020-01-173-0/+67
| | | | | | | | | | Fix platform checks, add initial gn args, use shared library template for gn to get all the linker objects. This is just debug build. Task-number: QTBUG-77931 Change-Id: I9b3f7d3440aec66433ed19f4976e14506fba45dd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Factor out qtpdf-support out of core-supportMichal Klocek2020-01-173-10/+41
| | | | | | | | Make static builds available for ios. Task-number: QTBUG-77931 Change-Id: Id122190f51f03f782fd0ee1c897e5b4ff891f703 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* FIXUP: fix broken rebase of configure.jsonMichal Klocek2020-01-171-23/+0
| | | | | | | Remove duplicated features. Change-Id: I0dafd6ae0a5d545d2fed12044499d891c84f80bd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix compilation on windowsMichal Klocek2020-01-171-1/+1
| | | | | | | | Since 5f9e2f01e we check for spellchecker on windows. Add missing build support check. Change-Id: Id53276f6e4e4260832c57181f05822fff274dd04 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Update 3rdpartyMichal Klocek2020-01-171-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pulls in following patches: * 7e3ec623081 [Backport] Fix for CVE-2019-13720 * 59d24cbd63e Fix QRC cookies for tests with network-service * 42c122dcb80 Fix Windows sandbox for heterogeneous executables * 4d310ae5bc3 [Backport] CVE-2019-13700 * d9cbe788437 [Backport] CVE-2019-13701 * 30dfb122e96 [Backport] CVE-2019-13704 * 51fdc9e9dc6 [Backport] CVE-2019-13706 * 9ea3feb658c [Backport] CVE-2019-13711 1/2 * 6ab99196115 [Backport] CVE-2019-13711 2/2 * 394da2e8dd7 [Backport] CVE-2019-15903 * 929d812ae1d [Backport] CVE-2019-13714 * 6c31ac36355 [Backport] CVE-2019-13715 * bf4615cbfa1 [Backport] CVE-2019-13718 * 35fb44f1bdc [macOS] Fix build error with new deployment target * 03e611b862a Revert "[Backport] CVE-2019-13701" * 948c21d2163 Support GPU service on UI thread with viz * 147452f856e Fix previous fix for new macOS deployment target * 77c86be6077 BASELINE: Update Chromium to 77.0.3865.129 * cf3564f25ee FIXUP: Support GPU service on UI thread with viz * 040ccbbef2d Fix pdfium build on macOS * cbc9c4a3c8d Merge remote-tracking branch 'origin/upstream-master' into 77-based * 1d9d75d072e Fix '/Zc:twoPahse' unknown compiler option warning * 55c0556c1ca [Backport] Security Bug 1003313 * d5f6e269885 [Backport] CVE-2019-13721 * c1fd5c47504 [Backport] Security bug 1011551 * e9b6a6d0cf9 [Backport] Secuirty bug 1006544 * 8a477bb16f9 [Backport] Security bug 997401 * 6ed410d94fc [Backport] Security bug 995591 * ccde4d23e60 [Backport] Security bug 993266 * 8564d6c04aa [Backport] Security bug 989909 * 6f690b4418f Merge "Merge remote-tracking branch 'origin/upstream-master' into 77-based" into 77-based * d61464c1e69 Fix is_main_frame in intercept_navigation_throttle * 41d6b0b2f16 [Backport] Secuirty bug 1014607 * e751f134d6b [Backport] Security bug 1016450 * 5b40e1d793e [Backport] Security bug 1018406 * 7d2876b9557 Fix url_utils for QtWebEngine * bfea09e6e17 FIXUP: Add net::URLRequest::first_party_url() * 0d4406b3688 [Backport] Security bug 961614 1/8 * b1a56dab182 [Backport] Security bug 961614 2/8 * b9718cd4aa0 [Backport] Security bug 961614 3/8 * 821f375089e [Backport] Security bug 961614 4/8 * ee18fd483a7 [Backport] Security bug 961614 5/8 * 105f1e578c3 [Backport] Security bug 961614 6/8 * 09050e17c6a [Backport] Security bug 961614 7/8 * 634aff72b47 [Backport] Security bug 961614 8/8 * c5eb4cfff7f [Backport] Security bug 775511 * 120ccb55b5c [Backport] Security bug 1015945 * 939daf833ff [Backport] Security bug 955191 * c7bb975f833 Fix manifests for extensions * cfab9198a99 BASELINE: Update GN * 88050fc712d Fix rebuilding of about resources every time * 4a0ac259d12 third_party quiche: add missing include for iostate * 819bf79725a [Backport] Set priority for requests whose load is emulated * db19ca9c53c Fix FlingScheduler in viz mode * dd8389c580c FIXUP: Fix manifests for extensions * f473e040f8f Merge remote-tracking branch 'origin/upstream-master' into 77-based * 325f3b07a56 Fix 32bit sandboxing on Windows * dc1226a13d9 Disable dumb code * 8da0a5162d1 Downgrade ninja to 1.8.2 * cc309aa8518 [Backport] Avoid leaking GamepadService in tests * b7e2744f519 [Backport] Fix for CVE-2019-13727 * 85d5ec666bd Reland [Backport] CVE-2019-13701 * 114a6d752f1 [Backport] Fix for CVE-2019-13730: Type Confusion in V8 * ad6efac8e5b [Backport] Fix for CVE-2019-13732: Use after free in WebAudio * 446eda0fc43 [Backport] Fix for CVE-2019-13764: Type Confusion in V8 * 13e4a6f608c [Backport] CVE-2019-13734: Out of bounds write in SQLite * 7d9eea8e630 [Backport] Security bug 1017020 * 3d5ac733f8b [Backport] Security bug 1017961 * 945f5405f3e [Backport] CVE-2019-13736 * 3299cadf406 [Backport] CVE-2019-13737 * b7034d08035 Add icudtl for ios build * 9130540796e Merge remote-tracking branch 'origin/upstream-master' into 77-based * 9720a8a9863 [Backport] CVE-2020-6377 * 253d8a0fa71 [Backport] CVE-2019-13728: Out of bounds write in V8 * def05352967 [Backport] Re-land: Only invoke text and element fragment anchors after layout. * 73ef65b5273 [Backport] CVE-2019-13741: Insufficient validation of untrusted input in Blink * f49943cf837 [Backport] CVE-2019-13762: Insufficient policy enforcement in downloads. * 5357f8ae628 [Backport] CVE-2019-13758: Insufficient policy enforcement in navigation. * 5ca9a877b4b [Backport] CVE-2019-13761: Incorrect security UI in Omnibox. * 545b591cee6 [Backport] Security bug 1027905 * 9e44d0450c1 [Backport] CVE-2019-13747: Uninitialized Use in rendering. * f32f09593b6 [Backport] Security bug 1025089 * 684a48706ad [Backport] Security bug 1016703 * ee0ec6e55f0 [Backport] CVE-2019-13757: Incorrect security UI in Omnibox (1/2) * d5651e21821 [Backport] CVE-2019-13757: Incorrect security UI in Omnibox (2/2) * 05833b160db [Backport] CVE-2019-13739 * 5e753a5b1d7 [Backport] CVE-2019-13738 * c68e3faa08f [Backport] CVE-2019-13735: Out of bounds write in V8 * c0a7f013646 [Backport] CVE-2019-13754: Insufficient policy enforcement in extensions. (1/3) * 11f1bad3655 [Backport] CVE-2019-13754: Insufficient policy enforcement in extensions (2/3) * 9df23a4c06e [Backport] CVE-2019-13754: Insufficient policy enforcement in extensions. (3/3) * fd8cf772447 [Backport] Security bug 1028191 * 8417e835260 [Backport] Security bug 974375 * 046bd9f50b6 [Backport] Security bug 889276 * 5fc987f210c [Backport] Security bug 1033260 * 9f87a1ede7c [Backport] CVE-2019-13755: Insufficient policy enforcement in extensions. * cb8bce9edb2 Fix compile issues for ios * fb54428bc4c Fix crash on page allocator * e687bc69cdc Fix properly not working about_credits target * 41d474d0e7c [Backport] CVE-2019-13745 1/2 * 6cd2b35a453 [Backport] CVE-2019-13746 1/2 * e89fce7cfa3 [Backport] CVE-2019-13746 2/2 * b7ce677ea5c [Backport] CVE-2019-13745 2/2 * ca751a77e45 Add fat build support Change-Id: I080325c412abfc4b81ea8bde4b78381bdde1d46b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Deal with unsigned data type changes in QPdfBookmarkModelShawn Rutledge2019-11-251-2/+2
| | | | | | | Pdfium API has changed slightly. Change-Id: I8f6a5b227f35fd819ac4632d1d816569978b47b0 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add configurable v8/xfa support to qtpdfMichal Klocek2019-11-252-4/+74
| | | | | | | | | | | Without v8/xfa support, compilation drops to ~650 files. Disable v8/xfa by default. Enabling v8 enables all xfa support. For example to enable full xfa support without xfa-tiff: qmake <src> -- --feature-pdf-v8 --no-feature-pdf-xfa-tiff Change-Id: I0525c22ed6ed84d5837ab9a238ef2c4219339895 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add platform and architecture checks to configure for qtpdfMichal Klocek2019-11-251-1/+8
| | | | | | | For now follow webengniecore requirements. Change-Id: I7260b593e6489f51970b1a4c9dc6cd92067a085c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add a QImageIOHandler to render PDF with QtQuick ImageShawn Rutledge2019-11-258-2/+421
| | | | | | | | | | | | | | | | | | | | | | | | Now you can use Image in QML to display the first page of a PDF file by default. (The implementation is very similar to the handler plugin in the QtSVG module.) To display other pages, you can set the new currentFrame property that is being added to Image in 5.14. QPdfIOHandler uses its own instance of QPdfDocument to do the rendering. An instance will be created each time the image needs to read a frame from the file (on creation; each time the currentFrame property is changed; each time sourceSize is changed to require a different resolution rendering). This approach is not as efficient as it would be to share the QPdfDocument instance among multiple Images that are rendering different pages at the same time, as well as sharing with the QML Document declaration that we plan to add. However, if you set asynchronous: true, each Image will render its page from the PDF in its own thread. PDFium is not thread-safe, so sharing the QPdfDocument among multiple threads is not safe. It may be possible to make it safe by having a dedicated PDF-rendering thread, but that is not yet done in this patch. Change-Id: I7a1f8cd7bd5b8f93d45fa9350752b2d9356b04fe Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Doc: Add index and module files for Qt PDF module and fix header pathLeena Miettinen2019-11-254-1/+150
| | | | | | Change-Id: I6c8dbc3c8d5c8638d7098ab1d4f2999a4c2e6042 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix sync script warningMichal Klocek2019-11-251-0/+11
| | | | | | | Add missing "We mean it." Change-Id: Ib5efa6829148fcb1f58a252a839386067ffbf8a6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add QtPdf and QtPdfWidgets modulesMichal Klocek2019-11-2524-83/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Initial import of qtpdf source codeMichal Klocek2019-11-252-202/+0
| | | | | | | | | | | | | | | 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>
* Allow compile with gcc-4.8.5Martin Koller2019-11-251-1/+1
| | | | | | Change-Id: Ia3953e0318a97eabfd917dbefef3bbac65828287 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Add missing includes (compile on debian failed)Martin Koller2019-11-251-0/+2
| | | | | Change-Id: I96c81d486050aa2e5c6990ee4abbda070f1235e7 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Add qdocconf for the QtPdf moduleTobias Koenig2019-11-252-0/+42
| | | | | Change-Id: I4fdd53098c32394dbeef58f49b511453079045f9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix documentation of QPdfDocument classTobias Koenig2019-11-251-9/+16
| | | | | Change-Id: I8bc6327e86c4381966da759cbe6295b327c4d808 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add initial version of QPdfView classTobias Koenig2019-11-255-0/+805
| | | | | | Change-Id: I9185320d8a4e725fdbbfe1fde205a2be3bc2113c Task-number: QTBUG-28886 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Add QPdfPageRenderer classTobias Koenig2019-11-254-1/+455
| | | | | | | | | | 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>
* Add QPdfPageNavigation classTobias Koenig2019-11-253-1/+409
| | | | | | | | | | | | 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>
* Add support for render rotation and flagsTobias Koenig2019-11-257-6/+389
| | | | | | | | | Extend the QPdfDocument::render() method with a parameter of new type QPdfDocumentRenderOptions to specify the rotation and additional render flags. Change-Id: I354acc7fad4d094a96cefcea4dfa3513f4955c47 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix emission of QPdfDocument::pageCountChanged signalTobias Koenig2019-11-253-9/+18
| | | | | | | | 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>
* Remove superfluous 'Q' prefix from module nameTobias Koenig2019-11-251-1/+1
| | | | | | | | The name should be QtPdf and not QtQPdf, to be consistent with the other Qt module names. Change-Id: I7844683ff55aab1d9720e81edcd84b57ed335a40 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Make QPdfBookmarkModel usable for QMLTobias Koenig2019-11-252-0/+12
| | | | | | | | Add roleNames() method to provide proper role names when used from within QML. Change-Id: I0ac7e5897edd5f60464c3d99a1eaef85feb56a5e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add 'PageNumberRole' to QPdfBookmarkModelTobias Koenig2019-11-252-2/+20
| | | | | | | | Provide the referenced page of an bookmark entry through a model role. Change-Id: Ia1657d75acf0128389ef0de896b242b4e8df87fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* change the license to LGPLv3 (with the commercial option)Shawn Rutledge2019-11-257-35/+140
| | | | | | Change-Id: I2caed38ece8067ecdad877dcc278f7828a3cb0bb Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* replace relative directory paths to permit shadow buildsShawn Rutledge2019-11-252-7/+7
| | | | | | Change-Id: Ibf5bcb6671313e175a50a0caf452c747562da830 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* replace Q_NULLPTR and Q_DECL_OVERRIDEShawn Rutledge2019-11-253-13/+13
| | | | | Change-Id: Icf33776f70bdde71f320de0a129361ac28fd18c8 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
* Fix loading of large PDF documentsTobias Koenig2019-11-251-2/+8
| | | | | | | | Call FPDFAvail_IsPageAvail multiple times and check return value, otherwise the page won't be loaded completely. Change-Id: I9a6de3443eec6819be9b6eaa2a5b054329da4f80 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>