| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
They both return the same title string, but we don't make the enum values
identical, because roleNames() needs to have unique mappings.
Change-Id: I6d19ed2e5a3f2f5ea83d8b542b3042e91c37c497
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far we only supported a cross-compiling with universal builds,
however qmake also supports 'regular' cross compilation (by setting
'-device-option'). This is semi-supported with qt-cmake as we need to
provide additional configure defines like:
* CMAKE_OSX_ARCHITECTURES=arm64
* CMAKE_SYSTEM_NAME=Darwin
* CMAKE_OSX_DEPLOYMENT_TARGET=10.14
It might seem to be a far fetched issue, however in case of webengine
doing the cross compilation for only one architecture allows to save
compile times when testing only arm64 builds.
Note we do not need to create gn toolchains for that case, however
unlike universal builds it requires host qt build for tools.
Pick-to: 6.3 6.2
Change-Id: Ica8470fdd4cad4866c1470e0403ffd019eaf39a6
Reviewed-by: Alexandru Croitor <alexandru.croitor@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>
|
|
|
|
|
|
|
|
| |
Wrap some long lines in qpdfview.cpp, as a drive-by.
Task-number: QTBUG-81560
Change-Id: Ia9865c42e48c81ac2c99b5cbe9d5a10beff40847
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update to versionless imports. The color type comes from the QtQuick
import now. Add the styles to CMakeLists.txt so they get installed.
Use SystemPalette rather than instantiating a Control.
We'd probably better just assume that the PDF has hyperlinks decorated
however the author wanted, rather than risking redundant underlines.
Declare linkUnderscoreStrokeWidth: -1 since the ShapePath.strokeWidth
docs tell us "When set to a negative value, no stroking occurs."
But the user can turn them back on using a custom style.
Update the screenshot: avoid showing off how bad the underscores looked.
PdfPageView doesn't depend on Controls and doesn't import styles:
it simply loses the light-grey rectangles around links. The cursor
change still informs the user when the mouse is hovering a link.
Pick-to: 6.3
Fixes: QTBUG-102303
Change-Id: Ifa4f9982bfaaf0e2e46230e8dbe30a5db7c9f592
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
The module is more about Qt Quick than about widgets nowadays.
Also clarify on the Qt PDF Examples page that one example uses widgets
and the other uses Qt Quick.
Change-Id: I38a77a4290f9489ef17bf66fe3a0f69be9bd0e88
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
When loading a new document, clear the navigation stack, reset the view
to the upper-left corner, and clear the special device in PdfPageImage.
Task-number: QTBUG-102294
Change-Id: I275b46f8958d4e8abe3814c1f358df5969c36d4d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
| |
FPDF_InitLibrary seems to take too long.
Task-number: QTBUG-102394
Change-Id: Ia5b629885a5a8a50dfd787f370d85878ad043046
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: Id2ce2bd8852c4051edd29bf474bac216ba14f2b5
Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
|
|
|
|
|
|
|
| |
Pick-to: 6.3
Task-number: QTBUG-81560
Change-Id: I062e022a97c146e9a746b6d6358868bfe0c0a7d7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- TreeViewDelegate uses Qt::DisplayRole by default, so we need it to map
to the text we want to display, in the roleNames() hash. But asking
explicitly for the TitleRole is OK too (as before).
- In QML, the document property must be a QQuickPdfDocument, whereas in
C++ QPdfDocument is used directly; so we shadow the document property
for QML. Therefore QML_EXTENDED(QPdfBookmarkModel) does not work: we
need real inheritance to get real property shadowing.
- Added tests/manual/quick/pdf/bookmarks.qml with a TreeView
- Clicking the TreeViewDelegate expands the subtree if there is one; but
it also goes to the destination in the PDF, whether there is a subtree
or not. But this can be fixed in TreeViewDelegate.
- Added tests/manual/quick/pdf/bookmarks-list.qml to test the case with
structureMode: PdfBookmarkModel.ListMode (using ListView)
test.pdf is uninteresting for this purpose: there is only one bookmark;
but you can run these tests with an optional argument like this:
qml bookmarks.qml -style Material -- ~/path/to/some.pdf
qml bookmarks-list.qml -- ~/path/to/some.pdf
Change-Id: I65d12a3d9b8ef0f0fa2bc99003430324fd759dcb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We try to avoid private API from other modules, for portability between
different Qt versions.
Task-number: QTBUG-102156
Change-Id: Ia95a026fbae946eba53ad6835c7615214d93ec62
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
PdfSearchModel already has QML docs since
b6dd845ec4a6bfb6b620686681e20d38a2f24101; but QPdfSearchModel could also
be used in widget applications (although we haven't added it to the
widget example yet).
Task-number: QTBUG-81560
Change-Id: I23adf4ef777542a7aea6ecade74ca583a0933d43
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I88b402d3da4ec079a72ff6882e68f09b2d507446
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
|
|
|
| |
Change-Id: I607604f85a111a69da77ca949dddf3399b9721b3
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
|
|
|
|
|
|
|
| |
As suggested by the warning, because take() is deprecated.
Change-Id: Ib7372ee6119cc0bb07380e49f94b16e2993f353a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The object is quite large (16 for QRect + 8 for QSize + 4+4 for flags
= 32 bytes), and Clazy complains about passing it by value.
Fix at least for the relational operators, where, granted, it makes
least sense (them being inline). The other users are behind the ABI
wall, though.
Change-Id: I9a70d007cc1f90e3ee71d3522c02fd7efcbee6ba
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
... which is now enabled in headerscheck.
Pick-to: 6.3
Change-Id: Ifee53c6ab0cff5d25928cdd4e569ce740d7a2362
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inheritance was a decent way to model this, conceptually. A hyperlink
is modeled like the HTML kind: a region covering the source material
that the user will click on, and a destination where we will jump when
they click it; whereas a search result has the same information plus the
text before and after the search text, so that we can show some context
in a ListView with search results.
By going this way, we need to document which fields we use which way
under which conditions. But, we have a rule that value types cannot use
inheritance, just in case the user would ever try to use them
polymorphically (in spite of the other rule that we never pass value
types by pointer, and thus there is no actual polymorphism), or just
in case the destructor of the base class would not be called when
a subclass value goes out of scope.
Anyway, perhaps an upside is that this resembles a link in Xanadu, or in
a fully-normalized database schema: an object that fully describes both
ends of a connection, and thus is able to traverse either direction, in
theory. (Although we don't really use it that way. The link-following
behavior in a PDF viewer tends to be one-way, as in a web browser.)
When using QAbstractItemModel (as in QPdfSearchModel and QPdfLinkModel),
the cells in the "database" are accessed separately via the data()
function, so there is no need for a transport object to hold a whole
"row". That's OK for item views; but we need this link object for the
purpose of less-clumsy C++ API, as a return value from a few functions.
For example when implementing a viewer in QML, we use Repeater to
instantiate Items for each hyperlink (decorations and a TapHandler),
and Repeater uses the QAIM interface. But when implementing a
widget-based viewer, it's better to call a hit-testing function like
QPdfLinkModel::linkAt(pos) to find out whether a link exists at a
particular mouse location; and that function can return a QPdfLink.
In this case, the link will not contain contextBefore and contextAfter,
because the viewer doesn't need them, and it's difficult to find this
text in the PDF model. But QPdfSearchModel::resultsOnPage() and
reultAtIndex() return link objects that do contain the context strings.
We don't expect users to have made much use of these classes in C++
so far, because we prioritized QML API (which this change does not
affect), and did not yet document how to use QPdfSearchModel and
QPdfLinkModel in widget-based viewers.
Fixes: QTBUG-98886
Change-Id: Ie68f9b893a342d145abac0b143e9254827c70bd7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
| |
Replace outdated header.LGPL3 with header.LGPL.
Amends 7b8832ca2
Change-Id: I6a7b4406413febe7cfaca7f5698e4c93692526b7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
| |
Pick-to: 6.3
Task-number: QTBUG-81560
Change-Id: I145ff595e07c9e60139eb169832be86741698799
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-98890
Change-Id: I30ceaeb978e430cf6dbad659023d012688c77b21
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
| |
Add feature to enable compilation with static runtime.
Fixes: QTBUG-94046
Pick-to: 6.3
Change-Id: I6e150cfaad020dfd942c45111139556b7e50dce5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Adds -fembed-bitcode-marker for debug or -fembed-bitcode
in case of release.
Fixes: QTBUG-94368
Pick-to: 6.3
Change-Id: I65031a545517799245e8d08d79e78141d26e9c58
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add 3rdparty installed headers so static builds can
use bundled qt libs.
Fix static gn and archiver/librarian setup.
Updates 3rdparty:
* 5d88de975 Fix static build with qt3rdparty libs
Task-number: QTBUG-87154
Task-number: QTBUG-88614
Pick-to: 6.3 6.2
Change-Id: Iad7682da92b558b500140f415acc0bc9c9a1c22e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When a document requires a password, we will first see
PDF_DATA_NOTAVAIL, but we should not call setStatus(QPdfDocument::Error)
yet, because updateLastError() will discover that it requires a
password immediately afterwards. This avoids showing the user an
incorrect error dialog. Amends 9968e2578f96081d2a242340620fcb2b96d9a1d3
Change-Id: I2216017d417bb0bad707900ce8c745363a396d7d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Image works fine, except that if QPdfIOHandler is not given an
already-allocated QPdfDocument instance, it needs to construct its own.
So we now have QPdfFile: a subclass of QFile acting as a wrapper, to
carry the document instance (that the user has most likely declared)
down into QPdfIOHandler::load(QIODevice *). Thus, in nontrivial
PDF-viewing use cases, there is now usually only one multi-purpose
document instance. And this takes care of viewing password-protected
PDFs in the multipage example, because we already prompt for it
and set the document.password property.
In trivial use cases, it's OK to continue using Image, and QPdfIOHandler
will still construct its own QPdfDocument instance if the QIODevice
cannot be cast to a QPdfFile.
Task-number: QTBUG-77506
Task-number: QTBUG-83988
Task-number: QTBUG-96574
Change-Id: I3adfa54c30b0baa5dedebcf3bc759758f136b757
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
They are redundant as long as you have %{function} in your
QT_MESSAGE_PATTERN, and have configured with -developer-build.
Change-Id: I89106bab0f4c1275633d7033761b9a5844df9403
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QtPDf iOS builds must support fat libs builds. Compared
to 5.15 however this is done differently. Before we tweaked gn
to compile multi arch with 'Xarch' parameter. This had few
downsides as we could not determine which arch/cpu compiles
given file as compilation was opaque to gn. The current approach is
to follow mac universal builds, compile builds separately for each
architecture and lipo the outcome. However, this introduces some
issues as ios builds are static builds and creating lipo archive
will gather object files, which should end up in final QtPdf lib
instead. Therefore create multi arch object file instead of archive
and use this one.
Note the compiler now uses arch triple for Pdfium as Chromium does,
however qt files still use 'arch' and '*-version-min' combination.
Task-number: QTBUG-88614
Pick-to: 6.3 6.2
Change-Id: I7775c8b4d1554df497eb61fa6187f12c00b9032d
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With 6.x we have gn-cmake integration which allows now
in case of static builds to switch gn target output to
static_library with 'complete static' option instead of
shared_library. This way we can avoid installing dependencies
in form of internal static Chromium archives as it was done
in 5.15 in case of static builds.
Unfortunately 'complete static' option can not be used with
QtWebEngineCore build as it will exceed 4Gb static archive
limitation on Windows, however it will work fine with QtPdf.
Note the qtbase 3rdparty static libs have to be still installed
in case of qt static build, this patch only eliminates need for
Chromium specific ones.
Task-number: QTBUG-88614
Pick-to: 6.3 6.2
Change-Id: I6fc4ce48c79a1631b013d0b29c190c62280f7304
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
|
|
|
|
|
|
| |
Pick-to: 6.3 6.2
Change-Id: Id19aa463db605c861a1bd3502eb964c8f9340e4d
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.3
Change-Id: I940db4bc953db9e571370886f142387dce5f12bb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Value classes should not be exported wholesale, because that makes
inline function part of the ABI on Windows debug builds, severely
restricting what we can do to them going forward (e.g. removing).
De-inline the QPdfSearchResult dtor as a drive-by.
Fixes: QTBUG-98885
Pick-to: 6.3
Change-Id: If2a2c7bec2b99df7e33dfc008fd07e6edda5413c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Otherwise users outside the module can't access it.
Fixes: QTBUG-99144
Change-Id: I8348f64bca9a4cd9bcdbddb8fbfd7554c29f5357
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Change-Id: I654c07c3b9925977dd85821a36fd6f8130556cac
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The ctor is a perfect sink for the arguments, and already took them by
value. What was missing was to std::move them into place instead of
using the copy ctor.
Change-Id: I3a708bea2cdd8417ea3e604af2850d99a5966c3f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
It's best practice, and will probably solve a linker failure/ODR issue
in a subsequent patch.
Change-Id: Ieff9d20ddc3b49286459d554a2ff6a706a41af2e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Default ctors should be implicit, because users expect '{}' to call them.
If they're explicit, because they're folded into the (QObject* parent) ctors,
then that no longer works.
Fixes: QTBUG-98881
Change-Id: Ie52812ba76ee0b489c75ecf48b0c048025fde8c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
| |
Otherwise the operators aren't found by ADL.
Task-number: QTBUG-98796
Change-Id: I9b80f59bf9f8c76234360f07add80528fc4ab326
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Pins vtable to a single TU, instead of duplicating it across all TUs
that use the class, possibly causing invalid dynamic_cast<>s and other
bugs.
Fixes: QTBUG-98880
Task-number: QTBUG-45582
Change-Id: Ic296f4583097181ac4d824fac6dab4671ae14a50
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-98796
Change-Id: I2400ef5634ae3c263aaafe1526e843f542a73eef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
| |
The function is not a perfect sink for the argument, and the implementation wasn't moving from the argument, anyway, so do the common thing here and take by cref.
Task-number: QTBUG-98796
Change-Id: I4237e50cf9c00817245ad8967bf7e2976ffb7085
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: Ia68a080fcbf985e2a62178e5ca2722495799f9c9
Reviewed-by: Marc Mutz <marc.mutz@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>
|
|
|
|
|
| |
Change-Id: I9fb8998a3a7762b0aea70993ca231f0bbf4f7761
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|