aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.7.3' in qt/qtdeclarativev6.7.36.7.3Qt Submodule Update Bot2024-09-191-5/+5
| | | | | Change-Id: I50e231e8d6ee461ac429dfb19445c6c44db89056 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.7.3' in qt/qtdeclarativeQt Submodule Update Bot2024-09-161-5/+5
| | | | | Change-Id: Ic64c9e07be906c0df1501e654ed26b1f71d197ad Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.7.3' in qt/qtdeclarativeQt Submodule Update Bot2024-09-121-5/+5
| | | | | Change-Id: Icc3ad526738400e119d2e8340cc81d7e32cb0263 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.7.3' in qt/qtdeclarativeQt Submodule Update Bot2024-09-111-5/+5
| | | | | Change-Id: I5909ac6cdfbacebdc21536c43a17be70f5bdc2d4 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix undefined reference issue for Color object in MessageDialog qmlSanthosh Kumar2024-09-071-0/+1
| | | | | | | | | | | | The Color singleton object used in MessageDialog throws an undefined warning. Import the required module to resolve this issue. Pick-to: 6.5 Change-Id: I929d9839274b7393e36c6d0ffe159037a92e2423 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 7ddac741d3718771f81991829579981323b4c189) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1830b880bebde8cb2c64d39937ea423236d735ea)
* Update dependencies on '6.7' in qt/qtdeclarativeQt Submodule Update Bot2024-09-061-5/+5
| | | | | Change-Id: Iac3e0342f63eea07dc565d49e76655ae333f0a89 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.7' in qt/qtdeclarativeQt Submodule Update Bot2024-09-051-5/+5
| | | | | Change-Id: I7527cebdd1288790c1e791eab9ca10bee75220f0 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Improve binding loop warning messageMitch Curtis2024-09-058-13/+26
| | | | | | | | | | | | | | | | | | | | | | Before this patch, a binding loop warning would look like this: [...]/tst_dialogbuttonbox.qml:574:9: QML DialogButtonBox: Binding loop detected for property "implicitWidth" Print the expressionIdentifier so that it looks like this: [...]/tst_dialogbuttonbox.qml:574:9: QML DialogButtonBox: Binding loop detected for property "implicitWidth": qrc:/qt-project.org/imports/QtQuick/Controls/Basic/DialogButtonBox.qml:10:5 This is one step closer to making it easier to quickly debug binding loop warnings, but we still need to print the stack trace. Task-number: QTBUG-36525 Pick-to: 6.5 Change-Id: Ic337398e8b1060abcc43aa2b45557acc2057e49b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 49a290b2b58672366e29abd6813ac0a643554228) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e5da5dfa2c53604ae201b8296dabe2b43c2c1ce6)
* Curve renderer: Fix crash when root node is replacedEirik Aavitsland2024-09-052-0/+10
| | | | | | | | | | | | | | | | | | | | A curve renderer instance keeps references to the fill and stroke nodes it has created, in order to facilitate maintaining correct rendering order when updating. All nodes are children of the renderer's root node. It can happen, like when hiding and re-showing a Popup, that the renderer instance is assigned a new root node. The references to the child nodes are then invalid, and accessing them will fail. Fix by clearing all such references when a new root node is set. Fixes: QTBUG-128561 Change-Id: Ibc4992780867049e9e38a2bf1a163eed79bdc5c0 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit cef3ff0a60d37615a5230a84ad172b357897fe7e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e20e91904a5131269196a1c7596fb05959fb5761)
* qmlformat: respect the type annotated signal formSemih Yavuz2024-09-046-4/+27
| | | | | | | | | | | | | A qml signal can have both a(int x) and a(x: int) form. qmlformat currently converts the type annotated signal form into type prefixed form. It should respect the order. Task-number: QTBUG-128423 Change-Id: I746ea66949abc72e8012974b3fb0a06878950b77 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 67ab9e5a1102472ea734a35ef2906e2ec4545ce0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1186f254f5a9303869d799ee34e491d042e5736e)
* QQuickTableView: ensure VerticalHeaderView stays in syncRichard Moe Gustavsen2024-09-032-24/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | Bacuse of a copy-paste error in QQuickTableView, TableView would calulcate the wrong viewport rect for vertically synced views if the views were not also synced horizontally. The result of this mistake was that the rows in the two views would end up with with different heights (and y pos) while flicking. This bug has been there for a very long time, but was hidden becuse of anther bug that was recently fixed (25348bc0e6). After that fix, this new bug became evident. This patch will make sure that the offending if-test checks the correct sync direction, and thereby also calculate the correctly combined viewport rect. Fixes: QTBUG-128508 Pick-to: 6.5 6.2 Change-Id: Idf4d93830933c9a28786adaba14e068015564fcc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 379108f118865f8afc55e46d9a1c217fd30c1c11) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d8bab4785bf69ccfd0b18987bdfb67a7e9d4a147)
* Docs: improve the MultiEffect documentationAlexei Cazacov2024-09-021-3/+51
| | | | | | | | | | | | | | This commit adds: - an example on how to apply the MultiEffect to a layered item - an explanation on hiding a source item - an explanation on mask size behavior Task-number: QTBUG-127993 Change-Id: I8d570021a38705deafcc95b87f7f6f3ee6b58124 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io> (cherry picked from commit 4a33bd7688e0f76b000505049a56e32cfcc2fa6e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 13c000727815e32d6e3e4bcf1fa9ada22b2a9975)
* Mark software renderer dirty when render target changedJiDe Zhang2024-09-012-5/+7
| | | | | | | | | | | | Fixes: QTBUG-127727 Pick-to: 6.5 Change-Id: Idf551145fea20442360fbbfba5196b020364f542 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 6f1826c5bd26c7f4de59f68b43e77d213b4b22a8) Reviewed-by: JiDe Zhang <zhangjide@uniontech.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 5fb78c67dd2f6699da5cea64a1455e41f9e64292) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickHeaderView: for explicitly assigned models, document that data() will ↵Richard Moe Gustavsen2024-08-301-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be used The detailed documentation for HeaderView says that if you assign a QAIM to the model property, the models headerData() will be used. But in the documentation for the model property itself, it says that data() will be used (except when using a QAbstractTableModel). Both cannot be true. The actual behavior is that we use data() when the model is assigned explicit to the model property, and headerData() when the syncView's model is used. It's debatable whether or not we should have always used headerData(), but changing that now could cause regressions. Such a change would also stop e.g QML ListModel from being used as a model, which is also an argument for keeping it as-is. This patch will therefore fix up the documention to be consistent, and to inform that data() will be used. Fixes: QTBUG-123595 Pick-to: 6.5 6.2 Change-Id: Id64977a3db5f00b4269f0e5ffb6a31e5ad607725 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit f4bc018fa9e57bdd72556473040622acac508ea7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4e4e8328c6ab7f80d868d57f98fbd08f54cbd97d)
* Doc: Add \qmlproperty for color QML value typeSafiyyah Moosa2024-08-301-5/+62
| | | | | | | | | | | | | | | This patchset implements the \qmlproperty command to display the properties for the 'color' QML value type. The following properties are added: r, g, b, a, hsvHue, hsvSaturation, hsvValue, hslHue, hslSaturation, hslLightness and valid. Fixes: QTBUG-127337 Change-Id: I583407f82d530ea80f34cb3e3d74775e9fa0e1e0 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit e0aa9a5b81b643b3575c9368f21674fc88c56260) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ececff65bcec43c4fdc62505d3e81b76626532d8)
* Doc: Put qt6_ CMake commands in help indexKai Köhne2024-08-308-8/+8
| | | | | | | | | | | | | Using \keyword instead of \target means that IDE's can properly look up these commands in the qch index. Task-number: QTBUG-128368 Change-Id: I3995f5fe5a995765a12c129280f7ed3e8155ae3a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 6c549ed077c883bb9c7b14b35dec815e7f11475c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b3bf03935bf46e0fe5ff1fb4eabac50bcbab554d)
* QQmlAdapterModel: guard against item deletion during notificationVladimir Belyavsky2024-08-301-5/+12
| | | | | | | | | | | | | | | | | | | Complements 75ba1ce9114e320cccfbc0c14dd32675ce2e598e. This time we also handle the case where the item was destroyed while its own signal was being activated. So, now it won't crash on the next signal invocation or on the item->modelDataChanged() call. This potentially should fix some of the hard-to-reproduce crashes we see in users' reports. At least this definitely fixes the case given in QTBUG-110451. Fixes: QTBUG-110451 Change-Id: I53bdb206cec8523769632b23f1546ad182f631dd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit fc740db1c6f5bdfb2aa53ab392d30fe00dd52aba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c08cb9a98a96096d403e945e7bcc4195d9696e59)
* Update dependencies on '6.7' in qt/qtdeclarativeQt Submodule Update Bot2024-08-291-5/+5
| | | | | Change-Id: I5da8453a06a530c7555f9062f19d53d886d5a7d6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Check qml context object state in the table instance model only neededSanthosh Kumar2024-08-283-2/+64
| | | | | | | | | | | | | | | | | It's better to have the assert condition w.r.t to the context object within the model where we access the respective data. This patch removes the existing assert in the QQmlTableInstanceModel::object() and uses a similar validation inside the QQmlTableInstanceModel::incubateModelItem() before accessing the context-specific data. Fixes: QTBUG-126981 Pick-to: 6.5 6.2 5.15 Change-Id: I799476434afc4c22c8b39544bc994232d6bf8ef2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 2cfffb708808ba49148ba4f30c7c8841e5dfb2d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bb49bef6d9b89223512cada878872a684f2c6c4c)
* QJSEngine: Check for stack overflows on generatorsLuca Di Sera2024-08-283-10/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generally, the engine checks for stack overflows each time a function is called. In the common case, the entry point for the execution of a function is `QV4::Moth::VME::exec`, which will perform the check as part of its execution. `exec` will then dispatch to the execution of the function, either by using the JIT when enabled and available or by calling `QV4::Moth::VME::interpret` when this is not the case. Generators work slightly differently than a normal call, both when a Generator Function or Method is executed and when a generator is resumed. In particular, the execution of a Generator Function or Method and the execution of a resumed generator do not pass by `exec`, instead directly calling `interpret`on the relevant code. As `interpret` does not perform any check for stack overflows, a call to a Generator Function or Method or the processing of a resume operation on a Generator will not identify those overflows, such that it will fail to throw a `RangeError`, as it would be normal for a normal call, instead ending up segfaulting down the call chain. To avoid the issue, ensure that a check for stack overflows is performed before a call to `interpret` in both `GeneratorFunction::virtualCall` and `GeneratorObject::resume`, to ensure that an exception is thrown when required. The ordering of operations for `resume` was modified to allow for the abrupt return due to the, now possible, stack overflow exception. Both `return` and `throw` can produce a resume of the generator and both of them throw an exception in doing so. `return` throws an exception as an implementation detail. An `emptyValue` is thrown, which will later be recognized by the execution of a `Resume` instruction and cleaned away. Failure to do the cleaning will produce an issue as an `emptyValue` should not propagate through the system. `throw` throws as part of its implementation as expected by the spec. As both throws are performed before resume is called, the thrown value would hide the `RangeError` exception that can be thrown due to a stack overflow. To allow for the stack overflow to be correctly recognized and its thrown error not to be hidden, `resume` was modified to accept a third optional parameter, representing a value to be thrown just before calling `interpret` and after checking for a stack overflow. Its call site in `method_next`, `method_return` and `method_throw` were modified accordingly. Some test-cases were added to `tst_qjsengine` to ensure that the correct kind of exception is thrown when a stack overflow happens on the execution of a Generator Function or Method or when resuming a Generator. Fixes: QTBUG-127049 Change-Id: I3656957097df3ccd5c6d70f86335bc40e229bb20 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d408caa701448f8fe333894831c63b6bca74830a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 479b35519930ae4e4e5073c9b69a5a82584ea74b)
* QQuickWidget: Clamp texture sizeLaszlo Agocs2024-08-271-1/+11
| | | | | | | | | | | | | | | | | Copy the behavior from QQuickRhiItem, which handles this correctly. The older QQuickWidget seems to lack that logic for some reason. Also add a qWarning to make it clear what is happening, because clamping the texture size may cause unexpected results in the visual output. Pick-to: 6.6 6.5 Fixes: QTBUG-123636 Change-Id: I08d4ac23f709c85dc975c030fd198127d7eb4d23 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 431da3b90556e0ffceaff4aea878c480818cdd69) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c07953df95adb0d99098b88857c150be1c191d96)
* Update dependencies on '6.7' in qt/qtdeclarativeQt Submodule Update Bot2024-08-271-5/+5
| | | | | Change-Id: I3bfef63fe27645cb753eec1247c354efcd046168 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.7' in qt/qtdeclarativeQt Submodule Update Bot2024-08-261-5/+5
| | | | | Change-Id: I4a595664593a7e217a232ede74178e9685a647b3 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* TextInput/TextField: Deselect text on tap or clickShawn Rutledge2024-08-253-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now use the same approach as in QQuickTextControlPrivate: on press, set hadSelectionOnMousePress according to whether text is already selected or not; on release, if hadSelectionOnMousePress is true, we should move the cursor (and thus deselect text). Some history: Commit 650342de792e0ab37ce8bac8ccde21ab9b96b2c9 disabled direct text selection on touchscreens, because mobile platforms provide text selection handles, and otherwise the user's finger is usually too large relative to the font size to select text precisely, as one does with a mouse. The test added there is now amended: if text was already selected on press, we do expect tapping to move the cursor and deselect the text. Commit ac3f1eace1102543008a0ceded541e40ff495368 allowed importing an old Qt Quick version to allow tapping to deselect. Commit d6ddfa3d4ca3fbbaddc2acd7ebe3f8296fc68b68 fixed another bug: text would lose selection when releasing afer a long press. But text could not be deselected by touch. One way was to tap on something else to make the text field lose focus. Fixes: QTBUG-127440 Task-number: QTBUG-10684 Task-number: QTBUG-38934 Task-number: QTBUG-101205 Task-number: QTBUG-111504 Task-number: QTBUG-116606 Pick-to: 6.5 Change-Id: I5001216fc30266fcce3af413ecfa091bfd99beed Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit e434796c6766b48fd725866bd2998fe963bbbe14) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e87e786111dfc8f5d880f34f0bdf32188852cb6f)
* Fix multi-screen menu pop-up locationLu YaNing2024-08-241-1/+1
| | | | | | | | | | | | | | | | | According to f8cf17166c9af147f0b8fea72f5b4a8a6098a5d7 When QT_SCALE_FACTOR is greater than 1, the Popup menu pops up incorrectly on the second screen. Replace the toNativePixels with toNativeLocalPosition. Fixes: QTBUG-127906 Pick-to: 6.5 Change-Id: Id320063afccfd3a391426bc6419cbe8855c57b98 Reviewed-by: Inho Lee <inho.lee@qt.io> (cherry picked from commit 7574111a56d38832fd330df5ba4839d0263fbc09) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b0f91c7f4c3502e1e4a0aaec6cc5b06496a639fe)
* doc, QQuickHeaderView: ensure example snippet worksRichard Moe Gustavsen2024-08-241-1/+1
| | | | | | | | | | | | | | | | | As it stood, the qdoc marker in the example code left the final curly brace out of the snippet. A copy paste of this example would therefore not compile. This patch will make sure the brace is a part of the snippet shown in the docs. Task-number: QTBUG-123595 Pick-to: 6.5 6.2 Change-Id: I68bfac0cfc3dcecd487bfb69de07c317f787552e Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 3968ef8650da91c8e66d1651f7891793ac3b5d74) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9ecc9131ed9be2ad421e3ced0b589c00205de2d5)
* QML: Type-check objects passed to QmlListWrapperUlf Hermann2024-08-237-13/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | So far we could assign QObjects of any type into any QmlListWrapper of another type. This is UB, since you may be holding the underlying QQmlListProperty in C++, and it's also not very consistent. Assign null instead if the type doesn't match and emit a warning. Likewise, also warn when initializing a list with mismatched elements. [ChangeLog][QtQml][Important Behavior Changes] Assignments to list properties in QML are now type-checked. Before you could, for example, insert a plain QObject into list<Item>, producing undefined behavior. Now it instead inserts null and warns. In particular, if you assign a JavaScript array of random objects to a list property, QML will check each individual element, and insert null as well as warn when encountering type incompatibilities. Pick-to: 6.5 Fixes: QTBUG-127343 Change-Id: I9b78afcd3ed40c80175a99861373588f56683954 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit aeabdb93885e51d5c7dbecbb69af1750370a65fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c9c1a08409e71e8ee93d3ff3b16678ee24135acf)
* 2D Renderer: Make sure cachedMirroredPixmap is never dirty when paintingAndy Nichols2024-08-232-16/+22
| | | | | | | | | | | | | | | | | | | | | | When using the software context for Qt Quick scene graph rendering, it was possible that Items using "layer.enabled: = true" would not be up to date if these sub-passes were updated while the tree using them was not visible (Due to update()/updatePaintNode() not being called). If the cachedMirrorPixmap doesn't get updated, then the previous image will be used when the item is painted, which is incorrect, and the update() method will not be called again until the next time the item is dirty. This change makes it where if the cache is still dirty when we start painting, we update it then, because spending a bit more time renderer is still better than rendering the wrong thing. Fixes: QTBUG-114984 Pick-to: 6.5 5.15 Change-Id: I70f9f6d1dfd46d6870a2bee2ae72294e8982b776 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 29a52df82397fd8a00308f7e34b08059d6affc91) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 57cdb43db40569faefef9e42d3ad42f3fc2bc4cd)
* Fix invalid memory access during highlight creation in the item viewSanthosh Kumar2024-08-232-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The creation of highlight item in the item views can go recursive leading to invalid reference in the item thats been used to keep track of the highlighted item. The highlighted item has been reset with the newly created highlighted item due to the geometry change in the item views, which happened while creating the highlighted item itself. This is like creation in a recursive loop. Since the highlighted item referred by the tracked item, has been reset (in the second call to the createHighlight()), the existing reference in the tracked item automatically becomes invalid.                       This patch adds validation to avoid recreating the highlighted item in the item views if the creation request is already in progress. Fixes: QTBUG-127455 Pick-to: 6.5 Change-Id: Ib4908d84e24c773e2b43a12c00ba23259896e171 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 81c95fb650a15261b9ba08e1dfe99f5f03fc3ad2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 6c11f156d6f57de0916051cf18734ee9492ecb96)
* Fix memory leak in QSGBatchRendererDominik Holland2024-08-231-0/+7
| | | | | | | | | | | | | Make sure the also delete the ClipInfo and RenderNodeElement in the shadow node. Fixes: QTBUG-128283 Pick-to: 6.5 6.2 5.15 Change-Id: Ida00e4eefa0e0dd0ab518a141138561254303e41 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit e94f211c970ff8a342e01400d855216f46372905) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8f389f2ce6060f36046980722937cb74c2a3c7d3)
* Fix updating TextEdit when mirroring changesKaj Grönholm2024-08-231-0/+1
| | | | | | | | | | | | | | When Item LayoutMirroring changes and mirrorChange() gets called, update the document properly. Task-number: QTBUG-124922 Pick-to: 6.5 Change-Id: I2b8a0e05ae3f0479eed68c0a7f84b23ba8d56e76 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit bc722385fbfba625b9fba6fac035a2982820eab9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 07a7b349e20b813cafb3b55697027f8e9de6a753)
* QQuickTableView: don't leave the viewport in an overshooting state after resizeRichard Moe Gustavsen2024-08-221-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we need to change the extents of the Flickable (that is, which point should be considered the top-left and bottom-right corner of the contentItem inside the viewport), it can sometimes happen that that Flickable is left suspended in an overshooting state (that is, it looks as if the user dragged the contentItem out-of-bounds, which will normally make it bounce back upon a release). And this comes across as a bug. This patch will therefore call returnToBounds() explicitly whenever we change the extents (unless the contentItem is being dragged, as we don't want to interrupt that). As it stood, we would also call markExtentsDirty() far too often from updateExtents(), even when the extents didn't change. Depending on what Flickable does to handle dirty extents, this causes uneccessary overhead and might slow down performance. It also produces a lot of superfluous logging output in TableView. This patch will therefore also check if the extents change before calling markExtentsDirty() (and as such, avoid calling returnToBounds() all the time). Task-number: QTBUG-127809 Pick-to: 6.5 6.2 Change-Id: Id801f3e62b3dcde1b59d49e4efc9d6631d5672bb Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 523c53d33d0d40cf1b71991903a2192c05a926de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 68a468980fe9831ad81fb382cf9d17a03236d4bb)
* Flickable: Don't consume wheel events towards adjacent boundMikko Hallamaa2024-08-223-10/+117
| | | | | | | | | | | | | | | | | | | When using nested Flickables, inner Flickable consumed wheel events even when it didn't move the view. Touch input and touchpad scrolling correctly propagated the events to the outer Flickable. This patch adds additional logic to the code path handling wheel events for view movement to not accept the event if the view doesn't move. Additionally a test for this is added that checks that the outer Flickable moves in this case. Fixes: QTBUG-126514 Change-Id: Ia03bd1d0cda1ce417baa479dceddb4a16eafead9 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 98778f00b93e9fd707e646b104cfdb7ee51021e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 74b959e08ccc2d171e7704729bf5ba3caee2c37e)
* Update dependencies on '6.7' in qt/qtdeclarativeQt Submodule Update Bot2024-08-221-5/+5
| | | | | Change-Id: I0096da298dfc0316aebe5c75918ee5ab07089528 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* doc, QQuickHeaderView: syncView should point to the TableView, not the other ↵Richard Moe Gustavsen2024-08-211-2/+2
| | | | | | | | | | | | | | | way around The docs suggest that the syncView for a TableView should point to the HeaderView. But it's actually the other way around. Task-number: QTBUG-123595 Pick-to: 6.5 6.2 Change-Id: I303ac50321aad581fd3472b3e3ff8ad93ecad701 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 37d9f3d4584e9a455284336895cb4df27ca2aee8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b2dc306e57bb90adda7eab121e4c651610ab4be3)
* Compiler: Don't pass a moved-from type resolver to PassManagerOlivier De Cannière2024-08-201-9/+10
| | | | | | | | | | | | This can lead to crashes in static analysis passes when they try to use the resolver. Pick-to: 6.5 Change-Id: I2f7951374a3aa6bd38ef93333b97b08d9a46dd13 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit cc87c4ade4bde5cf3dac617049f539e3361d7309) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit aca26a0bd0c1ce145b5b3841f89f3e989fc5f654)
* Update dependencies on '6.7' in qt/qtdeclarativeQt Submodule Update Bot2024-08-201-5/+5
| | | | | Change-Id: I2269a4ae8100707a265c9e4334dacba382fd5879 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Views: use isNull for zero-size checks rather than isEmptyMitch Curtis2024-08-193-3/+3
| | | | | | | | | | | | | | | QSizeF::isEmpty returns true if either dimension is negative, but according to tst_QQuickListView::resizeView, we support negative-sized views. Amends 37c25c6e74f4f74d7cca8f5b0f12a40ec0354f7e. Pick-to: 6.5 Change-Id: If860cd5a459adf75470e5fc2deba3967b2e66366 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit e64662650f351c24a5818f89e84c7a7dc4133e73) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4c0df79ba847fb38ef40a3b561d4559aa2908aba)
* Container: cull items when our size is zero and contentItem is a viewMitch Curtis2024-08-1912-1/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typical use case for SwipeView is that the user declares items directly as children. Those children are added to its QQmlObjectModel, which are then used as the delegates for its ListView. ListView culls the items it manages, but in the case of a zero-sized view, those that are outside the view - and hence not in its visibleItems list - are not its responsibility. That responsibility instead falls to QQuickContainer. It's also necessary to clear and return early in QQuickItemViewPrivate::layout if the size of the view is zero, otherwise the tests that check if a valid-sized view is made zero-sized fail. Add a new C++-based test for Container which is only run with the Basic style (similar to e.g. tst_qquickmenubar) so that we can check the culled member of QQuickItemPrivate. tst_container.qml is run with all styles (even though it probably doesn't need to be, but it would also be difficult to rewrite in C++, even though it's fairly small). Fix some tests that were using zero-sized views. Fixes: QTBUG-125416 Pick-to: 6.5 Change-Id: Ia05791b69568d51bea310e4f09266645ca2f1829 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 477c15def834bd49553c00b90f3a2006456ea931) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 0b6fd253e64519144808c02f161d2166198e4158)
* Optimize fixed numbersLiu Zheng2024-08-191-1/+1
| | | | | | | | | | | Optimize fixed numbers to facilitate subsequent character array expansion Pick-to: 6.5 Change-Id: Ieb3b2ba527a88054594e00ddbf1072cccefb6965 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8541bab2f040ddc2c5d096791f37715df83bc2df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a390b2dbe61b3e2eb42ddad7a47d5166bee00338)
* QQuickTableView: detect if sync view and sync child is out of syncRichard Moe Gustavsen2024-08-162-10/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When syncView is requested to do a relayout, it will tell the sync children to do relayout as well. A relayout alone will not change the top-left delegate item in the viewport, only layout the existing delegate items. But as it turns out, it can happen that the relayout leaves empty space in the viewport that needs to be refilled with new rows and columns. This is typically the case if some of the columns were resized smaller than what they used to be. And this can change which cell ends up as top-left, or move it to a different position. We therefore need to extend the check in syncSyncView to also include the _position_ of the top-left cell, and not only if the top-left cell itself has changed. As it stood, we also did a viewportOnly rebuild every time a new row or column was flicked into the viewport. This is very unnecessary, and slows down performance. Instead, we only need to do this when if the sync child is told to do (at least) a LayoutOnly. Only then can any of the visible rows or columns have been resized. Fixes: QTBUG-127809 Pick-to: 6.5 6.2 Change-Id: I815a47e9d6453871172ff7136f8cfbd51a5bc789 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 25348bc0e67f019232aa70c5558988a0c17bd15e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a5d0cfe092cc8411469ef53df13f2dac12051bf4)
* Update text components with color fonts when dpr changesEskil Abrahamsen Blomfeldt2024-08-168-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | There was already a hook in text components to update when the renderType was set to Text.NativeRendering. This is necessary because the text is rendered into a glyph cache at a given size and scaling it further will give pixelation artifacts. However, there are cases where the NativeRendering backend is used implicitly. In particular this happens for color fonts, so when changing the dpr of a screen (or when moving the window to a screen with a different dpr) we would get pixelated emojis in some cases. The fix is to detect in the text node whether any glyphs use the NativeRendering backend and if they do, we update whenever the dpr changes. Fixes: QTBUG-121449 Pick-to: 6.5 Change-Id: I9ad62d792e495d4439715fe87acfd87dd1833c67 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 23ae81c84de8bb30ba2d779c603a5b3aded2a417) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 4a85b870e4fa4febdc262f9a3060177bf86f6b5a)
* CMake: Exclude QML *_tooling targets from i18nJoerg Bornemann2024-08-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | For QML modules, we create *_tooling targets with source files assigned, which are located in the build directory. These sources are copies of files from the source directory and already belong to the actual QML module's target. When using qt_add_translations' automatic target collection, both targets contribute to the inputs of lupdate, resulting in duplicate source locations in .ts files. We now mark *_tooling targets as excluded from translation to avoid these duplicates. Implementation note: we don't need to set QT_EXCLUDE_FROM_TRANSLATION on the utility target for CMake < 3.19, because utility targets do not contribute to the input of lupdate. Fixes: QTBUG-124764 Change-Id: If5a8a19ff5503a6ea7d62a1f05957c7f1e8f315e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 506cac0194124153ab63ae6111d4c3e51e106a5d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d5b6d0a4b751f706617a32098810ce46397418d1)
* Update dependencies on '6.7' in qt/qtdeclarativeQt Submodule Update Bot2024-08-151-5/+5
| | | | | Change-Id: I76e9a3dd441419fc58c094d7cb04f17b01284575 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qmlls: do not endless loop on _deps build folderSami Shalayel2024-08-132-2/+6
| | | | | | | | | | | | | | | Add a missing NoDotAndDotdot flag to the entryInfoList() call to avoid infinite looping on _deps folder. Pick-to: 6.5 Task-number: QTBUG-123491 Change-Id: I3920ea67f49f51b612e4937403af2e5bec5eaad0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Knud Dollereder <knud.dollereder@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 8a8bfb410ad0f9c93fdcf2c7d04950444af5710b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bdb2cc69e37aa48b2c4d7281fb43c6ad413a4e9b)
* fix: mips array out of boundsLiu Zheng2024-08-131-1/+1
| | | | | | | | | | | | | When the incoming data is 4, the index defined by this macro has a crash Log: mips array out of bounds Pick-to: 6.5 Change-Id: I5acff5479f17e55d5731443d08b0915c701968f6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit f83669821b960e95f76807d1d64db07926fe3f5b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 64769e675affd4bb7c2bf7eb9dc6aa1589a2061c)
* quicklint: disable controls-attached-property-reuse category by defaultSami Shalayel2024-08-132-19/+10
| | | | | | | | | | | | | | | | | It seems that this category is just not ready to be enabled by default, so disable it. Tracking the work to re-enable it at QTBUG-127812. Fix a test to enable the category before testing for the warning. Fixes: QTBUG-127650 Change-Id: I6144e4b55e3bea803b14d82f6f0d291676d4394e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit b0fd8ef05e4107c9fe21ba14f7f1de7a9a60e779) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9b3a8acef7641d9a0da872b474ed821f205d5a7a)
* qmllint: disable the tumbler warning in qmllintSami Shalayel2024-08-134-7/+24
| | | | | | | | | | | | | | | | The tumbler warning in qmllint does deliver false positives, even on the code used by the documentation. Disable the warning for now, and use QTBUG-127562 to track work on fixing the tumbler warning. Add a test for the tumbler where the warning should not be received. Task-number: QTBUG-127562 Change-Id: Ia403b2d3aec0991613bf444d0047aa040db2bf65 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit dfc7521a8216ce05c38fb9d143b86e7fa8f1aeeb) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 837af013a0cd691459716088796495d10e2c2138) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: add qmllint quick attached property type warningsSami Shalayel2024-08-131-0/+43
| | | | | | | | | | | | Add description of the warning and an example on how to fix it. Task-number: QTBUG-118112 Change-Id: Ic057c768945b3ef0e38ce80cd19a8ca0567c9ca5 Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 93c0ef04fa0a07a2e805fccd914b7e699ee12f43) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ca1a665da99f439fcaec433ecd088a73cd70da9f)
* Add missing properties to QQuickFontValueType::create()Eskil Abrahamsen Blomfeldt2024-08-133-0/+69
| | | | | | | | | | | A few recently added font properties were missing from the QQuickFontValueType::create() function, meaning that they could not be added to the object created with Qt.font(). Change-Id: I511e8f1e3a3804d8e48943e734e42019941b0452 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit c8a859655def06edc66c00f151e031f449c284d5) (cherry picked from commit e2cd4d623890cd67d1959f40f98fa9b043d86c98)