aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * JIT: Add missing {STORE|LOAD}_ACC() to CreateCallContextUlf Hermann2023-03-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot assume anything about the accumulator register after calling PushCallContext::call(). Also add a note about not needing to re-load the accumulator on ThrowException. Fixes: QTBUG-111935 Change-Id: I7196585e1d2697c215f4fe87d8d7ac9b98b622a3 Reviewed-by: <carl@carlschwan.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 15ec024152a1d1d99a4934f7b2408e7af7b2552a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QQuickItem: Guard against cycles in nextPrevItemInTabFocusChainFabian Kosmale2023-03-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nextPrevItemInTabFocusChain already had a check to prevent running into cycles, it would however only detect if we reached the original item. If our cycle instead would loop between reachable items without ever returning to the initial one, as in the diagram below, then we would never terminate the loop. /-->other item<---next item initial-item \ ^ \ | --->different item To prevent this from happening, we keep track of all items we've seen so far. One last complications arises due to the fact that we do visit the parent twice under some cicrcumstances, but we already have the skip variable to indicate that case – we simply skip the duplicate check if it is set to true. Pick-to: 6.2 6.3 Fixes: QTBUG-87190 Change-Id: I1449a7ebf8f325f00c296e8a8db4360faf1049e4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Revert "Fix "white line on top and left side of screen" issue"Morten Sørvig2023-02-282-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a6897b9cee24c1631655c02cd41c3640e9d807a. This caused a regression on iOS where Qt painted to the bottom left quarter of the app window only. Fixes: QTBUG-111542 Change-Id: I9c56e410994966d01a29dfea45e5aec1f3e5a106 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.13' into ↵v5.15.13-lts-lgplTarja Sundqvist2024-01-049-15/+50
|\ \ | | | | | | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I7060c2fbc681a8bd0fc1be478db2ab67976db5b9
| * | Revert "Fix "white line on top and left side of screen" issue"Morten Sørvig2023-03-012-13/+11
| |/ | | | | | | | | | | | | | | | | | | | | This reverts commit 2a6897b9cee24c1631655c02cd41c3640e9d807a. This caused a regression on iOS where Qt painted to the bottom left quarter of the app window only. Fixes: QTBUG-111542 Change-Id: I9c56e410994966d01a29dfea45e5aec1f3e5a106 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
| * Doc: Mention QDS and UI files in Best PracticesLeena Miettinen2023-02-141-3/+24
| | | | | | | | | | | | | | | | | | | | | | Developers can easily break QDS .ui.qml files if they edit them as code. Link to the description of UI files in QDS Manual. Fixes: QTBUG-110354 Change-Id: Id5dc0e9fd420e0e4807a39d4f8d7d121e5137636 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> (cherry picked from commit 5fabb872e0041aaf134b33e140d8f8512c31455b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix "white line on top and left side of screen" issueMorten Sørvig2023-01-302-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproduced on Android, where devices sometimes have screen sizes which are not evenly dividable by the device scale factor (see QTBUG-87334 for examples). Get the surface size for renderSceneGraph() directly from the QPlatformWindow size. This avoids using the QWindow size, which might have been rounded and can yield a surface size which are off by a one or two of pixels. Also change the "logicalSize" calculation to always use the size passed to renderSceneGraph(), in order to avoid rounding errors also here. Fixes: QTBUG-87334 Change-Id: I23b5784305a876e1ef15ff6b01be09c6ce28409e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
| * StateMachine: Don't crash if no signal is passed to SignalTransitionUlf Hermann2023-01-261-1/+5
| | | | | | | | | | | | | | | | | | Rather, just reset the transition. Adapted from commit af4c8da54bbf057f3a8d7cf8a8e4146d35aad7f6 in qtscxml. Fixes: QTBUG-110286 Change-Id: I49a7588f771c4caa73e85334487d9d9c0260a7ce Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QJSEngine: Fix potential JS stack overflow cauased by spread operatorFabian Kosmale2023-01-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | createSpreadArguments could in theory allocate a (nearly) unbounded number of QV4::Values. Avoid this by checking whether we approach jsStackTop. This fixes CVE-2022-43591. Change-Id: I01aecb979da47b7261688c9f185dc33a50a579a5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 6511aa4344c1d47ede8546540fe70bdff8523545)
| * Fix Shape stroke color when changing alpha from 0 to non-0Laszlo Agocs2023-01-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of the stroke color lacks the extra checks that are performed when setting the fill color. Switching from "transparent" to another color involves setting not just the color-dirty flag but also the geometry-dirty since alpha == 0 may skip operations such as triangulating, meaning the work has to be performed later when once again switching to an alpha > 0 color. Change-Id: Ibd6d762cfcb07ca8b9c852553c979bcb4ee9fa21 Fixes: QTBUG-109882 Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 650e7d47f8e333761df86e60c290e885106b26c6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QQmlPropertyCache: don't depend on locale for toupperMarc Mutz2023-01-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The C toupper/tolower functions are locale-dependent. Given the right locale (Türkiye, e.g.), toupper(i) is either - İ (LATIN CAPITAL LETTER I WITH DOT ABOVE; if representable) or - i (unchanged; if it isn't) Both results are wrong for the present use-case. Use the new QtMiscUtils::toAsciiUpper() function instead. Amends d481f2ff518df1e44103d1850e7d52bd69260c34. Task-number: QTBUG-109235 Change-Id: Ib66593fc7eff3edc0cc16291ca3eae8bdf0dd8ed Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 179200d2a3fa0df28fbf3790f8ff1ee47d0926c0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Qml: Don't crash when as-casting to type with errorsUlf Hermann2023-01-031-2/+4
| | | | | | | | | | | | | | | | | | | | Such types don't have a compilation unit, but we still know their names. Fixes: QTBUG-98792 Change-Id: I2db8dea3a5a02ec1492f7f7a054fd3ad4c6ad69a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit e0cd201e91ae64b9c03e0128cd17656b00611fbb)
| * Flickable: prevent fixup() from being called while draggingOliver Eftevaag2022-12-202-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous patch 5647527a8cde84b51fff66fc482f02435770b3dd causes a regression. The purpose of the patch, that caused this regression, was to update the pressPos variables, in cases where the contentItem's geometry was modified externally, while a user were dragging the contentItem around. The mistake that was made, was how width and height changes were handled. We had previously added logic in setContentWidth() and setContentHeight() that would call fixup() (with immediate fixupMode) to ensure that the contentItem would immediately be repositioned inside the flickable's viewport, if the contentItem was being dragged. It turns out that setContentWidth() and setContentHeight() are being called from QQuickItemViewPrivate::updateViewport(), which happens quite often, while dragging. This would make fixup() and dragging constantly interfere with each other, since they'd not always agree on a specific position for the contentItem. This patch reverts the changes made to setContentWidth() and setContentHeight(), since it turns out that those changes weren't necessary after all. QQuickFlickablePrivate::itemGeometryChanged() only calls viewportMoved() on x and y changes anyways. Done-with: Jan Arve Sæther <jan-arve.saether@qt.io> Done-with: Santhosh Kumar Selvaraj <santhosh.kumar.selvaraj@qt.io> Fixes: QTBUG-109140 Change-Id: I0bddf8685d3afc1ae04b2c092212d3c1bd742c3b Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit b307bf3c4f63c6e04874a972c747f18e18ddc199) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix missing glyphs when using NativeRenderingEskil Abrahamsen Blomfeldt2022-12-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we look up glyphs with subpixel positions in the glyph cache, we use the calculated subpixel position (from a set of predefined subpixel positions) as key. In some very rare cases, we could end up with different subpixel positions when looking up an on-screen position than when we entered it into the cache, due to numerical differences when doing the calculation. The reason for this was that when entering the glyph into the cache, we used the 16.6 fixed point representation, whereas when looking up, we used the unmodified float. In some cases, the converted fixed point approximation might snap to a different predefined subpixel position than the floating point equivalent. To avoid this, we reuse the converted fixed point positions when looking up the glyphs in the cache. [ChangeLog][Text] Fixed an issue where text using NativeRendering would sometimes be missing glyphs. Fixes: QTBUG-108713 Change-Id: Iecc264eb3d27e875c24257eaefcfb18a1a5fb5be Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit 4bad329985b75090c68a70cceee7edadc172d7ab) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.12' into ↵v5.15.12-lts-lgplTarja Sundqvist2023-10-1115-31/+86
|\| | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: Ia60d01835108b0a461791e56388eb3dfe90649e2
| * QV4: Avoid memory corruption in Reflect.applyFabian Kosmale2022-12-054-9/+27
| | | | | | | | | | | | | | | | | | | | | | This extracts the check from Function.prototype.apply into a shared function, and uses it in Reflect.apply, which has the same issue. Task-number: QTBUG-107619 Change-Id: I899464c86554f9bbb5270a95bbe3fe27531e9a27 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 0e963a53c04b0dbe172cfb495b4d62dc8e2f31a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * doc: Add note to PinchHandler.translation property about macOS trackpadShawn Rutledge2022-12-011-0/+3
| | | | | | | | | | | | | | | | | | | | Translation doesn't happen with trackpad native gestures. Fixes: QTBUG-109002 Change-Id: I7d42b0d737d45405732a389560a6c77624831c9e Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 786e1748d4469c135a922a221024f3f9c421c0de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Revert "masm: Treat Android as generic Posix regarding mmap and friends"Ulf Hermann2022-11-252-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ffecc122d785de9c4c5defd8724526b8dd4982dc. It turns out that madvise() only fails when given MADV_WILLNEED as argument on the affected devices. MADV_WILLNEED is indeed optional. Since commit 2034e10c9378364ecc7aa1af27505562d86688de we do not crash on a failed MADV_WILLNEED anymore. Therefore, we can re-enable the linux code path for android. Task-number: QTBUG-107774 Task-number: QTBUG-106864 Task-number: QTBUG-106269 Change-Id: If67a38e4fc206bd5d5ed0ef8bf66ededd09d8f59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit ac4fea75379467dde9065825d3f15da3b86e9ad8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QML: Check for stack overflows when creating objectsUlf Hermann2022-11-222-3/+23
| | | | | | | | | | | | | | | | Fixes: QTBUG-106875 Change-Id: I3b0abda6948b79a9e3cf263f27885037fff1804c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit edc01fbfa430d6f0ce66f1871ab28e0f691ee252)
| * Fix wrong item-sizeHint-cache when StackLayout children were reorderedJan Arve Sæther2022-11-212-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the Tests_StackLayout::test_addAndRemoveItems() autotest The code uses an index to look up the cached size hints. This index corresponds to the layout's item child index (which doesn't have to correspond to the children index). The vector of sizeHints then had to be in sync with the index of the child layout items for this to work. The problem here was that if the first item in the stack was removed (or siblings was reordered), the vector was not adjusted for this (basically we could get the size hint of an previously removed item). In order to avoid to keep the QVector<SizeHints> index in sync with the layout children index, we change it to use a QHash instead, where we look up by QQuickItem*. QHash<QQuickItem*, SizeHints> Task-number: QTBUG-106520 Task-number: QTBUG-106521 Change-Id: I7c1f9fb018fcab093b074c45dfaba264f76749f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit c41075d9e2808f636d793c93e237f80a8ecadb2e)
| * Doc: Add missing QQuickWindow constructorHatem ElKharashy2022-11-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | QQuickWindow::QQuickWindow(QQuickRenderControl *control) should be part of the public API. The user can use QQuickRenderControl with QQuickWindow to control the scenegraph rendering. This constructor is used in the QQuickRenderControl example. Change-Id: I1bb38d64173c24ba835137897ef915dfde83b1f3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 7454d3b612eab92b8e91741fc1c51311cf80c3a2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Handle missing stops gracefully in Shape gradientsLaszlo Agocs2022-11-141-3/+5
| | | | | | | | | | | | | | | | Fixes: QTBUG-108298 Change-Id: Ib6e004a1518aec4c786c3aeebcd74e6cb11f45ef Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit e52efc3defe102a55b45b013764ba1bae1fe5a1b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Do not crash if madvise() fails on MADV_WILLNEEDUlf Hermann2022-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | MADV_WILLNEED is only advisory. The kernel may ignore it anyway. Any subsequent access to the pages in question will trigger them to be re-populated. Fixes: QTBUG-107774 Change-Id: I8d70003502fdeb3e53c169b28ea6826801d47c74 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 2034e10c9378364ecc7aa1af27505562d86688de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Avoid double applyDelegateChange in QQIV::setDelegateFabian Kosmale2022-10-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a QQmlDelegateModel is used together with QQuickItemView, then we will already call applyDelegateChange when the DelegateModel's delegateChanged signal is emitted from QQmlDelegateModel::setDelegate. Calling it manually in QQuickItemView's setDelegate is thus superfluous. Fixes: QTBUG-102793 Fixes: QTBUG-107732 Change-Id: Ifffb23661813c4e71287538ec5342215dfbbdad6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 2664b1988f031366c2616581e65b0e02e37e3ff1) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * QSGGeometry: add Q_DISABLE_COPY_MOVEThiago Macieira2022-10-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a polymorphic class, so that already tells us this should never be copied. Moreover, it has a reference member, so the default assignment operator cannot be instantiated. error: use of deleted function ‘QSGGeometry& QSGGeometry::operator=(const QSGGeometry&)’ qsggeometry.h:51:22: note: ‘QSGGeometry& QSGGeometry::operator=(const QSGGeometry&)’ is implicitly deleted because the default definition would be ill-formed: qsggeometry.h:51:22: error: non-static reference member ‘const QSGGeometry::AttributeSet& QSGGeometry::m_attributes’, cannot use default assignment operator Found while compiling PyQt, which is obviously wrong, but this should improve the error message output. Change-Id: I07ec23f3cb174fb197c3fffd1721f614929a18f4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 32b71a40cdbcd77956b309b032caafa02abcc13f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Qml: Don't crash on bad grouped propertiesUlf Hermann2022-10-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amend and cherry-pick e061c934d5a6d93493ba2be7b61efdd055d1e164. This commit is required by the (already-merged) commit dc69a005755c4d4c1b3de6cd52321b543b49a1a1 to successfully fix the grouped property crash. Add the reproducer of the issue in the tests. Task-number: QTBUG-106457 Fixes: QTBUG-107795 Change-Id: I7da381d2c3b9c58d370c1ed754140637e065bdec Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Fix broken Text rendering when noantialiased NativeRendering is usedDominik Holland2022-10-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | In case antialiasing is disabled the QFontEngine::Format_Mono is used to render in the glyph cache. In this format the padding needs to be 8-bit aligned. Fixes: QTBUG-107038 Change-Id: Icc3c69fe0395cea9954c2fa07c39e7769fc91800 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit cba96b3a97977f71931f311db9d5644d1d74d694) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * masm: Treat Android as generic Posix regarding mmap and friendsUlf Hermann2022-10-072-8/+17
| | | | | | | | | | | | | | | | | | | | | | Apparently we cannot rely on madvise() to work as we expect it on linux. Fixes: QTBUG-106864 Fixes: QTBUG-106269 Change-Id: Ie488ad788386c1a8c493d6bba632787f5282baaa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit ffecc122d785de9c4c5defd8724526b8dd4982dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.11' into ↵v5.15.11-lts-lgplTarja Sundqvist2023-06-0965-748/+1250
|\| | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I7b6e0ef657d1278405738f682b2795f8c345c3d4
| * Adjust baselineOffset correctly when fontSizeMode == HorizontalFitJan Arve Sæther2022-09-231-15/+17
| | | | | | | | | | | | | | | | | | | | This caught my attention while reviewing a related fix (4933bd6351feec988746af647c391c46483f049a) Task-number: QTBUG-106594 Change-Id: Ie8c7fb2d9e504b14a924eca72a87295d8764cf39 Reviewed-by: Dominik Holland <dominik.holland@qt.io> (cherry picked from commit a7c8bd27e390db9d0d401f9008ceb4130da53d6f)
| * QQmlVMEMetaObjectEndpoint: ensure property cache before accessing itSami Shalayel2022-09-211-4/+1
| | | | | | | | | | | | | | | | | | | | | | Otherwise the property cache might be null and lead to segmentation faults, e.g. when declaring aliases in qml. Fixes: QTBUG-106256 Change-Id: I568c973e1ba00531fbe22a41e2c6c3c09dfc2f02 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit e0a00a691963e2c684f4dd857d042a3ffbebe959) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Text: Re-layout the text when a alignment is set and the height growsDominik Holland2022-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the top alignment (default) is used, a growing height can be ignored in some situations and no re-layout is needed. But once the alignment has been changed, the re-layout needs to happen, as otherwise not all anchors are updated correctly. Fixes: QTBUG-106594 Change-Id: I9ab9999f49331aadd3bb8247d520288c40b51b21 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 4933bd6351feec988746af647c391c46483f049a) Reviewed-by: Dominik Holland <dominik.holland@qt.io>
| * Fix fractional scaling of text in Qt QuickEskil Abrahamsen Blomfeldt2022-09-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As opposed to the raster engine, in Qt Quick we are using unscaled positions for the glyphs and using the vertex shader to scale these after the fact. However, when picking the correct subpixel rendering for each glyph, we would use the unscaled position's fractional part, meaning that we essentially rendered the glyphs at the wrong subpixel position. This was especially visible when doing fractional scaling, e.g. 125%. Instead, we need to ensure that we pick the rendering at the on-screen subpixel position. [ChangeLog][QtQuick][Text] Fixed a kerning issue with native-rendered text when there is a fractional system scale factor set. Fixes: QTBUG-101008 Change-Id: Ic0f94d8b4ca5998dca638bdf7e2a16306d92a926 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 97cc7023ce8b8d903351a2e13f515592854c56fc)
| * qqmlprivate.h: make static constexpr members c++11 compliantSami Shalayel2022-09-121-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Newest gcc versions (latest 11 and 12) decided to be c++11 compliant for static constexpr members, meaning that they need a redundant definition at namespace scope. This behavior is required for c++11 but deprecated and not required starting with c++17. Added those definitions for all static constexpr members in qqmlprivate.h with appropriate comment. Fixes: QTBUG-106377 Change-Id: Idb3b3d38218f3a66908de259ae765db2aeb1febb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * V4: Account for the guard pages when allocating stack spaceUlf Hermann2022-09-091-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we've assumed the whole allocation can be used, even though the first and the last page are actually not usable. This makes a difference when the size of the guard pages grows, such as on macOS, which these days has 16k pages. Add the extra guard page size to the amount of memory to be allocated in order to fix the calculation. Fixes: QTBUG-93188 Change-Id: I0ebece94449da3127e9a78a19d8a22722ad8d698 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 826b77c8cf0ffbef4f95e7b9e72eb9dc25936657)
| * Flickable: let changing contentItem pos also affect the drag starting posOliver Eftevaag2022-09-082-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling the setContentX(qreal) and setContentY(qreal) functions, the flickable would not update the drag starting position if they were called in the middle of a dragging operation. This patch makes those function update the drag starting position, so that the drag will take into account the external changes to the contentItem position, and not make any massive leaps on the next call to drag() after changing the contentItem position directly. Note that vData.pressPos and hData.pressPos are set to the x and y position of the contentItem at the beginning of a drag operation. They are unrelated to the mouse position. The bug QTBUG-104966 will be fixed from this, since QQuickItemView::setModel() calls QQuickListViewPrivate::setPosition() which calls QQuickFlickable::setContentX/Y(). The QQuickFlickable::setContentX/Y functions are public (part of the public API). They will update the timeline value for the x and y axis, which will as a result also call setViewportX/Y, which calls setX/Y for the contentItem itself. Done-with: Jan Arve Sæther <jan-arve.saether@qt.io> Fixes: QTBUG-104966 Change-Id: Id5165e1ff37a07b94be8c1cc152e86dfcc13d1c6 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 5647527a8cde84b51fff66fc482f02435770b3dd)
| * StackLayout: Do not set size of children to (-1, -1)Jan Arve Sæther2022-09-062-4/+11
| | | | | | | | | | | | | | | | | | | | | | The item-size-hint-cache in StackLayout was not always valid when QQuickStackLayout::rearrange() was entered, so it would end up setting the size of the item to (-1, -1) Fixes: QTBUG-105899 Change-Id: I632aa18bb10b84d59af35cd3c7cb0c675d8d1692 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 9a4874ab7f18a54b2497f689dfd7f7a2ee0516b8)
| * V4: Mark InternalClass parents when running GCUlf Hermann2022-08-296-63/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to preserve them as they notify us about protoId related changes. In order to avoid wasting heap space in case many properties are added and removed from the same object, we put a mechanism in place to rebuild the InternalClass hierarchy if many redundant transitions are detected. Amends commit 69d76d59cec0dcff4c52eef24e779fbef14beeca. Fixes: QTBUG-91687 Task-number: QTBUG-58559 Change-Id: I3238931b5919ed2b98059e0b7f928334284ce7bf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0b9fa18dfefc06f542bd0c98b7e41fa14aa0c2cf)
| * A11Y: Send Scrolling Events when Flickable movesJens Trillmann2022-08-191-0/+12
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-103513 Change-Id: I6b67ff2611f37a6519420d875e7d9a70d0eb210a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit ac0d923de68cad62d87e116fbb5e5cc2af28349c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * doc: Add missing PointerHandler.CanTakeOverFromItems enum valueShawn Rutledge2022-08-181-0/+2
| | | | | | | | | | | | | | | | | | Amends 0a3eec60cab3c453b378ee45ac335e0dc2951f4b Change-Id: Iae9d1b2b68dc48a52adf0438a09af8e53f5527f1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit c2d92c241274f9abdcb24637f9838210f191e8ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Qml: Don't crash on nested group properties with aliasesUlf Hermann2022-08-042-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | This fixes an oversight where in case of half-resolved grouped properties we would forget to add the bindings to the "pending" list. In addition we would fail to resolve their property caches later on. Fixes: QTBUG-94983 Change-Id: I88bd0ce56464438d2a105e5ed426e002495cc016 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit fed5b07980d9ae5a392a00563f70ee34fc261dbc)
| * QV4::CompiledData: fix GCC 12 -Werror=uninitialized errorsMarc Mutz2022-07-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-default ctors tried to call m_data.set(), where m_data uninitialized. Says GCC 12: In member function ‘QSpecialIntegerAccessor<S, pos, width, T>& QSpecialIntegerAccessor<S, pos, width, T>::operator=(Type) [with S = QLittleEndianStorageType<unsigned int>; int pos = 0; int width = 5; T = unsigned int]’, inlined from ‘void QSpecialIntegerBitfieldUnion<S, Accessors>::set(typename A::Type) [with A = QSpecialIntegerAccessor<QLittleEndianStorageType<unsigned int>, 0, 5, unsigned int>; S = QLittleEndianStorageType<unsigned int>; Accessors = {QSpecialIntegerAccessor<QLittleEndianStorageType<unsigned int>, 0, 5, unsigned int>, QSpecialIntegerAccessor<QLittleEndianStorageType<unsigned int>, 5, 27, unsigned int>}]’ at qtbase/src/corelib/global/qendian_p.h:214:21, inlined from ‘QV4::CompiledData::RegExp::RegExp(quint32, quint32)’ at qtdeclarative/src/qml/common/qv4compileddata_p.h:187:31, inlined from ‘int QV4::Compiler::JSUnitGenerator::registerRegExp(QQmlJS::AST::RegExpLiteral*)’ at qtdeclarative/src/qml/compiler/qv4compiler.cpp:198:34: qtbase/src/corelib/global/qendian_p.h:179:40: error: ‘<unnamed>.QV4::CompiledData::RegExp::m_data.QSpecialIntegerBitfieldUnion<QLittleEndianStorageType<unsigned int>, QSpecialIntegerAccessor<QLittleEndianStorageType<unsigned int>, 0, 5, unsigned int>, QSpecialIntegerAccessor<QLittleEndianStorageType<unsigned int>, 5, 27, unsigned int> >::storage.QSpecialIntegerStorage<QLittleEndianStorageType<unsigned int> >::val’ is used uninitialized [-Werror=uninitialized] 179 | UnsignedType i = S::fromSpecial(storage->val); | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~ qtdeclarative/src/qml/compiler/qv4compiler.cpp: In member function ‘int QV4::Compiler::JSUnitGenerator::registerRegExp(QQmlJS::AST::RegExpLiteral*)’: qtdeclarative/src/qml/compiler/qv4compiler.cpp:198:90: note: ‘<anonymous>’ declared here 198 | regexps.append(CompiledData::RegExp(flags, registerString(regexp->pattern.toString()))); | ^ Fix by calling the default ctor (which initialized m_data) before calling m_data.set(). Task-number: QTBUG-103924 Change-Id: I44ff404e5509e24601893e539639f213defdc80d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 405f1f7d05a27f659fa47afb5574a159301caff6)
| * QQuickText/Edit: fix C++20 -Wdeprecated-enum-enum-conversion warningsMarc Mutz2022-07-212-0/+4
| | | | | | | | | | | | | | | | | | Declare that HAlignment and VAlignment are designed to be mixed. Change-Id: I97663653014856a3391e36dd1847b67603f6aac9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c34cdee53f81ad0d645468ebae7aa9d8cab79a3f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Android: Fix crash on tap handler with a S-PenSamuel Mira2022-07-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a crash using a S-Pen with QML TapHandler on Qt 5.15. The reason it was happening was because the item->window() was nullptr when it tried to run the mapToGlobal function. The item->windows becomes nullptr on handlePointerEvent function, so switching both lines is enough to fix this crash. Fixes: QTBUG-86805 Change-Id: I25f20650e97b5ad094a99c810379fb412fdb4222 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * masm: fix -Wdeprecated-enum-enum-conversionMarc Mutz2022-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | C++20 deprecated mixed-enum arithmetic. Cast one of the enums to int to suppress the warning. Fixes: QTBUG-103943 Change-Id: I157be3368d6a0f201f3f4ddd7248479ee544d32d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit c4bddc4765c9c21da1e69ecc3ed4b7897bf14e41) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QML: Port QV4::CompiledData::RegExp to new special integer bitfieldUlf Hermann2022-06-243-18/+23
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-99545 Change-Id: I37be080387bf086d84761b056140cc5a99d161ed Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit da09f7c3d8962b4521189c96adf1ed0e1da3e8dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QML: Port QV4::CompiledData::JSClassMember to new special integer bitfieldUlf Hermann2022-06-243-10/+17
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-99545 Change-Id: I0a7d86450011f1664d61db4d78317dafbcfbb8cf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit b5a8a6943ab979e23db284780df9209af5ae03a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QML: Port QV4::CompiledData::Object to new special integer bitfieldUlf Hermann2022-06-2410-35/+90
| | | | | | | | | | | | | | | | Task-number: QTBUG-99545 Change-Id: Ia57a16313e883a8d4dab15c971181440ed1d2214 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 745cce4391a8b6255605cb304d8bc14b11168423)
| * QML: Port icutils::Node to new special integer bitfieldUlf Hermann2022-06-243-21/+32
| | | | | | | | | | | | | | Change-Id: I46f4f21bda1360d09e2c49a1f04dbe411fb46f7d Task-number: QTBUG-99545 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit eca5dcab020a60a53c0ad1b130cf2873d3feff3e)
| * QML: Port QV4::CompiledData::Lookup to new special integer bitfieldUlf Hermann2022-06-243-24/+19
| | | | | | | | | | | | | | | | Task-number: QTBUG-99545 Change-Id: I8cc6db56642f1cd2d16e80ba5c49ffd7c6fdcd8c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 6d92633f32ff2089b8f0a39e07f0d40bf57d8011)