summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* pdfviewer: Fix zooming of contentTobias Koenig2019-11-251-0/+1
| | | | | | | | Clear the page cache after zoom level has changed, otherwise the page content won't be rerendered with new zoom level. Change-Id: If374d65570c0ecce3a94d496d57a8e28dcbf8e0a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor the state handling of QPdfDocumentTobias Koenig2019-11-254-49/+198
| | | | | | | | 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>
* Reduce the critical sections of the PDF mutexTobias Koenig2019-11-251-16/+20
| | | | | | | | Guard only the FPDF_* function calls by the PDF mutex, to make the QPdfDocument kind of reentrant. Change-Id: I76d448dde2604bd258d140fe6bb667cdee9e93c9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add metaData() accessor method to QPdfDocumentShawn Rutledge2019-11-254-1/+138
| | | | | Change-Id: Ib25ae8940ff8a35627093031a82c1f25c7c940fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add passwordChanged() signal to QPdfDocumentTobias Koenig2019-11-253-2/+43
| | | | | | | | The passwordChanged() signal is emitted whenever the password on the document is changed. Change-Id: I8c35274dba7160b81555eac5bbda37d47cb8c9b7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add close() method to QPdfDocumentTobias Koenig2019-11-253-2/+99
| | | | | | | | | 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>
* Prospective build fix for gcc 4.9.1Simon Hausmann2019-11-252-5/+2
| | | | | | | | | Avoid #error "inttypes.h has already been included before this header file, but without __STDC_FORMAT_MACROS defined." by removing PCH. The removal of PCH means we have to define NOMINMAX ourselves, as that came implicitly before that. Change-Id: Ifc4911ddcf6bfab17c3b9853bff5b0c1d96faeb3 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
* Skip build of auto-test when print support is disabled in the Qt buildSimon Hausmann2019-11-251-1/+1
| | | | | Change-Id: I86bd5779ae4fee7dfba0b7a2121128120dbe3a5b Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
* Exclude from the QNX/iOS/Winphone/WinRT/MinGW buildSimon Hausmann2019-11-251-0/+2
| | | | | | | Upstream doesn't support these yet. Change-Id: I1f5ebf4f894aa5875fcfe29988295d1437a69ff2 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
* Add license header boilerplateSimon Hausmann2019-11-2512-0/+251
| | | | | | | Commercial until we have figured out the licensing :) Change-Id: Ibf60ca98cf04ee23928794a96ae33f87608c3236 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
* Remove stray print statementSimon Hausmann2019-11-251-1/+0
| | | | | | | I forgot to remove it with the last upstream update :) Change-Id: I215e4bda3292045c7c7416d3df57704aface2400 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Smaller coding style fixesTobias Koenig2019-11-253-24/+37
| | | | | | | | Use Q_NULLPTR and const in a couple of places and reorder includes or remove unneeded includes. Change-Id: Iba999759750424d0251be95badd06b54c41783fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update to newer FPDF upstream versionSimon Hausmann2019-11-256-70/+80
| | | | | | | | This required extending the gyp2pri "parser" to add dependencies recursively and to have really primitive condition handling for targets. Change-Id: Icd343ec2be492c0cf4cfd013bf2d4594fe7ba5c3 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
* Simplify the build system a little bitSimon Hausmann2019-11-252-10/+7
| | | | | Call gyp2pri when calling qmake through lib.pro instead of a separate build step.
* Add support for include_dirs in gyp filesSimon Hausmann2019-11-251-9/+33
|
* QScroller doesn't work unless a gesture is grabbedShawn Rutledge2019-11-251-0/+1
| | | | | | correction to 0108ecad44e04be9d0b60f4b6b7e0fceb69ea034 QScroller was working because of a subsequent patch that tried to add pinch zooming.
* pdfviewer example: page cache has a page count limitShawn Rutledge2019-11-252-0/+6
| | | | to limit memory usage
* pdfviewer example: QScroller makes kinetic flicking workShawn Rutledge2019-11-252-5/+3
|
* Fix linking on Mac OS XSimon Hausmann2019-11-251-0/+1
|
* Fix build with MSVCSimon Hausmann2019-11-251-1/+1
| | | | Q_DECL_OVERRIDE comes last in the declaration
* Fix small memory leak, don't leak the QPdfDocumentSimon Hausmann2019-11-253-8/+7
|
* Clean up the loadingSimon Hausmann2019-11-254-62/+85
| | | | Unify the load API and implementation to always go through FPDFAvail.
* pdfviewer example: PageRenderer owns document and thread. SmoothShawn Rutledge2019-11-257-140/+136
| | | | | | | PageCache renamed to PageRenderer and minimized to just being a worker thread. The UI is finally responsive, biecause the locking in QPdfDocument is isolated behind PageRenderer. ATM only renders visible pages though.
* pdfviewer example: stop creating placeholder images in PageCacheShawn Rutledge2019-11-254-18/+14
|
* Fix memory leak, destroy page after usageSimon Hausmann2019-11-251-0/+3
|
* Fix compilationSimon Hausmann2019-11-251-3/+0
|
* Clean up error handlingSimon Hausmann2019-11-252-16/+11
|
* Provide unit test for password protected PDFsSimon Hausmann2019-11-254-2/+19
|
* Keep reading until all pages are availableSimon Hausmann2019-11-254-7/+34
|
* pdfviewer example: direct inheritance from QThreadShawn Rutledge2019-11-252-11/+8
| | | | | But either way, the UI is not as responsive as one could wish for during background rendering.
* pdfviewer example: add threaded PageCacheShawn Rutledge2019-11-257-35/+172
| | | | thread fixes
* fix compile errorShawn Rutledge2019-11-251-0/+1
| | | | undefined type QPointer
* Fix compilationSimon Hausmann2019-11-251-0/+1
|
* Fix build on WindowsSimon Hausmann2019-11-252-4/+33
| | | | | * Need to link against some win32 dlls * Make sure to include OS="win" sources properly scoped in the .pri file
* Prospective fix for namespace buildsSimon Hausmann2019-11-253-0/+12
|
* Provide async loading through QNetworkReplySimon Hausmann2019-11-256-32/+225
|
* pdfviewer example: add rendering statsShawn Rutledge2019-11-252-1/+27
|
* pdf viewer example: more typical featuresShawn Rutledge2019-11-2514-6/+230
| | | | | | | zooming field for setting zoom, up/down buttons field for setting and viewing page number, up/down actions icons for toolbar actions
* pdfviewer example: can scroll through pages and render on demandShawn Rutledge2019-11-255-19/+87
|
* initial single-threaded implementation of pdfviewer exampleShawn Rutledge2019-11-257-0/+264
|
* Sprinkle global locks around the API callsSimon Hausmann2019-11-251-19/+15
| | | | | | The library is not thread-safe at all with plenty of global variables. The common use-case seems to be one PDF document per process, which perfectly matches Chromium's architecture.
* Allow loading documents synchronously from a QIODeviceSimon Hausmann2019-11-254-53/+95
|
* Added basic rendering and page size getterSimon Hausmann2019-11-253-2/+41
|
* Implement basic document loading from a fileSimon Hausmann2019-11-259-1/+235
|
* Fix the build on Windows with MSVCSimon Hausmann2019-11-252-1/+7
| | | | | * Disable warnings * Ensure we get the right library link search path
* Build the pdfium sources as a separate static librarySimon Hausmann2019-11-252-3/+15
| | | | | That way we can build the Qt code with full warnings enabled (modulo -Wno-unused-parameter because of the pdfium headers)
* Generate pdfium.pri at build timeSimon Hausmann2019-11-254-577/+9
|
* Update to a newer pdfium snapshotSimon Hausmann2019-11-251-4/+0
|
* Add stub for JS runtime in order to satisfy link dependenciesSimon Hausmann2019-11-252-0/+46
|
* Re-organize the build system to turn this into a full-fledged moduleSimon Hausmann2019-11-255-5/+8
|