summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Scripts: Fix double entries in 3rd party library mappingTobias Hunger2019-05-061-2/+2
| | | | | Change-Id: I35f29876874d6083d19382800d194e417d57bca1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Improve mapping of librariesTobias Hunger2019-05-032-11/+26
| | | | | | | | | | | | | Merge all data related to mapping libraries into one data structure in helper.py. Use that data for everything related to library mapping. This change enables way more features now like e.g. adding find_package calls into generated files. Change-Id: Ibbd2a1063cbeb65277582d434a6a672d62fc170b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: configurejson2cmake: Do not generate useless OPTIONALsTobias Hunger2019-05-031-21/+2
| | | | | | | | | | Do not set properties of packages to type OPTIONAL. That is the default anyway. Update generator script and generated files. Change-Id: I7a4d043b69c93ce8c2929a2e27ac6a07e4e6d8cc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: make the qt_find_package PROVIDED_TARGETS optionalJean-Michaël Celerier2019-05-031-1/+1
| | | | | | | | | | This is because some FindPackage may produce some targets only on some platforms - e.g. qt_find_package(OpenGL) needs to define the provided target OpenGL::GLX which will only exist on linux but is required by various CMakeLists.txt files. Change-Id: I74515470f5d56c246f489df74901ad4223a92a70 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix Vulkan qt_find_package callJean-Michaël Celerier2019-05-021-1/+1
| | | | | Change-Id: I4494d6d7dc2cd0b5afed5bb9d591b62627cbc49d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Write find_dependency() calls in Qt Module config filesAlexandru Croitor2019-05-022-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new function called qt_find_package() which can take an extra option called PROVIDED_TARGETS, which associates targets with the package that defines those targets. This is done by setting the INTERFACE_QT_PACKAGE_NAME and INTERFACE_QT_PACKAGE_VERSION properties on the imported targets. This information allows us to generate appropriate find_dependency() calls in a module's Config file for third party libraries. For example when an application links against QtCore, it should also link against zlib and atomic libraries. In order to do that, the library locations first have to be found by CMake. This is achieved by embedding find_dependency(ZLIB) and find_dependency(Atomic) in Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake. The latter is picked up when an application project contains find_package(Qt5Core), and thus all linking dependencies are resolved. The information 'which package provides which targets' is contained in the python json2cmake conversion script. The generated output of the script contains qt_find_package() calls that represent that information. The Qt5CoreDependencies.cmake file and which which dependencies it contains is generated at the QtPostProcess stop. Note that for non-static Qt builds, we only need to propagate public 3rd party libraries. For static builds, we need all third party libraries. In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any scope, the targets on which the property is set, have to be GLOBAL. Also for applications and other modules to find all required third party libraries, we have to install all our custom Find modules, and make sure they define INTERFACE IMPORTED libraries, and not just IMPORTED libraries. Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Make freetype a required packageAlexandru Croitor2019-05-011-1/+1
| | | | | | | | | With qmake if we don't find a system package, we use the bundled one. With CMake we don't provide a bundle freetype, hence it's required to find a system one (or custom provided one). Change-Id: I00a5e2ac55459957dae0729f89bafa792a102152 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove the Gui extra cmake file which was restored during the mergeAlexandru Croitor2019-04-171-193/+0
| | | | | | | | | | When building qtsvg, the file gets picked up while doing find_package(Qt5Gui) and fails the configuration phase. Remove it as it was done before. Change-Id: I3499e33ecc129e31f8d3b144ee6370b2a9bb4f9a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge remote-tracking branch 'gerrit/dev' into wip/cmakeTobias Hunger2019-04-165-68/+230
|\ | | | | | | Change-Id: I2e1812e4f40131ff74919aa3b558db5c261fe412
| * tslib: use ts_setup() to find the deviceRolf Eike Beer2019-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | This automatically searches for some default devices. This not only reduces the amount of code, it also makes sure that Qt will by default find the same input devices that tslib (e.g. ts_calibrate) will find. Fixes: QTBUG-74680 Change-Id: Ied3fff7e8ed9d6637d2b8cf32119660133d251a3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Add Extended RGB model to QColorAllan Sandfeld Jensen2019-04-124-67/+229
| | | | | | | | | | | | | | Can be used to represent wide-gamut and HDR colors. Change-Id: I1cca442069ce2f2c070f723fe930fe1f2f5580ad Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-16363-4758/+13019
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-114-133/+137
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyle_p.h Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09
| | * Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into ↵Liang Qi2019-04-104-133/+137
| | |\ | | | | | | | | | | | | refs/staging/5.13
| | | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-104-133/+137
| | | |\ | | | | | | | | | | | | | | | Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
| | | | * QShaderGenerator: stop abusing from auto everywherePaul Lemire2019-04-094-133/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Leads to a huge loss of context for people trying to understand and maintain that code. Replacing with proper types to ensure better readability and maintenance. Change-Id: I9900b743e8b7fe11bcc7db9ce3191c89f8718afc Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-107-128/+54
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/gui/image/qpnghandler.cpp Change-Id: Ied79d02912ffb3a307a99483df7db08c7f9d0cd8
| | * | | Update precompiled headersAllan Sandfeld Jensen2019-04-091-24/+7
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include many headers that are commonly used now, and avoid listing them twice. Change-Id: I679dc24cff2cb3a3c9c18585ec78007ab3550743 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into ↵Liang Qi2019-04-091-2/+4
| | |\ \ | | | | | | | | | | | | | | | refs/staging/5.13
| | | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-091-2/+4
| | | |\| | | | | | | | | | | | | | | | Change-Id: I05d14a40e17554691bad369d0363e88413afd9b3
| | | | * Merge remote-tracking branch 'origin/5.12.3' into 5.12Qt Forward Merge Bot2019-04-081-2/+4
| | | | |\ | | | | | | | | | | | | | | | | | | Change-Id: Id60d508c0f25fd5e67be07daafd2d4c56ae73934
| | | | | * Merge 5.12 into 5.12.3Kari Oikarinen2019-04-015-63/+57
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | Change-Id: I76905e3540585c3be221b89453c725828b05940b
| | | | | * | configure: add linker flags for xkbcommon* when pkg-config not presentGatis Paeglis2019-03-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, xkbcommon feature would not be detected even if all xkbcommon dev libs are present. Change-Id: Ic247461dda9e7ddfed547708cccaad88f123903b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * | | | | Be more precise in calculating start point of fast scalingAllan Sandfeld Jensen2019-04-081-89/+30
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using low precision dx/dy for calculating the starting point which meant we could be off when clipping at high scale factors. Fixes: QTBUG-60782 Change-Id: I883f9aed1346fdffae070b6316ea808b83519701 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * | | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-064-13/+13
| | |\| | | | | | | | | | | | | | | | | | | | | Change-Id: Iec860bb703f983b7438e67c695b9c454e72b3e0f
| | | * | | Introduce Q_TRACE_SCOPE to simplify tracing of a function entry/exitMilian Wolff2019-04-051-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally, we also add a Q_TRACE_EXIT which runs a trace point when the scope is exited, leveraging qScopeGuard behind the scenes. Q_TRACE_SCOPE uses Q_TRACE_EXIT internally - the difference is that the _SCOPE version enforces the naming scheme of _entry / _exit for the tracepoints, whereas Q_TRACE_EXIT can be used generically. Change-Id: I4a2f5ea09f451fcf664d07fd493b679f7527ac06 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * | | Forward declare all types required for compilation with `-trace`Milian Wolff2019-04-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes compilation with `-trace lttng` or `-trace etw`. We need to forward declare QEvent, QImageReader etc., otherwise the types will be unknown while compiling the trace points. In order to handle this generically, the tracegen utility is extended to support a 'prefix text' in the `*.tracepoints` input files. Any text within curly braces will be embedded as-is in the generated file. This can then be used to add forward declarations for the types we need, including potential namespaces and such. Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
| | | * | | png handler: initialize all the variables passed to png_get_IHDRAlbert Astals Cid2019-04-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oss-fuzz found at least width is sometimes not initialized, and we're initializing almost all of them in most cases so be complete. the oss-fuzz instance was ==1==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x667c43 in operator!= /src/qtbase/src/corelib/tools/qsize.h:173:25 #1 0x667c43 in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:403 Change-Id: Idb9aaf5ab85509d9c893beaf8d9118339ba46be7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | * | | Remove noisy warning for undefined QGradient presetEirik Aavitsland2019-04-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This runtime warning was recently introduced in the fix for an assert/crash when creating a brush with an invalid Preset value. However, that overlooked the usage where an unknown value is passed to QGradient constructor, and the code afterwards checks if the result is a NoGradient or not. It turns out that such usage is already established as legitimate, including in the Qt Quick Rectangle code, so this warning would be spit out continuously for perfectly legal qml code. Change-Id: Id60aed0817da0214b6cf17edd245f67e26470413 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | | | QtGui: Use member initialization for QWindowPrivate, QScreenPrivateFriedemann Kleint2019-04-092-72/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the constructors, destructors in favor of member initialization. Change-Id: I323826328fb783ea2cd931c0e6aad45a98a2ebeb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | | | | Make the 64 bit raster backend an optional featureAllan Sandfeld Jensen2019-04-099-401/+756
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can be used to make smaller binaries, and possibly speed up ARGB32 rendering on some platforms. Change-Id: I7647b197ba7a6582187cc9736b7e0d752bd5bee5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | | | Revert "Fix font matching of typographic families on Windows"Eskil Abrahamsen Blomfeldt2019-04-093-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bcd2fa484a4fe93e77743195d7f72cce9e580d43. There was a report that this caused infinite recursion on some systems, so we revert it for now and re-add it later when the issue has been resolved. Task-number: QTBUG-74983 Change-Id: I747e0437232d72d7a87eb602b10fa09c7130ce8f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | | | Replace qMove with std::moveAllan Sandfeld Jensen2019-04-067-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | | | | Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Qt Forward Merge Bot2019-04-061-2/+4
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | refs/staging/dev
| | * | | | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-061-2/+4
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib7c4fc52915b5e6c72b9aa262fb59f2a041dccd7
| | | * | | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-051-2/+4
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I010a6322d12e038fdce247a58dfb05e204c2ff3b
| | | | * | | Doc: Update QImage::depth to indicate we support 64 bpp nowAndy Shaw2019-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icbd4920ed03655cec483a402de9d0ae3378ff3ef Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | | * | | Update scanline documentationAllan Sandfeld Jensen2019-04-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I019b102e99f99377b528ad5c8a4ccb2a7929f14f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | | | Replace Q_DECL_NOEXCEPT with noexcept in QtGuiAllan Sandfeld Jensen2019-04-0566-412/+412
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I43803b88fea8083782d73ce157c466b022208740 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | | Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Qt Forward Merge Bot2019-04-0430-228/+328
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | refs/staging/dev
| | * | | | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-051-0/+23
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If4974bbf0a166de244dd57cb71b05fa28bcc34ce
| | | * | | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-041-0/+23
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia7328524f2cd9d5995ac8705f0fe0bf570b2e831
| | | | * | | Add a clarification about "characters" to QTextCursor docsEskil Abrahamsen Blomfeldt2019-04-021-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function name QTextCursor::positionInBlock() may give users the idea that it can be displayed to the user as the visual position of the cursor in the current block. This becomes confusing with some writing systems, since e.g. a surrogate pair will count as two characters while only representing a single visual grapheme. Since it is an side effect of the encoding that will be unexpected to many, and since it also touches on some linguistic complexities, we add a note to the documentation to make users aware of the consideration needed. Task-number: QTBUG-74725 Change-Id: Iba28ba8a6ad07ee38dbb7e6a5a4b68c93d4da76a Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | * | | | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-034-13/+41
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I99a27f9a0402e1ccad45a2d062d784f8d9a08dd3
| | | * | | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-024-13/+41
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia5d893e57deb78bc32e2053a5a79543ff847fe32
| | | | * | | Forward physical parameters for derived QImagesAlexander Volkov2019-04-011-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More specifically, for masks and rotated images. Add tests for it, also add tests that image metadata is forwarded for converted and copied images. Fixes: QTBUG-49259 Change-Id: I05d4a468b17f53a2625500b871c01b2c53b981a1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * | | Forward devicePixelRatio in QPixmap::mask()Alexander Volkov2019-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add a test checking that devicePixelRatio is forwarded to derivatives of QPixmap. Change-Id: Idb2b3f033ccc0fd49bf54b11f5dffbce5a19b006 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | | * | | Fix assert/crash when creating QBrush with null QGradientEirik Aavitsland2019-04-011-4/+8
| | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QBrush constructor taking a QGradient would assert or crash if passed a null (NoGradient) gradient. But it is not necessary for the API to be as brittle as that: instead the result can simply be a null QBrush object, i.e. the same as the default QBrush() constructor creates (style == NoBrush). This issue comes up now since with the recent introduction of QGradient presets, the API opens for using QGradient directly, whereas earlier, only the subclasses QLinearGradient etc. were to be used. Fixes: QTBUG-74648 Change-Id: I1a9b1c4654e4375aa6684700a262cc0946851448 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | | * | Fix alpha blending regression with WA_StacksOnTop QOpenGLWidgetsLaszlo Agocs2019-03-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0bc42886898 in Qt 5.6 introduced support for premultiplied alpha in the raster-rendered QWidget content. Unfortunately this introduced a regression for OpenGL content from QOpenGLWidgets with WA_StacksOnTop set: these used standard alpha blending in 5.5 and earlier, and switching them to premultiplied (in case the - unrelated - raster content has a _Premultiplied QImage format) breaks all content that was done with non-premultiplied alpha in mind, for example the qopenglwidget example's "Transparent background" checkbox. Restore the pre-5.6 behavior. Fixes: QTBUG-74285 Change-Id: I76fcadd53cd436efa2b619b8d6739270995d044f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | | | Revert "Revert "Remove deprecated screen maintenance functions in ↵Liang Qi2019-04-015-64/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformIntegration"" This reverts commit 300940a6c9eb0f74cefda7d76a5d19f56ec50253. The fixes for leaf modules landed already. Task-number: QTBUG-74816 Change-Id: I1c7f0705c20d030419ceedca485106af73946b3c Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>