aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Curve renderer: quick fix for unsafe static_castv6.6.06.6.0Paul Olav Tvete2023-10-031-2/+7
| | | | | | | | | Use the correct type to avoid dependence on compiler-specific memory layout. Pick-to: 6.6 Change-Id: I5af56074d4710be444816011367bc8cbf965b2e2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update dependencies on '6.6.0' in qt/qtdeclarativeQt Submodule Update Bot2023-10-021-5/+5
| | | | | Change-Id: Ib4df113951fd96865edd0e7eca3df691ce4d2fff Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6.0' in qt/qtdeclarativeQt Submodule Update Bot2023-09-291-5/+5
| | | | | Change-Id: I6c40e751aed0a0b308d913d884246bea2e60035f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Rename shapes example qml files according to what they demonstrateShawn Rutledge2023-09-294-163/+163
| | | | | | | | | | | Amends 270a6f9bba75478204dc6aadb348cf34a195a4da Fixes: QTBUG-115485 Change-Id: Id77b4dd8ce83175ebe29d24bf987572d5e9069d7 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 251fdf01a65a52414dd9183308520efbbd731567) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f3b39f0cc8ac19326c9341b07fe91c8bf885a642)
* Update dependencies on '6.6.0' in qt/qtdeclarativeQt Submodule Update Bot2023-09-281-5/+5
| | | | | Change-Id: I20b8db8792ac7416165a45e24446c163d52977db Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: Add example categories for qtquickJaishree Vyas2023-09-2713-0/+16
| | | | | | | Task-number: QTBUG-116334 Change-Id: I993b6157c3ef8a69e4e218d62596b5219ab4b34b Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 46fc095ae48456afab360847e0c8cb16f59997c8)
* QQuickText: Don't mark text as FINALKai Uwe Broulik2023-09-271-1/+1
| | | | | | | | | | It is overridden by QQuickMnemonicLabel. Change-Id: I77021f0bd73d43b3fe5ef63a3816730d7de65327 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 1804d4965b39dbc08a505be5eade0d8131880ef6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit cc1ed02ed3f55a2b713b10680b9fdac5f55c3d6d)
* Update dependencies on '6.6.0' in qt/qtdeclarativeQt Submodule Update Bot2023-09-261-5/+5
| | | | | Change-Id: I05350b8a2ba212c8223ca5cde11fb108cc3e5799 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Modernize some of the QSGRenderNode docsLaszlo Agocs2023-09-261-59/+71
| | | | | | | | | | | | Link to the example, and clean up some of the most egregious outdated statements that are no longer relevant for a long time now. Change-Id: I996c51a13c76529a7ce8ae3fa9ffd7129e717c0e Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 9000c9f17c66455071c0b7eed0e9168b94c8553d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b5dba4e3df17d6279045c80bcc11674a5d4dbaa2)
* Clean up customrendernode exampleLaszlo Agocs2023-09-267-126/+189
| | | | | | | | | | | | | | | Make it more consistent with other scenegraph examples, and make it more compact, in particular when it comes to handling the QRhi resources (smart pointers are quite useful in this case since they help dropping a bunch of lines) Expand the docs. Change-Id: I97bceca7759db9738d34f0fbf7eb29b0ae6e4c0f Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit aeb3bd235a7eaba163b9867b97a9869cc9ecaf7d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5c46a280fbbe8094346dcaec207cbbbb7dc80956)
* QQmlSA: Don't expose QQmlJS namespaceFabian Kosmale2023-09-239-94/+104
| | | | | | | | | | | | | | | QQmlSA is meant as the public namespace, QQmlJS is (at least currently) completely internal. However, LoggerWarningID currently only existed in QQmlJS. Move it into QQmlSA, add some minimal class documentation and add a typedef in QQmlJS (inside a private header) to avoid the need to modify all users. Change-Id: Icff860c92054ac810c6e15eb26090d38fbc2c965 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit d77693a028ce4c0faffafb612b8f4881d38e99ac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ba9d23d051d08a34318af452d0f78a55d20caad3)
* Update dependencies on '6.6.0' in qt/qtdeclarativev6.6.0-rc1Qt Submodule Update Bot2023-09-211-5/+5
| | | | | Change-Id: Ief5347e6316695f4c90204322bf8fdb8ce562bab Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6.0' in qt/qtdeclarativeQt Submodule Update Bot2023-09-191-5/+5
| | | | | Change-Id: Ib27da8c851863d2ac477eea6b6a2445b337a57b8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: Change 'delegate' model to 'object' modelSafiyyah Moosa2023-09-191-1/+1
| | | | | | | | | Task-number: QTBUG-115766 Change-Id: Id57bd53dbcccc107d57fd866a6c69f51b4303bc3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 542687a2088276748e13ea38e188b17489823716) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit e60840d4afee8d73083f81caefd53389d20d45fc)
* Doc: QSGRendererInterface: use since-clause in enum \value commandsTopi Reinio2023-09-141-42/+34
| | | | | | | | | | | | The \value command in QDoc now supports adding since information in a bracketed argument. This enables listing new enum values also in the top-level 'What's New in Qt' documentation. Task-number: QTBUG-116844 Change-Id: Ib8850252704720d0ab5629905da4196baf33def6 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 1a6f02076e458dbb543b110cef06576bd4f746fd) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Don't assert when Behavior instances are nullKaj Grönholm2023-09-141-1/+1
| | | | | | | | | Task-number: QTBUG-111570 Change-Id: I16bb1f83977b9ee05f7568f122d5242892592c94 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e78961400e3a22557f33ab733d0ba4cd3bd4eb8c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 04c63a71ba6740e01fdfb66d38ffa69aea07e8d4)
* Doc: make Loader Sizing Behavior section easier to readMitch Curtis2023-09-131-3/+3
| | | | | | | | | | | | | | Most users use Loader for visual types, so the first sentence being about non-visual types just makes it take that little bit longer to get to the point for the majority of readers. Move it to the end. Pick-to: 6.5 6.2 Change-Id: I736c067e9f73a1bc4fc27b4d358441b722241501 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> (cherry picked from commit 628dd94a7584195b4c7aa49c01f6bdc45a71d2c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing documentation for ColorGroup's accent propertyMitch Curtis2023-09-131-0/+10
| | | | | | | | | This was missed in b82af7b42db3c206ce7dd44e39304bf1166024f2. Change-Id: I8920d39952ab5e2f1311a011f8583e9a71eb818c Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit ea72007caa04ea882a7b1ee70274973f4ca3a432) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TextEdit/TextArea: don't deselect on release if IM just selected textShawn Rutledge2023-09-123-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | After 90d3fac73a10b9363fd34e6757cc730d7a0c086c we got a regression on Android at least: if you long-press to select a word, selection handles appear; then when you release, there's a QTouchEvent which is left unhandled, and then a synth-mouse release. In this case, we don't want to call setCursorPosition(), because it de-selects the selection that was just made by the input method. But the intention was to be able to set the cursor position (and also deselect text) by tapping on a touchscreen on other platforms that don't have text selection handles. (It seems to be consistent with Android behavior: there you can also deselect and move the cursor by simply tapping.) To avoid changing that behavior, we now set a flag if we get a mouse press and then a QInputMethodEvent with a Selection attribute, indicating that text got selected that way; and in that case, don't call setCursorPosition(). Fixes: QTBUG-115004 Pick-to: 6.5 Change-Id: I7e362da584f6e1cb1509dcc0eff024b291ef5df3 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> (cherry picked from commit c1d5e46ea79762bfcc070fabbf10ff7fdf184e01) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Loader: re-set ItemObservesViewport flag on child if already setShawn Rutledge2023-09-125-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QQuickLoaderPrivate::load() loads a Text item, its ctor calls QQuickTextPrivate::init(), which calls setFlag(ItemObservesViewport). QQuickItem::setFlag() tries to go up the parent hierarchy to get subtreeTransformChangedEnabled turned on; but at that time, the Text does not yet have a parent. If a Flickable contains a Loader that loads a Text with large content, QQuickTextPrivate::transformChanged() needs to get called during scrolling. Loader is not interested in these notifications for itself; so its parent's QQuickItemPrivate::transformChanged() detects that and turns off subtreeTransformChangedEnabled. After the child is loaded, QQuickLoader::itemChange() detects that the child's ItemObservesViewport is already set, and sets the same flag again. setFlag() doesn't have a guard, so the parent traversal happens again, and subtreeTransformChangedEnabled gets turned back on. If a different child were loaded, and that child did not want the notifications, the next QQuickItemPrivate::transformChanged() would detect it. If the child changed its own flag later on (e.g. because a small amount of text was replaced with a larger document, exceeding QQUICKTEXT_LARGETEXT_THRESHOLD), QQuickItem::setFlag() would be able to go up the parent chain at that time. For the autotest, long.qml has about 15KB of text. Maybe it will be reusable. At least it should compress well in git packfiles, since we have this license text elsewhere. Fixes: QTBUG-115687 Change-Id: I87b6a42f5735b8f9c2267f91a4112681da05de5d Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 8c7c60fff37ea7bb7420d925e2f88e62764bf86b) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qmljsimportvisitor: add warnings for lower caseSami Shalayel2023-09-124-4/+79
| | | | | | | | | | | | Replace an assert with a warning, and warn when qualified import names start with a lower case letter. Add a test for that. Also warn when using a qualified import with a name starting with a lower case, so users can fix their mistake more easily. Change-Id: Iff2b9148c5a36625baad70798e2efe006905e2a3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit eae7381b91192f6021e84f99be4d5c416aae9510)
* Remove resize guards from qml toolShawn Rutledge2023-09-126-5/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resize guards were prohibiting the initialization of the top level item size to the window size in a qml script when executed with the qml tool. This is usually fine because the window size is set to the item size. However, if this is not possible (minimum window size from the system, no explicit size on the item), the item has a different size than the window. The item would only be adapted to the window size after resizing the window. This patch removes the resize guards to make the item always fill the window on startup. The resize guard should hopefully not be needed; the QQuickItem setters for width and height return early if it's unchanged; QWindow::resize() does not emit changed signals if there is not yet a platform window and width or height is unchanged; and we hope all the overrides of QPlatformWindow::setGeometry() will avoid making unnecessary changes. However the guards were added in 8d9a7e47aaa03efe2d3eddfc9ac37d02a99affc7 and I don't remember exactly why. Adds the test tst_qml::itemAndWindowGeometry to check combinations of --config, --qwindowgeometry and qml files whose root item has or doesn't have its own dimensions, or changes its dimensions after being shown. Done-with: Matthias Rauter <matthias.rauter@qt.io> Pick-to: 6.5 Fixes: QTBUG-114068 Fixes: QTBUG-116753 Change-Id: Ib972e0bfc25809441d378c53dabb60653314f5a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 05e0dc2a88e751e97573610fd483f79da3e78854) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Curve renderer: update material when fill changesPaul Olav Tvete2023-09-121-0/+3
| | | | | | | | | | Fixes a bug where shapes would continue to be batched even if one of them were changed. Change-Id: I1c7f6527668f6cc617862e41463a0f470edb89c7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 6f8f15a7a08416ef98485d0f9e6dcd3afa968b1f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix the qmllint command lineAlexey Edelev2023-09-121-1/+2
| | | | | | | | | | | Move qmllint arguments under the generator expression guard. Fixes: QTBUG-115328 Change-Id: I7835251f0bf77555b878ff765af1abc76c5c17bd Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 0e18b14fecfafb725c79068ac29707a6aaa6b87c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add example categoryInkamari Harjula2023-09-121-0/+1
| | | | | | | | | | Added example category User Interface Components to qtqml i18n file. Task-number: QTBUG-116537 Change-Id: Idef277a87b18134dbc40878bae7784820b4dd07e Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit 7cead933263912f23b331c0a834d275880ca3140) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* FormalParameterList: prepare for qmlformatSami Shalayel2023-09-113-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove useless arg#0 bindingIdentifier from FormalParameterList. They are used nowhere, are not tested and are not even set correctly: FormalParameterList::finish() sets next to nullptr before its forloop that goes from this to this->next (that was freshly set to nullptr three lines above)... Instead of setting bindingIdentifier to arg#0 when its empty and testing for arg#, just test for bindingIdentifier being empty. That saves some trouble in qmlformat because you dont have to care about the position that the current method parameter has. Apropos position of the current parameter: qmlformat needs some context when doing its reformatting test, to avoid reparsing code in completely wrong contexts. Add missing preCode and postCode to MethodParameter to provide an artificial context for qmlformat, so it knows that it is working on a MethodParameter, and also teach qmlformat how to get the FormalParameter out of the artificial context, by extracting it from the FormalParameterList. Pick-to: 6.5 Change-Id: I2bc82f65d95c3cd09ad846c60dd7561ac03efad3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> (cherry picked from commit 640ff3d8125264e25bd1826529b9a57cdddf2205) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: All overviews list categorizationJaishree Vyas2023-09-114-4/+4
| | | | | | | | | | | | | | The \generate list names are added for each categorized section with some explanation. Here, calling the overviews as explanations-(name of the section). The idea is to give general terms instead of specific phrases like 'core' etc, for better understanding. Task-number: QTBUG-115347 Pick-to: 6.5 Change-Id: Ib33b450aa0919b0fd3e7a265cd2843af6c7d019c Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit e33a63d0dec5dd7ebd8d3fc172de9d6e24ddf00f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update mobile example categories for Qt 6.6Rami Potinkara2023-09-115-1/+4
| | | | | | | | | | | | | | | | | | | | | Add mobile example category tags for the chosen examples. Add for the ones that work best for both Android and iOS. Remove from the ones that do not work for both (at least yet). Added, as verified on Android -scenegraph openglunderqml -qtquickcontrols-contactlist -qtquickcontrols-gallery -qtquickcontrols-wearable Removed (for now), as not verified yet on Android -qtquickcontrols-todolist Fixes: QTBUG-116780 Change-Id: I7f22329ec93dedaa63df34bb55dd67d14ffe5c1d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 628659f759a97b36ca98ecc827069935033a8e6b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlBind: Move delayedName into place rather than taking it by const refv6.6.0-beta4Ulf Hermann2023-09-111-5/+5
| | | | | | | | | | | | Using a const reference triggers QTBUG-116742 because the refcounting fails in some non-obvious way. Moving the string into place avoids touching the refcount. Task-number: QTBUG-116742 Change-Id: I9195ad84ac2c97d6624cd29e4c747f66c7919b09 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 034cd962f5196b4d729459f01869169b37956597)
* Update dependencies on '6.6' in qt/qtdeclarativeQt Submodule Update Bot2023-09-111-5/+5
| | | | | Change-Id: I4382ed6ff3eaa9e3ab5b2dd8deabf577feac566e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QQmlSA::ScriptBindingKind: Turn into scoped enumerationFabian Kosmale2023-09-096-21/+21
| | | | | | | | | | | | and remove the Script_ prefix from its entries. This is more aligned with Qt's namings conventions. Change-Id: Ie97c2ce204b5532ab6bd6b136145f2a537175fbb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit d12d7a901f856311fc532a6f728b6e96e539d6e5) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QQmlJSScope: Mark internal documentation as internalUlf Hermann2023-09-091-0/+1
| | | | | | | | Change-Id: I12ef1ad0315c609af7059c58e77196eba4f5fd92 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 145e21fc2493e3ff104029935cca3f1793fe8767) Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* convert threading example to manual testsOliver Eftevaag2023-09-0835-223/+195
| | | | | | | | | | | | | The threading example used a LauncherList to combine two different but related examples into one. I've now separated both into a shared directory called 'threading' Change-Id: Iee8898e61adcf69dc67157a1eff5f6ac019a39ca Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 38373b81f37ccbf6ec66f43a70fe9622bbcc9593) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows native style: Mark ScrollBar as non-customizableFabian Kosmale2023-09-082-7/+11
| | | | | | | | | | | Consequently, remove code that supported setting a non-native contentItem. Task-number: QTBUG-107771 Change-Id: I871156c567f85db6e1b8247dcc6c2ea6a350cd4d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 901a8bf768abc3672e512b3f481b24ac0e1afb52) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make accent palette role available to QMLMitch Curtis2023-09-086-7/+26
| | | | | | | | | | | | By adding it to ColorGroup. It was added to QPalette in 17c589df94a2245ee92d45839c2cba73566d7310 (6.6). Fixes: QTBUG-116106 Change-Id: Ief38c131c5c7c01e02839235914f2917b9ba8255 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit b82af7b42db3c206ce7dd44e39304bf1166024f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlProperty: Accept badly capitalized signal handler namesUlf Hermann2023-09-083-0/+59
| | | | | | | | | ... but warn about them. Apparently we did accept them prior to 6.4. Fixes: QTBUG-116576 Change-Id: If890db85f5a8d71c0bcdfaf646ee9f01765a0b3c Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit 2fc19f2c627802d26bd385a6c9cc1f6412852ee2)
* Fix QML item is missing if its parent's clip property is trueJiDe Zhang2023-09-063-30/+51
| | | | | | | | | | | | | | | | | If using QQuickRenderTarget to the QQuickWindow, and set true in QQuickRenderTarget::setMirrorVertically, the QQuickWindow will apply flip Y to the matrix with native NDC, this behovior is wrong, If QRhi::isYUpInNDC is true, must ensure the QSGAbstractRenderer::projectionMatrixWithNativeNDC is following QSGAbstractRenderer::projectionMatrix, otherwise must ensure its flip Y relative to QSGAbstractRenderer::projectionMatrix. Fixes: QTBUG-116587 Change-Id: I12b5f6e37ed5bad8656cf46bf1a25e534db24b62 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit e898c06759b5c5a6138fac6f9a2cb31388ea3da9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename Path.simplified to simplifyShawn Rutledge2023-09-064-15/+15
| | | | | | | | | | | | | | simplified() sounds like it should be invokable, since we have precedents like QString::simplified() and QPainterPath::simplified(). We might even want a QML API like that some day. The new name more clearly indicates that it will internally simplify itself. Change-Id: I6b6ced667f78317c374fa02338752d15b35b8ed4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 03dab7544eef6205d751003453d7c316c983b096) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add example category to all the files that haven't yet got itInkamari Harjula2023-09-0613-1/+14
| | | | | | | | | | Added example category and also fixed one copy-paste mistake in Vulkan Texture Import. Task-number: QTBUG-116205 Change-Id: I96692f214849596e9555c635d9996d9b884c5cab Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit e421c21c3b6ae92fdc5ab18ce72d3e4d7125a7ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add missing closing parenthesisPaul Wicking2023-09-061-1/+1
| | | | | | | | | Fixes: QTBUG-116749 Change-Id: If1c61da09685045e40565e0d864db6d30896dd85 Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 2866cecd95989d6292254bd8055a5b8b65f4c3dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* ScrollBar: Fix visualSize being stuck without change signalIvan Tkachenko2023-09-053-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug that visualSizeChanged signal won't be emitted when needed, causing listeners such as binding expression being stuck with an old value without updates. This has caused a visual glitch with scrollbars in KDE: they appear incorrectly sized initially, but fix themselves as soon as scrolling starts. Needless to say, we don't use overshoot on desktops, but that feature is also plagued by this bug. Solution is to (1) don't assign new d->size before measuring visualArea, and (2) don't reassign oldVisualArea, because it would override visual size with an updated data, losing information needed for visualAreaChange to determine whether to emit signal or not. To optimize and avoid double-signals for visual position, existing setPosition() method was factored out into a new private method with an optional signal suppression flag. See also: https://bugs.kde.org/show_bug.cgi?id=473241 Change-Id: Id0482e5b90e08e1bb31367efe86f4a9cc046c4f6 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 470cc1a600ef5364fd7bee0f3f0b822ba95bab35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Add example categories for qtquickJaishree Vyas2023-09-0523-0/+23
| | | | | | | | | Task-number: QTBUG-116334 Change-Id: Id17a546b9363e5225b8778c629fe9ffe30d2e719 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io> (cherry picked from commit b16bea02f65dea173eb42208e8750245f334b5e5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QQuickWidget rendering API mapping for D3D12Laszlo Agocs2023-09-042-0/+4
| | | | | | | | | | | | | Right now requesting d3d12 via QSG_RHI_BACKEND or the C++ API maps to the Null backend of QRhi. That is not ideal. QRhiWidget has this logic, but the already existing QQuickWidget was not yet adjusted in 6.6 it seems. Change-Id: I12301e815d525c14584b01dcd0caa787d1c79ad0 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 76ae3dd78335b39d89b78480b6e9bf7364b3bd2c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmlls: show fix suggestions and enable quick fixesSami Shalayel2023-09-047-42/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Display the fix suggestions from qmllint in qmlls instead of just showing the warning. For example, 'Unqualified access: xxx is accessible in this scope because you are handling a signal at 18:10. Use a function instead.' sounds so much more helpful than the previous 'Unqualified access'. Add an ending '.' in QQmlJSFixSuggestion's messages where missing. Enable quick-fixes in VS Code and QtC by labeling quickfixes as quickfixes. Everything that is not labelled a quickfix might need a special language client implementation to work. Also, add a test for quickfixes: it seems someone broke the quick fix functionality in qmlls by mistake by relabeling a quickfix to 'refactor.rewrite'. Cherry-picking notes: This commit had to take into account that the tst_qmlls_modules improvements were not picked back. Fix the test to avoid duplicate publish notifications handlers and cache the notification as it is just fired once. Task-number: QTBUG-115213 Change-Id: I350e23901b97d16a60bb39fdb4ab566b0d7fbdfb Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 50a7560b784f16e4d8d697ce62bede8aa56d75f6)
* Update dependencies on '6.6' in qt/qtdeclarativeQt Submodule Update Bot2023-09-041-5/+5
| | | | | Change-Id: Ia8a61c39f63f0289423dab7846bf4abef51f4152 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: Fix issues in Attractor QML type documentationTopi Reinio2023-09-011-34/+30
| | | | | | | | | | | | | | | | | | * Replace references to nonexistent type PointAttractor with the correct type name, Attractor. * Replace references to nonexistent enumerations with a generic 'enumeration' property type. * Use \value commands in QML enumeration docs * Address language issues Fixes QDoc warning: No such type 'PointAttractor' in QML module 'QtQuick.Particles'. Change-Id: I989bf62e8b96e2c508a3dbfdc4fd8d6ada0f6e32 Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> (cherry picked from commit 03e14e4026e6256b26f03228514a97f17b005b73) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix memory leak in qquickpixmapcacheShawn Rutledge2023-09-011-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtPdf depends on QQuickPixmap::loadImageFromDevice() to pass a QPdfFile (which carries a pointer to the QPdfDocument) down into QPdfIOHandler so that it can avoid needing to reopen the document. But the introduction of loadImageFromDevice(), and then using the pixmap cache so intensively to store a lot of rendered PDF pages, revealed a drastic memory leak: many QQuickPixmapData instances remained in QQuickPixmapStore::m_cache long after their refCounts became 0. Quick scrolling through a PdfMultiPageView (especially if the zoom level is also being changed dynamically) can easily generate a lot of page-rendering jobs, some of which get cancelled early because the view has moved on to other pages and/or zoom levels. Here are several related fixes: - QQuickPixmapReader::getImage() creates a "job" represented by the QQuickPixmapReply that is returned, but now we start the job in a separate method, to ensure that QQuickPixmap::loadImageFromDevice() succeeds in connecting the QQuickPixmapReply::destroyed() signal before the job completes and deletes itself. - Use a QMutex to prevent QQuickPixmapStore::m_cache reentrancy: Rarely, a crash was possible when QQuickPixmapStore's QHash m_cache was modified between QHash::find() and dereferencing the iterator it returns, e.g. in QQuickPixmap::loadImageFromDevice(). - QQuickPixmapData::release() is needed in a few more places. - QQuickPixmapReply::finished isn't emitted if the job is cancelled, so the lambda that called oldD->release() wasn't called, and that was the remaining leak. We tried connecting QObject::destroyed() earlier, but it was causing a crash because the mutex to protect m_cache from simultaneous modification and QHash::find() was not in place. Now it seems ok. - Show "Number of leaked pixmaps: 0" in the qt.scenegraph.leaks logging category to make verification less ambiguous. Task-number: QTBUG-114953 Change-Id: I11518ccf28ee5a5055ae745a5921837d2f3151b6 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit c871a52f94a4836515754e641ee02386a9876a58)
* QmlCompiler: Change it to public moduleFabian Kosmale2023-09-014-12/+19
| | | | | | | | | | | | | | It now has public API, and users shouldn't need to link against QmlCompilerPrivate to gain access to that API. Change some includes to avoid syncqt complaints, and remove a superfluous const to avoid pedantic warnings. Change-Id: I00ac8713f6bd9d1437300bc833cf16b62216caa0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit ac5c7d52737489b2b63071e1003ef2d72e8eb8ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtdeclarativeQt Submodule Update Bot2023-09-011-5/+5
| | | | | Change-Id: Icf825e6a6cb9f33b8707e2f91976bc7ca75f762f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Move QQuickImageBase::sourceSize to QQuickImageOliver Eftevaag2023-08-312-1/+1
| | | | | | | | | | | | | | | | | | | | The sourceSize property in QQuickImageBase were shadowed by the QQuickBorderImage class because of a change I made in 351979e05ad2a861fc3e6f8d1. Since QQuickImageBase functions as the base class for QQuickBorderImage and QQuickImage, and since sourceSize in those two classes work slighly different (e.g QQuickBorderImage::sourceSize being read-only). It would make more sense to simply let those two types declare their own distinct Q_PROPERTIES, instead of using inheritance. Fixes: QTBUG-116399 Change-Id: Ia238b58307b16031b56866450d74f10d1e59b62f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit c5f58f40eda72d6e7f28e24a7509ced3eca247d1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>