summaryrefslogtreecommitdiffstats
path: root/src/pdfwidgets
Commit message (Collapse)AuthorAgeFilesLines
* 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>