summaryrefslogtreecommitdiffstats
path: root/src/pdfwidgets
Commit message (Collapse)AuthorAgeFilesLines
* cmake: PdfWidgets/Quick - fix dependenciesTim Blechmann2025-06-041-1/+2
| | | | | | | | | | | PdfWidgets and QdfQuick should publicly depend on Qt::Pdf/Quick and only privately on PdfPrivate / QuickPrivate Amends 209778ed9a167c156b448689191d2a6a381a6880 Fixes: QTBUG-135974 Pick-to: 6.9 6.10 Change-Id: I9cdcc6d6fd6cd0a11691025580f2fd4a41325282 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Do not add magic header web_engine_logging.hMichal Klocek2024-10-312-5/+3
| | | | | | | | | | | | | | | | | | | | | | | Importing headers with relative paths going out of source component is evil. Remove web_engine_logging.h header as it is referred from the code base, but build system has no clue about it as it is specified as include with relative path. Moreover, it introduces weird implicit dependency of components like qtpdf on qtwebenginecore. Add required macro to private globals. Note for qtpdf it is unnecessary as we do not support compiling qtpdf against latest lts, however our release infra requires it. This commit amends d11709f18d692f4a3431999e90dddf0d7cdf15df. Task-number: QTBUG-127975 Change-Id: I89163a29db4e601cfb607928f796343ba522037b Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Fix static logging category deprecation warningsKaloyan Chehlarski2024-08-271-1/+3
| | | | | | | | | | | | | | | | | | | | | This is a second attempt at getting rid of the deprecation warnings caused by the new logging category macros in 6.9. These cause build failures on warnings-as-errors configurations, and need to be fixed properly without affecting backwards compatibility. The change introduces a new Q_WEBENGINE_LOGGING_CATEGORY macro, intended to be used across the WebEngine sources. The macro is not exported to users, so the QtPdf example that declares its own logging category uses an #ifdef instead. The new macro is placed in its own header inside src/core/, and is intended to be removed whenever the next LTS release allows us to break compatibility with 6.8, and just directly use Q_STATIC_LOGGING_CATEGORY everywhere. Fixes: QTBUG-127975 Change-Id: I9174dab21bd597c862e569e170161782cc108ece Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Revert "Use static logging categories everywhere"Kaloyan Chehlarski2024-07-251-1/+1
| | | | | | | | | | | | This reverts commit bd6e209152d042a08fc226a9e92ee1c04cf1954a. The change broke backwards compatibility with 6.8, because the relevant macros were introduced after the feature freeze, and are thus not part of the 6.8 release. This revert fixes the impeding backwards incompatibility whenever WebEngine 6.9 is released. Change-Id: I4626c4fe2647a5eb2a0729696cb80db6a47569a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use static logging categories everywhereKaloyan Chehlarski2024-07-021-1/+1
| | | | | | | | | | | | Following fa4bd30caa079a3b1e5eac1bb4f17365f456b8f9 all usage of the Q_LOGGING_CATEGORY macro triggers a deprecation warning, and may even block certain build configurations. This change replaces all usages of the macro with Q_STATIC_LOGGING_CATEGORY instead, since none of the logging categories in WebEngine are meant to be exported to users. Change-Id: Icdebb7a3a8c987db3f34945cd0311aee52667a88 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Change qt.pdf.links log category to qt.pdf.wigets.links in pdfwidgetsShawn Rutledge2024-05-091-3/+3
| | | | | | | | | | | | | We use the qt.pdf.links logging category in the PDF library. If we redefine qLcLink in PdfWidgets, we get a static link error; if we redeclare it, we get a dynamic link error. So it seems that we cannot reuse logging categories across modules. Fixes: QTBUG-124506 Pick-to: 6.5 6.7 Change-Id: I591f2e3af2162274c8092397cadf74ddbf687e9d Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use NO_GENERATE_CPP_EXPORTS explicitlyAlexey Edelev2024-03-251-0/+1
| | | | | | | | | | | Use NO_GENERATE_CPP_EXPORTS explicitly for modules that don't need the autogenerated exports header file. Task-number: QTBUG-90492 Change-Id: Ifb068ca6eb404fefe4587346df8c511413f372f5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io>
* QPdfView: use per-page scale factors to render search result rectanglesShawn Rutledge2024-01-312-28/+44
| | | | | | | | | | | | | | | | In FitToWidth and FitInView zoomModes, each page could potentially be a different size; so QPdfViewPrivate::calculateDocumentLayout() loops over all pages, calculating each pageSize and offset on the fly. m_zoomFactor doesn't get updated; but QPdfViewPrivate::updateDocumentLayout() stores the per-page zoom factors in m_documentLayout.pageGeometryAndScale. screenScaleTransform() takes the page index as an argument, looks up the per-page scale factor in those zoom modes, and QPdfView::paintEvent() uses the per-page transform to paint the rectangles. Pick-to: 6.5 6.6 6.7 Task-number: QTBUG-120764 Change-Id: I86308c8963ffadd2fdb6f36cf9f4696f75f550ed Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Doc: Fix QPdfPageSelector::currentPageLabel property documentationTopi Reinio2023-11-101-2/+2
| | | | | | | | | | | | | | | src/pdfwidgets/qpdfpageselector.cpp: * warning: Cannot find 'QPdfPageSelector::currentPageIndex' specified with '\property' in any header file src/core/doc/src/qtwebengine-deploying.qdoc: * warning: Unknown command '\maocs' Mark documentation modules free of warnings. Pick-to: 6.6 Change-Id: Icbdf9622501b1fc4911f58682ffd2146efc36c1f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QPdfView: remove unneeded includes from a public headerIvan Solovev2023-08-302-2/+1
| | | | | | | | | | Include qpdfdocument.h in the private header instead. Found during Qt 6.6 API review Pick-to: 6.6 Change-Id: Ia8bed2a789fb1cb5fc8a8bd6d67f3c4efbf0cf54 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QPdfPageSelector: port from is-a to has-a QSpinBoxMarc Mutz2023-08-233-58/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yes, the class needs to inherit from QSpinBox in order to override the protected virtuals, but that doesn't mean a QPdfPageSelector should model is-a QSpinBox. E.g. the range of the QPdfPageSelector is taken from the QPdfDocument, and no good can come from a user changing it through the use of QSpinBox API, esp. if one thinks about the class being displayed as a native widget in QtDesigner. In a similar vein, the inheritance from QSpinBox leaves users wondering (and the docs didn't do anything to enlighten them) what properties are pertinent to the task at hand. setValue() to set the page index is ... meh, but still somewhat discoverable. But that text() is only QPdfDocument::pageLabel() if no affixes are set takes quite some digging. Part of this could be fixed by providing domain-specific properties like currentPage for value, but that would just increase the confusion, because those two properties would must needs exist on the same object. Instead, fix by moving the old QPdfPageSelector as QPdfPageSelectorSpinBox into qpdfpageselector_p.h, removing its pimpl and having QPdfPageSelector inherit QWidget instead, aggregating a QPdfPageSelectorSpinBox. This involves a few more objects (the widget, the layout), but gives QPdfPageSelector full control over its interface. Add a few salient properties (more can be added if needed, by copying them from QSpinBox or QAbstractSpinBox). Note how well the new API rhymes with QPdfPageNavigator in the connect() in pdfviewer example's MainWindow. Since we still store everything in QPdfPageSelectorSpinBox, but don't pimpl it anymore, QPdfPageSelectorPrivate can lose the q_ptr now, and merely contains the pointer to its QPdfPageSelectorSpinBox. This could be optimized further, by making QPdfPageSelectorSpinBox and QPdfPageSelectorPrivate the same class, but that's neither BC- nor SC-relevant anymore, and can be done later (or never, seeing as this widget is unlikely to be used more than a few times per application). Found in API-review. As a drive-by, port to the std-compatible subset of the QPointer API. Pick-to: 6.6 Change-Id: I0d82d098d38d5f2fcf7f1c8c9aed6e792a8deb2d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPdfPageSelector: add missing \since 6.6Marc Mutz2023-08-171-0/+1
| | | | | | | | Found in API-review. Pick-to: 6.6 Change-Id: I1e92d098d38d5f2fcf7f1c8c9aed6e792a8deb2e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPdfPageSelector: remove unused fwd declarationsMarc Mutz2023-08-172-3/+0
| | | | | | | | Found in API-review. Pick-to: 6.6 Change-Id: Ibd5bf18706833e2a8e8a00b132570f75306fa583 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPdfPageSelector: mark dtor as overrideMarc Mutz2023-08-161-1/+1
| | | | | | | | | | ... because it does. Found in API-review. Pick-to: 6.6 Change-Id: Id1004406dbffeb92eb5297ce1623fc609d511494 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPdfPageSelector: port from QScopedPointer to const std::unique_ptrMarc Mutz2023-08-161-1/+3
| | | | | | | | | | | The former is on extended life-support, there's nothing a const unique_ptr does worse, so use the future-proof version. Found in API-review. Pick-to: 6.6 Change-Id: Ic734b45b991b1ff81454c86b6a159897f06f815b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Rename QPdfView::currentSearchResult() -> currentSearchResultIndex()Shawn Rutledge2023-08-023-15/+15
| | | | | | | | | | | | I don't think it was very confusing, but just in case we could want a currentSearchResult() returning the actual result object at some point. It was a suggestion from header review. Amends 288e9be6ba2be40761333036f3397298df5e1018 Pick-to: 6.6 Change-Id: Ie3eb500e3a79b80b8abafbe19c48b57c7e9d71be Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix PDF page label search: don't trim in QPdfDocument::pageIndexForLabel()Shawn Rutledge2023-08-022-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | In the 6.6 header review it was suggested that the caller should do the trimming if necessary; avoiding it here is more efficient. So far the only caller is QPdfPageSelector (although we may need to implement the same feature in the Quick PDF examples at some point). Typing page labels into QPdfPageSelector didn't work because QPdfPageSelector::validate() was not overridden. Now we reuse pageIndexForLabel() for that too: if the label is found, it's valid; if the label is not found, we just assume the user is not done typing yet. There's no QPdfDocument function to do a substring search for page labels, or to return the whole list of them either. It seems they can only be gotten one-at-a-time via the FPDF_GetPageLabel function. Now it actually works in the widget-based example qtwebengine/examples/pdfwidgets/pdfviewer/pdfviewer: if you load a document that has some Roman-numeral-numbered preface pages and type e.g. " iii" into the spinbox, it jumps to page iii. Fixes: QTBUG-115476 Pick-to: 6.6 Change-Id: I070338effee1bbf916581c5ba964367424b786b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Don't use QScroller in QPdfViewShawn Rutledge2023-06-161-2/+0
| | | | | | | | | | | | This should be up to applications if desired, not a built-in feature. For example, qtdoc/examples/demos/documentviewer installs its own QScroller. Perhaps QScroller should only handle touch gestures, to avoid interfering with built-in QAbstractScrollArea behavior. Fixes: QTBUG-113981 Pick-to: 6.5 6.6 Change-Id: I5fdeb362d16e00f1ae656f7529450d5f5f6ffe83 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Teach QPdfView to render search result highlightsShawn Rutledge2023-03-173-1/+100
| | | | | | | | | | | | | | | | | | The bounding boxes of all visible search results are filled with a translucent color on top of the page image, because we don't know whether the image is opaque or not. currentSearchResult is further highlighted by drawing bounding box borders. The colors are the same as PdfStyle.pageSearchResultsColor and PdfStyle.currentSearchResultStrokeColor, respectively. Perhaps they could be configurable somehow in the future, but it's not clear yet what API that ought to have, since we do not have suitable QPalette roles (except QPalette::Highlight, which is not translucent). Task-number: QTBUG-77507 Task-number: QTBUG-92973 Change-Id: I3df634229811e72d2d438a39997e0b4887d6bf11 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Make QPdfLinkModel public and use in QPdfViewShawn Rutledge2023-03-173-1/+88
| | | | | | | | | Now you can click links on pages in PDF documents in QPdfView. Task-number: QTBUG-77511 Fixes: QTBUG-102760 Change-Id: I348dcfd906be088aa3fcbe53aec4628b521cc2f3 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Add QPdfPageSelectorShawn Rutledge2023-02-164-0/+192
| | | | | | | | | | | | | | | | | | This is a QSpinBox subclass that shows PDF page "labels" rather than a 1-based or 0-based page index. If a book starts with Roman numerals in the preface, and then page 1 is the first page of Chapter 1, the spinbox should be in sync with the page numbers as printed on the pages, and with the labels that will eventually be shown under the thumbnails on the Pages sidebar tab. On the other hand, the user probably needs to see the 1-based page index somewhere, at least to be able to make sense of the print dialog, because there the range of pages to print will be 1-based. So we put the page index into the title bar: title, page label, index, count. Task-number: QTBUG-102271 Change-Id: Ic461094ba4caae3067409f7f436bd4e7504a4bdb Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Port from container::count() and length() to size() - V4Marc Mutz2022-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-261-1/+1
| | | | | | Task-number: QTBUG-105718 Change-Id: I2ad190e5536cdbdc8d2656e61892545d66911a02 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-071-0/+3
| | | | | | | | | | | | 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>
* Use SPDX license identifiersLucie Gérard2022-06-224-153/+9
| | | | | | | | | | | 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>
* Rename QPdfDocument::pageSize() to QPdfDocument::pagePointSize()Shawn Rutledge2022-05-311-3/+3
| | | | | | | | 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>
* Rename QPdfNavigationStack to QPdfPageNavigator; QML type tooShawn Rutledge2022-05-273-14/+14
| | | | | | | | | | | | | | | | | 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>
* QPdfView: replace enums with enum classesShawn Rutledge2022-05-242-18/+18
| | | | | | | [ChangeLog][QtPDF] All enums are replaced with enum classes. Change-Id: I41063de084a23db657a24805ceaf22881f25c990 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QPdfDocument: use enum classesShawn Rutledge2022-05-241-1/+1
| | | | | Change-Id: Iad3f8da130abe86a464d63323920a2a39d6fa955 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* doc: Add docs for QPdfViewShawn Rutledge2022-04-231-8/+91
| | | | | | | | 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>
* Move QQuickPdfNavStack core into QPdfNavigationStack; use in QPdfViewShawn Rutledge2022-04-083-10/+10
| | | | | | | | | | | | | | | 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>
* QPdfView: scale page rendering according to devicePixelRatioShawn Rutledge2022-03-181-2/+2
| | | | | | | | | On high-dpi screens we want the rendered pixels to match device pixels. Fixes: QTBUG-86948 Pick-to: 6.2 6.3 5.15 Change-Id: I4879adc0aeb001750d42abc1e7d50ca3f11a5fe8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Make default ctors implicitMarc Mutz2021-12-071-1/+2
| | | | | | | | | | 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>
* Use up-to date LGPL license headerKai Köhne2021-12-024-44/+56
| | | | | | | | 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>
* Remove the rest of qmake based configurationMichal Klocek2021-10-142-41/+0
| | | | | | | | | | The only not cover part in cmake port are: * ios builds for qtpdf * qt static dependecies for qpdf Pick-to: 6.2 Change-Id: Iefe624c35d847b4a9c3cd970192487340b1657f9 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Rewrite gn-cmake integrationMichal Klocek2021-08-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous gn-cmake integration was driven towards having the complete cmake build tree which included gn build artifacts. These were marked as IMPORTED in cmake build files, this way cmake "knew" all object files and static libs coming from gn. To achieve that we needed to run the cmake configure twice. First to feed gn with the build information from cmake and then the second run to import all the build information to cmake based on gn run. As a side effect of this the first run cmake was creating incomplete targets, so we could use generator expressions to gather all the data needed for gn run. The second run of cmake was able to create fully initialized targets. We used 'external project' to run cmake the second time. This approach worked well when doing "module" builds and having two targets, one in the main project and one in external was not an issue. Moreover, this approach could be integrated nicely since CI does only "module" builds. Unfortunately "top level" builds are implemented to import all qt targets into one build tree. This created issue for qtwebengine since fully initialized targets were 'hidden' by 'external project' and including half baked (dummy) targets from the main project resulted in bunch of issues related to the dependency tracking and build race conditions. Also using 'external project' complicated installation rules and in the end installation worked differently than in other modules. With current approach we use response files, so we hide all build artifacts coming from gn and feed cmake with those response files. This way we run the cmake configure once and we create all the targets once. Using rsp files hacks linker options in cmake, so this approach is sub-optimal, however allows to have working "top level" builds. It is worth mentioning here that the final module linking has to take place with cmake's part of build since doing one static lib in gn is not possible due to the toolchain limitation (msvc is not able to process static libs over 4Gb and has no support for thin archives, so only a shared lib is doable at time of writing) Following changes are made: * remove 'external project' for qtwebengine target, we keep it however for ninja ,gn and a host project * call gn from cmake in a scripting mode during build and not configure run, this way BUILD.gn is assembled as a build step so after generator expressions are executed * BUILD.gn is assembled now from 4 files: - root template BUILD.root.gn.in - compiler data gn_config_c.cmake, gn_config_cxx.cmake - sources data gn_cofnig_target.cmake * since we use gn wrapper script use gn.args file to pass arguments instead of a command line, so this file can be now easily modified when running gn and ninja 'manually' * since a script mode does not support handling of properties with TARGET as such, use the DIRECTORY scope in some of our functions which handle GN_TARGET * use qt_build_repo() in main CMakeFile and remove all coin and top level build hacks * remove 'external project' for examples and tests, this is no longer required as all qt targets are not hidden by external project * remove leftovers from gn feedback call used for GN_TARGET * improve installation rules, WebEgineCore target is not by default installed during build, therefore we need to copy resources and translations to root so tests and examples still can be built without a module being installed first * adjust GN lookup paths, we look for gn in main configure and during scripting mode when gn is executed Fixes: QTBUG-94349 Fixes: QTBUG-94709 Fixes: QTBUG-94922 Fixes: QTBUG-94997 Fixes: QTBUG-95051 Fixes: QTBUG-95152 Fixes: QTBUG-95158 Fixes: QTBUG-95972 Task-number: QTBUG-95231 Task-number: QTBUG-95590 Pick-to: 6.2 Change-Id: I5e7a34287ee59d904103fe310fc7c6a36a8dfbc9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QtPdf to cmake buildMichal Klocek2021-08-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2021-08-121-1/+1
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in qtwebengine. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.2 Task-number: QTBUG-86829 Change-Id: I6cf26bb24c4d68cc3da85193cf6f8e63daeaa9d7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix compilation after 757a9c21c1 in basePeter Varga2020-09-231-0/+1
| | | | | | | | | | | | Adaptations for the following qtbase changes: - acbf9a858b Cleanup QTypeInfo - 652bd1efca Make QStringList an alias to QList<QString> - 25351dcc54 Long live QKeyCombination! - ed8acbeb7c Automatically register data/debug stream operations in QMetaType - a735038376 Move QStateMachine from QtCore to QtScxml Change-Id: Ieb2677cd0572cc6dfe7be4b8f8dd4189a39bd3fe Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devMichael Brüning2020-07-241-0/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/core/compositor/delegated_frame_node.cpp src/core/core_chromium.pri src/core/render_widget_host_view_qt.cpp Change-Id: I9387151e9647c87fc387095e7b6d8d66560cdf71
| * Fix prl generation in sub modules of webengine repoMichal Klocek2020-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtPdf and QtWebEngine builds are producing few libraries in one build. This creates some corner cases like prl file generation. Paths in prl files are replaced on installation with sed. Unfortunately this will not work well if we build libraries which depends on not yet installed libs, since prl files reused by build are not processed by sed. Add workaround in this case so all depend libs are aware of their static dependencies and generate correct prl files. Task-number: QTBUG-85616 Change-Id: I0dbeb96bccbc4865dd52dea7c5d619f8cda1a596 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use QList instead of QVectorJarek Kobus2020-07-151-1/+1
| | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: I666a060351f73783e15e3f96884c9393a5cd7e46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adapt to newer dependenciesAllan Sandfeld Jensen2020-07-063-16/+10
| | | | | | | | | | | | Change-Id: I495880f56fbc10d8f332f26101f8a25c2a1c5631 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add ; to Q_UNUSEDLars Schmertmann2020-06-271-2/+2
|/ | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: Id948c173695923a1ea83a2098bafc10cfd4dc22b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enum class QPdfPageRenderer::RenderModev5.15.0-beta2Allan Sandfeld Jensen2020-03-161-1/+1
| | | | | | | Avoid having the enum name in the enum values. Change-Id: Ida5b3405e6922eb1a2a37edc6fb650019254f4d4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add QtPdf and QtPdfWidgets modulesMichal Klocek2019-11-251-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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 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>