summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Qt GUI: Depend on qtprintsupport documentation moduleTopi Reinio2020-09-291-0/+1
| | | | | | | | | | This adds 'Inherited by:' links to print support classes deriving from Qt GUI types. Pick-to: 5.15 Task-number: QTBUG-77126 Change-Id: I84ecee5df8cae0635d42653b1483db6b3c6074ee Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix qdoc warnings: remove docs for inherited/implicit membersVolker Hilsheimer2020-09-281-23/+0
| | | | | Change-Id: I8654dbc3c0d1b86690f805cc1282e581dbcc5c55 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix qdoc warning: button(s) are members of QSinglePointEventVolker Hilsheimer2020-09-271-25/+0
| | | | | | | ... and documented there already. Change-Id: Ie66362d3b668caf93b100befef08bc91ae8add2f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use WAYLAND_DISPLAY and DISPLAY instead of XDG_SESSION_TYPEJohan Klokkhammer Helsing2020-09-271-18/+35
| | | | | | | | | | | | | | | | XDG_SESSION_TYPE is a non-standard part of systemd, and not set if you run a compositor from the command line, for instance. [ChangeLog][Wayland] XDG_SESSION_TYPE is no longer used to determine which platform plugin to use. Instead, if WAYLAND_DISPLAY is set in the environment, wayland is used. Similarly, if DISPLAY is set, xcb is used. If both are detected, wayland will be attempted first, then xcb. Gnome-shell is still skipped for automatic wayland detection. Fixes: QTBUG-75732 Change-Id: Ieed123330662dc29eafa31148a9b99ba0810de90 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Preserve formats in QImage::scaled()Allan Sandfeld Jensen2020-09-261-12/+48
| | | | | | | | | Do not always use the smoothScaled routine, the normal routines are also optimized, and do not convert to alpha formats when not necessary. Task-number: QTBUG-49719 Change-Id: I6ee9b620cc259472c419e7363357f41ce29b594a Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Avoid heap-buffer-overflowRobert Loehning2020-09-251-0/+2
| | | | | | | | | [ChangeLog][QOutlineMapper] Avoid heap-buffer-overflow Fixes: oss-fuzz-24615 Pick-to: 5.12 5.15 Change-Id: Ia67e1fb830850d04f068d8b5c009687f3deff156 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* rhi: Switch command lists to QVLALaszlo Agocs2020-09-253-3/+3
| | | | | Change-Id: Ic163533eee973f0ee2f3e2efe25390caa57dd659 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: gl: get rid of a wrapper QByteArray where a raw ptr sufficesLaszlo Agocs2020-09-251-3/+2
| | | | | | | | This is a visible performance increase actually, given this is on a quite hot chode path. Change-Id: I165bfa0d4e490f80078551efb4bf2fe8e72d3596 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Skip comparing to this in isCompatible testsLaszlo Agocs2020-09-252-0/+9
| | | | | Change-Id: Ie1855f992315f6e02986016a254127cec0ac94c8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: gl: d3d: Do not use QByteArray where there is no pointLaszlo Agocs2020-09-254-14/+17
| | | | | | | | | The real benefit in practice is getting rid of profilers going wild about QByteArray::begin() and similar. The actual perf. gain is fairly small. Change-Id: I25e4c762f303b41f0aaf914bc62751f3265d3cf8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Drop the zeroing out of resource binding structsv6.0.0-alpha1Laszlo Agocs2020-09-252-10/+2
| | | | | | | | | | This has a non-insignificant cost (since the size is at least 260 bytes) in renderers that construct a lot of these objects per frame. After changing the qHash implementation to be lighter we no longer rely on qHashBits, so zeroing it is not essential anymore. Remove it. Change-Id: If1fbd8dfd46fb3f0e9ea5a3c4794d24b8aeac1ba Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: vulkan: Fix mipmap generation for cubemapsLaszlo Agocs2020-09-254-80/+81
| | | | | Change-Id: Ia1aab06214be802aaabc97ffefa28947e11148e3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Expose XKB::XKB as public dependency of Qt::GuiPrivateJoerg Bornemann2020-09-251-0/+4
| | | | | | | | Headers of xkbcommon are used in private headers, and consumers of Qt::GuiPrivate should automatically link against XKB::XKB. Change-Id: I99c67b5f291f64b529aed1499a00a215b5db3be2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Update CMake snippets to Qt 6Kai Koehne2020-09-251-2/+2
| | | | | | | Change-Id: I53021781a25c141db5d5fc6771192cd8d6ed732a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Replace Q_REQUIRED_RESULT with [[nodiscard]]Allan Sandfeld Jensen2020-09-2511-47/+47
| | | | | | | It was already used many places directly making the code inconsistent. Change-Id: I3b14bc6c333640fb3ba33c71eba97e78c973e44b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFontEngine: Do not call getSfntTable with uninitalized valueChristoph Schleifenbaum2020-09-251-2/+2
| | | | | | | | | | On FreeType font engine this results in a call to FT_Load_Sfnt_Table with a pointer to an uninitialized value passed in as FT_ULong* length, crashing. Instead initialize value to 0. Change-Id: I50d6df3b2296a05640d939e862bc50adb0fec921 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit e041f5459660eaa7108fa5888e77e64f7d1b3d1d)
* Get rid of QMutableEventPoint::stationaryWithModifiedPropertyShawn Rutledge2020-09-253-20/+0
| | | | | | | | | | | | | | | | Omitting stationary points from touch events is such a marginal optimization that this code probably isn't worth maintaining. It wasn't implemented correctly this time either, according to the tst_QQuickMultiPointTouchArea::stationaryTouchWithChangingPressure() test. [ChangeLog][QtGui][QPointerEvent] We no longer attempt to avoid delivery of stationary points within QTouchEvent: every pressed point is now included in every TouchUpdate event. Task-number: QTBUG-77142 Change-Id: If1fd666fb3057a17e0dffdd7ca7138693126b02b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix some qdoc warnings: undocumented parametersVolker Hilsheimer2020-09-252-3/+4
| | | | | Change-Id: I5d37f620caccbd1445c99a602b71779bdedd37d3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Give QPixmap a move constructorVolker Hilsheimer2020-09-232-0/+11
| | | | | | | | | | | | It already has a move-assignment operator, and implements swapping. This requires a specialization of the QExplicitlySharedDataPointer destructor to be forward declared, and an implementation that is identical to the default version. Otherwise we would need QPlatformPixmap to be fully defined in the public QPixmap header. Change-Id: I2651bbc29a7083a93e3b3ad671d3aeea659b7d5a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* rhi: gl: Enable seamless cubemap filteringLaszlo Agocs2020-09-231-0/+10
| | | | | | | | ...when available. This is mandatory in order to match results with other APIs where this is always on. Change-Id: I3b8ef2cb806a7297c83e60a3eb1fa71b50780dbe Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Simplify QHighDpi::fromNativeLocalExposedRegion()Alexander Volkov2020-09-231-7/+3
| | | | | | | ... by using QRectF::toAlignedRect(). Change-Id: I310b2f0ad87c541aa0d63d6a8061783aff791abb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix Qt6 todo in qcssparserAllan Sandfeld Jensen2020-09-231-3/+6
| | | | | | | | Colors with wrong number of elements are now invalid. Change-Id: I32c934894de86095d9790baa5f0d2001d76bcd3c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* rhi: Reuse the data in buffer ops in res.update batchesLaszlo Agocs2020-09-236-25/+60
| | | | | | | | Because having profilers bombarded with mallocs (due to creating deep copy QByteArrays) is not nice. Change-Id: I848f41f3465d6dc2a58a193cc863495aacf13d79 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Reuse buffer/texture op entries in res.update batchesLaszlo Agocs2020-09-237-36/+125
| | | | | | | | More of an enabler for reusing the data in the individual entries since not clearing the QVLA does not give us much on its own. Change-Id: Ief9761f75382c3373cc2bc7b866eb59fdd8b3277 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Report an "optimal capacity" from res.update batchesLaszlo Agocs2020-09-233-2/+30
| | | | | Change-Id: If47eddf3fe7d365c80b0a15712ef155a6898d904 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Do not just pick the first free res.upd. batch all the timeLaszlo Agocs2020-09-232-1/+13
| | | | | | | | | Rather, utilize all the available ones in the pool, picking the next available batch after the one we picked previously (with wrapping over as necessary). Change-Id: I5f26e127a406c2dd07d155712429c72ad4f0f0f1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: d3d: Fix dynamic offsets with multiple buffersLaszlo Agocs2020-09-233-15/+37
| | | | | | Fixes: QTBUG-86821 Change-Id: I57f86bf0f7e95b92f5b2c5fee587112ecf0fc8e6 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-234-237/+155
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix documentation of QPointerEvent::pointsVolker Hilsheimer2020-09-231-15/+6
| | | | | | | As drive-by, fix qdoc warning in related internal documentation. Change-Id: I7716a9b126e38e99dcd11c6af2e91b8ec7bf4346 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix some qdoc warnings: printer API cleanupVolker Hilsheimer2020-09-221-107/+0
| | | | | | | | | | | | Puge references from removed QPrinter methods. QPdfWriter's setter API documentation only added the word "PDF" to the QPagedPaintDevice documentation. This was not useful - when the latter talks about "page", it's obvious what is meant in the context of PDF, so remove the duplication. Change-Id: I7b16cbc82de8d35b5224288c9e36deff4e01fb44 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix some qdoc warnings: function parameter namesVolker Hilsheimer2020-09-222-9/+12
| | | | | | | In QTextDocument and QTextFormat, standardize language a bit. Change-Id: I7c81ecc7a32e36ec32214e6b5386a2827cfcbc3f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix some qdoc warnings: typos and qdoc syntaxVolker Hilsheimer2020-09-221-1/+1
| | | | | Change-Id: Idf5c1490330e0f2e5d4bcf920eb03fc9993b3c8a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Inline trivial function used only by deprecated functionsEdward Welbourne2020-09-211-17/+4
| | | | | | | | | | | QIcon had two methods calling a trivial local static; both were deprecated. Inlined the local static rather than #if-ing it on the same deprecation #if-ery. Shift the #if-ery on the deprecated methods to embrace also their docs. Change-Id: I5f6755ef99dd6b4abddc343c9bedf4815e50d567 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Define inverted QRects consistentlyAllan Sandfeld Jensen2020-09-211-35/+3
| | | | | | | | | | | | | | | | Changes the definition of invalid QRects to be more consistent. This simplifies the logic, and makes it possible for us to fix normalized() so dimensions don't change. The actual API is not changed except for inverted rects. Only one use-case for the old normalized() function existed, and has been reimplemented as QRect::span(). Fixes: QTBUG-22934 Change-Id: I29dad2952dc6c8e84a6d931898dc7e43d66780f3 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Cleanup API of QMimeDataLars Knoll2020-09-213-10/+10
| | | | | | | | | | | | | Do not use QVariant::Type anymore, instead use QMetaType For some reason, this pushed the qvariant autotest over the limit where MSVC requires the /bigobj flag, so add that one. [ChangeLog][QtCore][QMimeData] The signature of the virtual retrieveData() function has changed and now takes a QMetaType instead of a QVariant::Type. Change-Id: Ib46773bd731ee2177b1ef74d8162d744be7017ef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* xcb: add xcb-util dependency for xcb-imageLiang Qi2020-09-213-4/+26
| | | | | | | | | xcb-image includes xcb_aux.h, which is part of xcb-util. Fixes: QTBUG-86287 Pick-to: 5.15 Change-Id: I253308008c5baeb1d061ef19f516ae6ab6dff52c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Support signed integer attributes on QRHIInho Lee2020-09-217-19/+71
| | | | | | | Previous UIntAttributes feature is renamed as IntAttributes. Change-Id: I4b4a87a0eebf37291da832605f7bee8fb2d4e62b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc: Correct link errors qtbaseNico Vertriest2020-09-211-1/+1
| | | | | | Task-number: QTBUG-86295 Change-Id: I27f6bbdadffb08a8794520a14dfe0e2334979575 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Emit CancelGrabExclusive when one grabber is replaced by anotherShawn Rutledge2020-09-181-1/+2
| | | | | | | | | | | | | | Qt Quick Pointer Handlers depend on this behavior: QQuickPointerHandler::onGrabChanged() receives only the grabber that was losing the grab or the one that is receiving it, not both at the same time. UngrabExclusive means the original grabber simply relinquished the grab by setting the exclusive grabber to null. CancelGrabExclusive means the new grabber took over the grab that the old grabber had before. Task-number: QTBUG-86729 Change-Id: Iefca6fe91b11fcb03d2c6ac3598841c924facb22 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Add links to Qt 6 changes files from module indexPaul Wicking2020-09-181-0/+4
| | | | | | Task-number: QTBUG-84051 Change-Id: Iac25df135c9d73a990b41243e08cd38ea78296a4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* rhi: Expose compute threadgroup limits in ResourceLimitsLaszlo Agocs2020-09-188-1/+123
| | | | | | | | | | As OpenGL ES and Vulkan ruin the day with the spec mandated minimum value for max threads per threadgroup being only 128, clients need a way to decide if their compute shader (local_size_*) is suitable for use at run time. Change-Id: I72b4fc97032406340623add82ea4d9544ebe9fdc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* xpm handler: fix read error caused by off-by-one in overflow checkEirik Aavitsland2020-09-181-2/+2
| | | | | | | | | | | | | The recently introduced overflow check for 8 bit images was too aggressive, causing the last pixel on each line to be rejected. As a driveby, add the same (fixed) overflow check also for 32bit images. Pick-to: 5.15 5.12 Fixes: QTBUG-86691 Change-Id: I62e4d5884e314f1171cb5a3e2c48657ce7259676 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix running with placeholder screen and high-dpi enabledEskil Abrahamsen Blomfeldt2020-09-181-0/+1
| | | | | | | | | | | | | | | | | After we started defaulting to high-dpi enabled, it was discovered that it does not work correctly with the placeholder screen. Since the placeholder screen has no physical size, and the default implementation of logicalDpi() divides by the physical size, we got a scale factor of NaN in the high-dpi code. The effect of this was that the nooutput test in Qt Wayland would fail, because it did not get the events it was expecting, since the window geometry was never set to a valid rect in the resize() call. Task-number: QTBUG-86698 Change-Id: I7ee68db9a13446b414502ae0f26fd214531c673a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix deprecation warning in QIcon::actualSize()Edward Welbourne2020-09-181-2/+10
| | | | | | | | The non-deprecated one called the deprecated one :-( Inline the deprecated one and simplify, given the null pointer passed down. Change-Id: I5b99053357fc3be109e61ccf1161835bf527b686 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Rename is[Begin|Update|End]Event, reimplement in QWheelEventShawn Rutledge2020-09-172-10/+38
| | | | | | | | | | | | | | These states correspond well with ScrollPhase, and this abstraction makes it possible to handle wheel events the same way as mouse events in Qt Quick: on "begin" we deliver to all Items and Handlers until all points (the only point) are accepted; on "update" and "end" we deliver only to the exclusive grabber, if there is one, and to any passive grabbers. Change-Id: I702dbd4f2c1bf5962eb3dbb9e4b725300a00a887 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* rhi: Enhance compute dispatch docsLaszlo Agocs2020-09-171-0/+12
| | | | | | | | These docs are not part of the generated docs due to QRhi being private, but nonetheless keep it useful. Change-Id: Ic46aaa4cd329535c37fffcd514ba354dff4bfb5c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Improve srb hash perf somewhatLaszlo Agocs2020-09-171-4/+27
| | | | | | | | | Do not qHashBits on the whole data that is at least 260 bytes, a big part of it often unused. Just hash binding/stage/type and the first resource pointer. Change-Id: If9b3dc9acf36edf225302b1216d91e87b652b8ef Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Deprecate implicit QPixmap conversion to QBitmapVolker Hilsheimer2020-09-174-45/+73
| | | | | | | | | | | | | | | | It is lossy, so should be requested explicitly, using a dedicated fromPixmap factory function. Deprecate the constructor and assignment operator, and make the constructor explicit. [ChangeLog][QtGui][QBitmap] Implicitly constructing and assigning to a QBitmap from a QPixmap has been deprecated, and the respective constructor has been made explicit. Use the fromPixmap factory function instead. Change-Id: I68ce85b26c901415137b664a1db687021d48bae0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix deprecation documentation about margin and orientation in QPrinterÖmer Fadıl USTA2020-09-172-4/+4
| | | | | | | | There were a small typos about those methods and fixed with correct ones. Fixes: QTBUG-86635 Change-Id: Ib853e502fdcdafdf3ddf7ef6d25d368ebc2a631f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QPointingDevPriv::setExclusiveGrabber: emit grabChanged with point foundShawn Rutledge2020-09-171-1/+1
| | | | | | | | | | | | | | | | | | ...not with the given point. Since QEventPoint has a constructor that takes an id, it's possible to write something like pointerEvent->setExclusiveGrabber(pointId, object) which will construct a QEventPoint on-the-fly, containing only an id. (That was unintentional, but perhaps useful sometimes.) setExclusiveGrabber() looks up the persistent point, but if we emit the signal with the given point, it is missing the device. A handler connected to that signal might reasonably assume that the point is a complete instance; so we'd better emit the complete instance that we found. (OTOH if the given point was a detached instance, it might also be unexpected that the signal emits the persistent instance instead of the given instance.) Amends 2692237bb1b0c0f50b7cc5d920eb8ab065063d47 Change-Id: Iee16363dcb22c1dc07b0cc0a81930218e22fa19e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>