summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* QtGui: Use Q_DISABLE_COPY_MOVE for QPA interface classesFriedemann Kleint2018-12-1310-10/+23
| | | | | | | | Introduce Q_DISABLE_COPY_MOVE or replace existing Q_DISABLE_COPY and add default constructors where needed. Change-Id: Ibd14ee9d1d69e64f6289efe789d4b64a3d6cb998 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Qt Forward Merge Bot2018-12-133-3/+14
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-133-3/+14
| |\ | | | | | | | | | Change-Id: I0fe623517af28e408b642c879efd59f633ab63ac
| | * qt_imageFromWinHBITMAP(): Fix memory corruption when converting from bitmaps ↵Friedemann Kleint2018-12-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with low depths Insufficient memory was allocated when asking GetDIBits() to convert to 32bit. Fix allocation size and use a QScopedArrayPointer. Fixes: QTBUG-72343 Change-Id: I45f79c913a243316e01bc6efed08e50ccc7d25f4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Avoid crash in blitting or fast draw when QPointF is too bigAllan Sandfeld Jensen2018-12-111-0/+8
| | | | | | | | | | | | | | | | | | | | | Change-Id: I88182d5d95fda15d33836f16dee78167685b3765 Fixes: QTBUG-72392 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
| | * Doc: Fix typo in snippetPaul Wicking2018-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Resolves "reference to non-static member function must be called" error. Fixes: QTBUG-72403 Change-Id: Iebd865ff553736df43548b72b45ed3f4711fffc1 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | | Add Grayscale16 Image FormatAllan Sandfeld Jensen2018-12-1211-76/+311
|/ / | | | | | | | | | | | | | | | | | | [ChangeLog][QtGui][QImage] Added support for 16-bit grayscale format. Together-with: Aaron Linville<aaron@linville.org> Task-number: QTBUG-41176 Change-Id: I5fe4f54a55ebe1413aa71b882c19627fe22362ac Reviewed-by: Nick D'Ademo <nickdademo@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Use a QMultiMap for the weighted rulesLars Knoll2018-12-122-4/+4
| | | | | | | | | | | | | | and get rid of one usage of insertMulti() Change-Id: I26a61dcdd4d778590145c38ae7f39d77ad39a51f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Use Q_DISABLE_COPY_MOVE for private classesFriedemann Kleint2018-12-1217-17/+17
| | | | | | | | | | Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Work around GCC bug in generating 64-bit population of SSE registerThiago Macieira2018-12-121-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We know what code we want it to generate, so I just replaced the _mm_set1_epi64x() with the code we want it to generate. Except that GCC sees through and tries to "optimize" my code... so that asm() statement makes it separate the two operations. This generates optimal code for both 32- and 64-bit. 64-bit: vmovq %rdi, %xmm0 vpbroadcastq %xmm0, %ymm0 32-bit: vmovq 8(%esp), %xmm0 vpbroadcastq %xmm0, %ymm0 See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80820 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87976 Change-Id: I42a48bd64ccc41aebf84fffd15664109b97fe42b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add an SSSE3 implementation of qt_memfill24Thiago Macieira2018-12-122-1/+76
| | | | | | | | | | | | | | | | | | | | | | | | Brought to you by the PSHUFB instruction, introduced in SSSE3 (implementation also uses PALIGNR just because we can). The tail functionality makes use of the fact that the low half of "mval2" ends in the correct content, so we overwrite up to 8 bytes close to the end. Change-Id: Iba4b5c183776497d8ee1fffd15646a620829c335 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add a qt_memfill24 implementationAllan Sandfeld Jensen2018-12-122-19/+59
| | | | | | | | | | | | | | | | | | | | This function gets called from qt_rectfill_quint24, which is used by the RGB666, ARGB6666_Premultiplied, ARGB8555_Premultiplied, and RGB888 formats. Together-with: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Iba4b5c183776497d8ee1fffd1564585fdee835c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Actually make QT_MAX_CACHED_GLYPH_SIZE the max glyph sizeTor Arne Vestbø2018-12-111-1/+1
| | | | | | | | | | | | | | | | | | This effectively means we'll start drawing text with a pixel size of 64 using cached glyphs, whereas before we would treat this as the cutoff and draw it using painter paths. Change-Id: Ie58212ef9217c8f8a69a92e48a8788f191b99415 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Use Q_DECL_VECTORCALL in a few more placesThiago Macieira2018-12-116-75/+85
| | | | | | | | | | | | | | | | | | | | | | There were a few functions that passed vectors in parameters but did not mark as vectorcall. I've taken the opportunity to de-macroify one macro, but I'm not going to do it for the rest. Change-Id: I42a48bd64ccc41aebf84fffd1564bfc21faa2a14 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add AVX2 versions of qt_memfill32 and qt_memfill64Thiago Macieira2018-12-115-5/+76
| | | | | | | | | | | | | | | | | | | | The implementation is almost the same 4-way-unrolled loop, but because of the wider registers, we fill 128 bytes per loop. Unlike the SSE2 implementation, the AVX2 version uses unaligned stores and won't try to align in the prologue, matching glibc's __memset_avx2 (also unaligned). Change-Id: Iba4b5c183776497d8ee1fffd15637ccb2a7b83bc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add SSE2 qt_memfill64Thiago Macieira2018-12-114-23/+67
| | | | | | | | | | | | | | | | Implemented by merging with the qt_memfill32 implementation in a non-inlining function. Change-Id: I343f2beed55440a7ac0bfffd15636f8ba995a2bd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-111-1/+1
|\| | | | | | | Change-Id: I91e684e74c36467efda8ded6ed19791baa0c1a1f
| * macOS: Reset font glyph caches when application theme changesTor Arne Vestbø2018-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | Our glyph caches on 10.14 are based on the application appearance, so when the application goes from dark to light or light to dark, we need to reset and re-populate the glyph-caches to account for the new appearance. Change-Id: If019d8cfa33ffb2b14747444b2ff74b288992f55 Fixes: QTBUG-71018 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QtGui: Remove unused brushes [-Wclazy-unused-non-trivial-variable]Sergio Martins2018-12-102-3/+0
| | | | | | | | | | | | Change-Id: If7e5340ec8acdfd70ea919286da5940db7a4def9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Refresh QGuiApplication's devicePixelRatio cache when screens changeSteve Mokris2018-12-103-8/+27
| | | | | | | | | | | | Task-number: QTBUG-63548 Change-Id: Id934cda6e15449c00c80a646055899f49580da88 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-093-58/+66
|\| | | | | | | Change-Id: I10ae61ec6867b38601d85d6fc34e1f6a6ba0cc11
| * Allow overriding the maximum cached glyph size via the environmentTor Arne Vestbø2018-12-081-2/+7
| | | | | | | | | | | | | | Useful for testing. Change-Id: I8cfd4453018cba0301287ad6a1c15a88cdc33c1c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Revert "Ensure alignment of image-data"Allan Sandfeld Jensen2018-12-081-11/+3
| | | | | | | | | | | | | | | | | | | | | | This reverts commit ae8389e19c5804c867b2981311c623003a691474. The result of malloc should be aligned in any case, and this change conflicts with the use of realloc on the data elsewhere. Change-Id: I01773132b240614a2656dd3013490b0df9cd14a7 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * untangle the egl-x11 relationship in the build systemOswald Buddenhagen2018-12-071-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | egl-x11 is used in two places: - the eglfs-x11 plugin, which has a hard dependency on xcb-xlib - the xcb-egl plugin, which has a soft dependency on xcb-xlib that means that the egl-x11 configure test needs to be untangled from xcb, and that eglfs-x11 should be a separate feature with a proper dependency declaration. when the plugins that need egl-x11 are not built, it also makes no sense to build the respective integration in the egl_support module (even if it's possible to coax it into building), so adjust things accordingly. Change-Id: Ic729d0b7c893dd00844567329205c24ea2703033 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * configure: atomize xcb-* tests properlyOswald Buddenhagen2018-12-071-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | xcb is a dependency which should be detected upfront. same for xlib. this also removes calls to functions coming from the dependencies from the tests (both because these calls prove nothing, and because at some point we will stop linking transitive deps). Change-Id: Iac77305eab33ea8ff5c71302cef980eb908d8403 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * configure: convert xlib to a proper library definitionOswald Buddenhagen2018-12-071-14/+16
| | | | | | | | | | Change-Id: I1623aee9e8632e4bfd466e09e275cc23f94c6dab Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * wasm: fix freetype library sourceOswald Buddenhagen2018-12-071-1/+1
| | | | | | | | | | Change-Id: Ib99c4c178808c7325e55e85a1548542ae3c57524 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
| * configure: fix linking with statically linked freetypeTim Blechmann2018-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | freetype depends on zlib. using statically linked freetype as system library lacks the usage requirement to link with zlib. so we need to add this manually. Task-number: QTBUG-63115 Change-Id: Iaf0f3027bd9d1386fcc1ecfbfbe07ab09b2d0bb9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-082-15/+1
|\| | | | | | | Change-Id: Ied1194730e75a6f30839bbf5429aa2699230288e
| * Add a note about virtual_hookThiago Macieira2018-12-071-0/+1
| | | | | | | | | | Change-Id: I1ff3b344ec5a4499bb25fffd156b2bf6a7d88625 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * configure: remove xkbcommon_evdev transition hackGatis Paeglis2018-12-071-15/+0
| | | | | | | | | | | | | | | | It was added in c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a. wayland was updated in a8fed20181729cae70de43079c4a34ad1780cfd7. Change-Id: Ibf458815c3b61c5f936f147086db3d2b5782c175 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Use a QMultiMap for the fontengine cacheLars Knoll2018-12-072-3/+3
| | | | | | | | | | | | | | Cosmetic, so we can avoid using QMap::insertMulti(). Change-Id: If7c971e127af0537dd28bd25f7803804e7e01170 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Pass non-trivial types by const-ref in range-loop [-Wclazy-range-loop]Sergio Martins2018-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | corelib/serialization/qcbormap.h:176:14: warning: Missing reference in range-for with non trivial type (QPair<QCborValue, QCborValue>) corelib/serialization/qjsoncbor.cpp:820:10: warning: Missing reference in range-for with non trivial type (QJsonValue) gui/kernel/qguiapplication.cpp:1171:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/dialogs/qprintdialog_unix.cpp:741:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/kernel/qprinter.cpp:1851:10: warning: Missing reference in range-for with non trivial type (QVariant) tools/qlalr/cppgenerator.cpp:463:8: warning: Missing reference in range-for with non trivial type (Name) Change-Id: I327b0f116e329e55952ed5740a5f5af4b2918392 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.12' into dev" into ↵Liang Qi2018-12-0410-111/+122
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-0410-111/+122
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp Change-Id: I4916e07b635e1d3830e9b46ef7914f99bec3098e
| | * Set correct vertical position for text following a very large imageLars Knoll2018-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the document is paged and contains an image spanning more than one page, correctly set the y position for everything following that image. Change-Id: I1c584c7a907c1728c2965f1dc3fdc56069ab3172 Fixes: QTBUG-59886 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix alignment of temporary QRgba64 buffers on win32Allan Sandfeld Jensen2018-11-301-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The alignment of long long on 32-bit windows is only 32-bits, but we should be safe to assume it is aligned at 64-bit. Since QRgba64 is a public type, we can't fix the alignment there without breaking ABI, so instead fix it where temporary buffers are allocated. At the same time be consistent about using QRgba64 so we can switch to it enforcing alignment in Qt6. Change-Id: Ie15c305bc867c62a13df8eb2b1678e92174e1f97 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * xcb: remove old work-around for building with util-wmGatis Paeglis2018-11-301-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commits that added this code: 7ce8491280990350162933a0716d1b014f65aeb6 and f005dee1b3692a09e47782dcff9b5b07aa659b51 I guess this was a work-around, before we started bundling XCB libs a year later in 21bd66e1ea06e466754ab06ee2c5f8b737bb4bd7 0.3.8 was released in 2011-04-26 and we are bundling 0.3.9, so it is safe to remove the include work-around as well. Change-Id: I5794f40d86e10ebdad984aa4b61311979aaadcf3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * CoreText: Remove handling of QFontEngineMulti's highByteTor Arne Vestbø2018-11-302-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a leftover from when the Cocoa plugin used QFontEngineMulti exclusively. Nowadays QFontEngineMulti will strip out the highByte before calling into the real engine. Left an assert just in case.. Change-Id: I6cb26d20a908d7c3aaf096297fca160805fdb85b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * src/3rdparty: remove xkbcommonGatis Paeglis2018-11-301-24/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only reason why we bundled this library ~6 years ago was because it was not available on distributions that we supported at the time, but library was a hard dependency for XCB plugin. See: 2122e731abdb619249df89642c0800640b2fa428 Later more and more projects started to depend on it (compose input context plugin, libinput, mir, wayland). The configuration had become too complex, because some projects used bundled and some used the version from the system. Having libxkbcommon in 3rdparty sources is not necessary anymore, after RHEL 6.6 was removed from the list of supported platforms for Qt 5.12. Ubuntu 16.04 - 0.5.0 Ubuntu 18.04 - 0.8.0 openSUSE 42.3 - 0.6.1 RHEL-7.4 - 0.7.1 This will also simplify further development, e.g. QTBUG-42181 Bumped the minimal required version 0.4.1 -> 0.5.0. The patch also contains a code marked with "TRANSITION HACK", which is temporary needed so we can update the dependent wayland module. [ChangeLog][Third-Party Code] Removed xkbcommon from bundled sources. This library is present on all supported platforms. The minimal required version now is 0.5.0. Task-number: QTBUG-65503 Change-Id: Iec50829bb6f8fbb19f3c4e4ad62e332beb837de5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Fix crash in QSimpleDrag when no platform windowVal Doroshchuk2018-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to return top level window if it was not created. It means no platform resources have been allocated. Events might not be delivered if the wrong window is returned. Fixes: QTBUG-70544 Change-Id: I43462974f70871470f7b7490dc2b3c08846f77b1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * macOS: Share code for resolving CGImage bitmapInfor for a QImageTor Arne Vestbø2018-11-283-40/+39
| | | | | | | | | | | | | | | | | | | | | Removes assumptions about QImage format in a few places. Change-Id: I515701be53190429a48956c31986fa0804806406 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * macOS: Fix use of deprecated enum valueTor Arne Vestbø2018-11-281-1/+1
| | | | | | | | | | | | | | | Change-Id: Ibf979837e1adcadcbb100d059b06b1a48157eab6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Ensure alignment of image-dataAllan Sandfeld Jensen2018-11-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on the return value of malloc having the correct alignment, use proper non-throwing new[] operators. Change-Id: I06c6c619e21c848f3d184bdb7cef8c5589c1c7ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Support style name property in QTextCharFormatEskil Abrahamsen Blomfeldt2018-12-042-0/+31
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The support for setting the style name in the QTextDocument API was never added, as revealed by the example in the linked bug report. The actual bug reported there (style names not working with some Helvetica Neue) is not reproducible anymore. [ChangeLog][QtGui][Text] Added support for setting the font's style name in QTextCharFormat. Task-number: QTBUG-22813 Change-Id: I8f4d12151c3611aa30965fd963bc93f7c4264e23 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Rename QList<T>::swap(int, int) to swapItemsAt()Lars Knoll2018-12-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | The old name was confusing as it conflicted with QList<T>::swap(QList &other), that was doing something completely different. Rename the method to swapItemsAt() which is a lot clearer. Change-Id: Iac77a1e790a7256766f83a24d2a243c880d875f4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-272-5/+1
|\| | | | | | | Change-Id: I04afffdce6b78856d0301eb583f21d334c7466b0
| * Remove macOS specific path that causes reverse vertical advanceAllan Sandfeld Jensen2018-11-221-4/+0
| | | | | | | | | | | | | | | | | | This special case of macOS appears to be outdated and now causes a bug. Change-Id: Ie9c074bb69eda7abfe3d123f807b517334cc2958 Fixes: QTBUG-69803 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * wasm: fix qpa plugin build system integrationOswald Buddenhagen2018-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | fix the plugin name (it was missing the leading 'q') and the name used in configure (the latter making it unnecessary to mess with it in the mkspec). the qt.prf override which forced linkage of the plugin is also removed due to being completely redundant. Change-Id: I94687a34a295c36754e36a298af902b656ba2ecc Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Warn when using deprecated methodsLars Knoll2018-11-261-0/+3
| | | | | | | | | | Change-Id: Id6e65d83e9279407b4b02967e4044f33d8c6ae01 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>