aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* SearchField: Use highlightedIndex instead of currentIndex in stylesDilek Akcay8 days3-6/+6
| | | | | | | | | | As highlightedIndex property is added to SearchField, relevant style implementations that previously relied on currentIndex have been updated to use highlightedIndex. Pick-to: 6.10 Change-Id: Ib8bc065c92aa95a1ea5ea3cd5c3825bbd15c2f2d Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QtQml: Deduplicate enum handling in QtObject and clean up APIOlivier De Cannière9 days6-76/+146
| | | | | | | | | | | | | QJSValue is slow and can be avoided. Use more specific types. Also, switch to an exception based error handling instead of returning undefined. Amends 5e312953f6c41f244344bbd05a41f205a8d3f86d, found in API review Pick-to: 6.10 Change-Id: Ie7c304a0dd76c8096e7c1f9b7cc3cfe7471649da Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlJSTypeResolve: Support T -> QmlListProperty<T> conversionFabian Kosmale10 days1-0/+6
| | | | | | | | | | The engine handles this just fine, and we had examples (and probably documentation) shownig this pattern. If we want to warn about it, it should have a dedicated warning. Pick-to: 6.10 Change-Id: I105f4a49ecfc6fbd5f00c683e0dbef7d34a64a1d Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* FolderDialog: Declare FileDialogDelegateLabel from its module aliasOliver Eftevaag11 days5-5/+5
| | | | | | | | | | | | This was already done for FileDialog, but not for FolderDialog. It prevents a crash. Amends 87f6e63dfc32e4eac861f3490cb961dfbb028b23 Pick-to: 6.10 6.9 6.8 Change-Id: If6ab9152b9f1f5dcef92dfa891d09202968ef81e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qmllint: allow mixing ID based with text based translationMasoud Jami12 days5-95/+60
| | | | | | | | | | | | | Since 6.10 Qt i18n component allows mixing id based with text based translation and this is reflected in lrelease, lupdate, and documentation. This patch is a partial revert of 8b61addfa42525c1bd5f27febbe62dcbdb645fc9 and removes the qmllint warning in the case of mixing these two. Pick-to: 6.10 Change-Id: Iae2407da2bc5cc21fc3664051834c99b8c72fe58 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Android: fix broken link under QtQuickView pageAssam Boudjelthia12 days1-1/+1
| | | | | | | | Amends e0791e838daeb0dc99a3f28270bbfda3214a9fbf. Pick-to: 6.8 6.9 6.10 Change-Id: I8bf20c2cb01e1ff8e261fbb0c596a5b6b6c8aa68 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* QQ4A: Docs: Update connectSignalListener docs in QtQuickView/ContentPetri Virkkunen12 days2-7/+16
| | | | | | | | Update return value and behavior descriptions in QtQuickView/QtQuickViewContent::connectSignalListener functions. Change-Id: I566b5c7940c74daec6f20072d2db35bb66d3f86f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QQ4A: Enable signal connection queuing in QtQuickView and ContentPetri Virkkunen12 days2-26/+43
| | | | | | | | | | | | | | | | | | | | | Use SignalQueue, implemented in an earlier patch, in QtQuickView and QtQuickViewContent to handle connecting to QML signals before the QML is done loading, in these cases: * QtQuickView: If the underlying QAndroidQuickView object has not been created * Once the QAndroidQuickView is created and the view reference is set, we can send the queued connections to the C++ side safely. * QtQuickViewContent: If the Content has not been attached to a QtQuickView * Once the Content has been assigned a QtQuickView, we can send these queued connections to the QtQuickView safely. The QtQuickView may or may not queue these as well. Task-number: QTBUG-137057 Change-Id: Id84fb184d2d60a95f0ffb77896d0c553d7f52338 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QQ4A: Add QtSignalQueue class to manage queued signal connectionsPetri Virkkunen12 days2-0/+59
| | | | | | | | | | | | | | | This class will be used in both QtQuickView and QtQuickViewContent, to keep track of queued signal connections and eventually process them, connecting them to the QML view. This class also introduces an internal class to represent the data required to make a successful signal connection, to assist with storing the data. Task-number: QTBUG-137057 Change-Id: I798dbf0c0b377f2bf07874b17b83d493aa4905d9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QQ4A: QAndroidViewSignalManager: Move signal connection ID gen to JavaPetri Virkkunen12 days6-62/+85
| | | | | | | | | | | So that later patches can return valid values from the API when connecting to signals of QML views that have not been loaded, the Java API must be able to generate listener IDs. These calls can even happen before the Qt libraries are loaded. Task-number: QTBUG-137057 Change-Id: If2cafe8fd65841d2bcfc4a079939d81a279c7982 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QQ4A: Add possibility to register signals before QML is loadedPetri Virkkunen12 days4-28/+105
| | | | | | | | | | | | | | | | | | | | This commit adds a queue mechanism and API in QAndroidViewSignalManager that allows callers to add signal listeners before the QML view has been loaded. API Added to QAndroidViewSignalManager always returns true, but might still fail if a signal with the desired signalName does not exist. If using the QtQuickViewContent API, this should never happen, but with the QtQuickView API, this is a possibility with typos or signal names that are computed with some logic in code. Internally, QAndroidViewSignalManager listens to the QQuickView::statusChanged signal to detect when the QML view is done loading. Task-number: QTBUG-137057 Change-Id: I2ea95f096517f2b7f45a60f236923d42cb5cf1fe Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Harden namespacingTim Blechmann12 days23-21/+91
| | | | | | | | | | | | | | | When using namespaced Qt, we need to prevent symbol clashes with symbols of the same name. * namespace some publicly visible classes * hide classes in implementation in an anonymous namespace * rename read/write to readValue/writeValue to avoid name clash with c functions. Task-number: QTBUG-138543 Pick-to: 6.10 Change-Id: Ica77462c1f81f1e01cc60477e5b56ecfe3c1abb4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlls: remove unused headersTim Blechmann12 days1-5/+0
| | | | | | | | Flagged by qtcreator/clangd Pick-to: 6.10 Change-Id: I155d56e89d47e7c09cd7d1b5cb6ade13af565671 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Improve error message for invalid import qualifierDheerendra Purohit12 days1-1/+1
| | | | | | | | | | | | Previously, the error message for an invalid import qualifier did not show the qualifier name or explain what was wrong. This change adds the qualifier name to the message and says it must start with an uppercase letter. Pick-to: 6.10 Fixes: QTBUG-133313 Change-Id: I0bd4bb143f7b4cdc3b26cae73ab42a4fb05977b1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Qml[Table|Tree]Model: Put column handling in abstract classMatthias Rauter12 days8-470/+338
| | | | | | | | | | | This is the 7th patch in an attempt to make QQmlTreeModel and QQmlTableModel more similar and eventually merge common parts in a common abstract class. Task-number: QTBUG-138703 Pick-to: 6.10 Change-Id: Ie73ae28617efd83d2644c7a745eb7c583c0b68e6 Reviewed-by: Mate Barany <mate.barany@qt.io>
* VerticalHeaderViewDelegate: set 6.10 with set_source_files_propertiesMohammadHossein Qanbari12 days6-0/+18
| | | | | | | | | | | | Found in 6.10 QML API review amend 9601b74dabed53e93a7a5144d4c1fadb7876db18 Task-number: QTBUG-137478 Pick-to: 6.10 Change-Id: I3a26307f304277dfd259da3736d1069a43c0cd03 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* HorizontalHeaderViewDelegate: set 6.10 with set_source_files_propertiesMohammadHossein Qanbari12 days6-0/+18
| | | | | | | | | | | | Found in 6.10 QML API review amend 9601b74dabed53e93a7a5144d4c1fadb7876db18 Task-number: QTBUG-137478 Pick-to: 6.10 Change-Id: I11fcf5317add4c07e211cff70d3b2e86bd470000 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Curve renderer: Fix filling of certain paths with degenerate partsEirik Aavitsland12 days2-15/+45
| | | | | | | | | | | | | Determining the fill side of a segment would fail if the path contained an overlapping segment in the opposite direction. If a subpath started with such a segment, the resulting fill could be incorrect. Fix by iterating over the subpath for a segment with a determinable fill side. Fixes: QTBUG-133247 Pick-to: 6.10 6.9 6.8 Change-Id: I07c4f884d525b19af93609bcb31b412d340bebd5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix invalid access to enginePriv in QQmlIncubatorPrivate::clear()Dheerendra Purohit12 days1-0/+2
| | | | | | | | | Add null check to avoid accessing enginePriv after it is set to nullptr. Pick-to: 6.10 6.9 6.8 6.5 Fixes: QTBUG-138927 Change-Id: I180828066a100465694337c4378139cfd9e4ab06 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Fix qt.qpa.menus warning in tst_qquickmenuMitch Curtis12 days3-52/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning was: QWARN: tst_QQuickMenu::FluentWinUI3::nativeStatic() qt.qpa.menus: QPlatformMenuItem(0x60c0001c5040) does not belong to <QCocoaNSMenu: 0x6070000884a0> Title: Supermenu: 0x0 (None), autoenable: YES Previous menu: 0x0 (None) Next menu: 0x0 (None) Items: ( ) In nativeStatic.qml, we have an item tree that looks like this: Menu { Action { /* ... */ } MenuItem { action: Action { /* ... */ } } Menu { Action { /* ... */ } } } Removing the first two menu items of the top-level menu works. When we get to the menu item for subMenu, we see that it has a Menu of its own, and so we call recursivelyDestroyNativeSubMenus. That removes all of the menu's native items, and at the end it does this: menuPrivate->resetNativeData(); Here, menuPrivate refers to subMenu's private object. This line severs the connection between subMenu and menu, which leads to the warning. We then return from recursivelyDestroyNativeSubMenus and end up here in QQuickMenuPrivate::removeNativeItem: if (nativeItem->handle()) { handle->removeMenuItem(nativeItem->handle()); syncWithNativeMenu(); } The removeMenuItem call then triggers the warning. To fix this, we need to have control over when resetNativeData is called, so that we can do it after the removeMenuItem call. Do so by rewriting removeNativeItem to be recursive, and using it in favour of recursivelyDestroyNativeSubMenus, which we then remove. Improve internal docs while we're at it. Pick-to: 6.8 6.9 6.10 Change-Id: I4955a5e4d8e5aa5c9d46873b8b3a27f65446ea35 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QuickDialogs: Do not use QFLAGSFabian Kosmale12 days4-4/+4
| | | | | | | | | | | | | | | | | Dialogs uses QFLAGS to bring in various classes via related meta-objects. The goal is to expose specific enums in the QML API. What it does instead is to expose all enums of those classes at runtime, but not to tooling. Switch the code to use QML_EXTENDED_NAMESPACE, which also exposes all enums at runtime, but also to tooling. Task-number: QTBUG-137075 Pick-to: 6.10 Change-Id: Id8d5858575a445f957572fc090df482db1b6fce8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* ListElement: Remove historical FIXMEFabian Kosmale12 days1-1/+0
| | | | | | | | | It predates the public history, and a look at the private history confirms that it is no longer relevant. Change-Id: I08d743a1963ae49fa3f21909725350e05936b725 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Luca Di Sera <luca.disera@qt.io>
* qt_add_qml_module: Support enabling lint target for examplesFabian Kosmale12 days1-1/+12
| | | | | | | | | | | | | | | If QT_LINT_EXAMPLES is set, any target defined below the "examples" folder will add its lint target to the ALL target. Together with a change in CI to actually pass that define down, we can enforce absence of qmllint warning by combining it with a .qmllint.ini file setting max warnings to 0. Pick-to: 6.10 Task-number: QTBUG-108448 Change-Id: I0f4fd1d18221e503d93e3f435bbc47292857ec20 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* qmltyperegistrar: Update jsroot metatypesUlf Hermann12 days1-0/+23
| | | | | | | | A few enums have been added and uiLanguage got a change signal. Pick-to: 6.10 Change-Id: I2554c65c9d948881b3694e07df5df8309fc29073 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Pass QQmlJSSaveFunction as const refUlf Hermann12 days2-7/+7
| | | | | | | | std::function is quite heavy-weight. Coverity-Id: 486648 Change-Id: Ia7c61a726bde9c9d6a02412b9aa5f683bb4d355a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Deduplicate import finalizationUlf Hermann13 days2-65/+88
| | | | | | | | | We can re-use the same code for file and directory imports. And we can avoid copying a QString this way. Coverity-Id: 486646 Change-Id: Id95226674e382a722527ba3ff6205682ffe1075a Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QmlCompiler: Remove pointless null checkUlf Hermann13 days1-5/+4
| | | | | | | | | We have already dereferenced passMan a few lines before and that obviously succeeded. Coverity-Id: 486649 Change-Id: I36dcef5757013acf98d665396a3f8f3d289bfee1 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QtQml: Assert on currentStackFrame in direct eval callUlf Hermann13 days1-2/+12
| | | | | | | | | | | If we're called directly from a CallPossiblyDirectEval instruction, that instruction must live in a function which must have created a stack frame. Coverity-Id: 486651 Change-Id: I8136f40a8b6058ad499a7fdaaed99bf85485b11c Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* wasm: a11y - Implement ParentChanged eventEven Oscar Andersen13 days1-0/+7
| | | | | | | | | | | | | | | Implement the QAccessible::ParentChanged callback. Probaby not possible with a perfect implementation. What can reasonably be done is to issue ParentChanged on; QWidget::setParent, QWindow::setParent, QQuickItem::setParentItem. However calling these functions do not necessarily map 1:1 to QAccessibleInterface::parent(). One common reason for why the two hierarchies will diverge is because of the Accessible.ignored state Task-number: QTBUG-134923 Change-Id: Iaa8cfd3d65c0fac137c95434ec21176e7aea6699 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: Fix incorrect usage of \generatelistTopi Reinio13 days3-3/+3
| | | | | | | | | | | | | | | | | | | | | The \generatelist command takes an optional argument that affect how the members are listed, for example, `classesbymodule` which creates an annotated list of the classes in a named C++ module. `groupsbymodule` is not recognized or documented. QDoc falls back to generating a list of all members of a group in this case. While the end result is correct, this relies on an undocumented feature that is likely to change and break. Replace these instances with an explicit \annotatedlist command that produces the same output. Pick-to: 6.10 Task-number: QTBUG-138901 Change-Id: Icebe063937cdf1e2ef034b723cce646cd6c96bbe Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QQmlDataTest: drop default try timeout from 5 seconds to 1Mitch Curtis13 days1-0/+2
| | | | | | | | | | | | Make debugging of failing tests less painful. The tests that had to be changed as a result are listed in the comments of the linked task. Fixes: QTBUG-138662 Task-number: QTBUG-81979 Change-Id: Iee50f2d4f2160e3e9bc2c7985925583fad810811 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Spinbox example: Make the first * non greedyAlbert Astals Cid13 days1-4/+5
| | | | | | | | | | Otherwise it will consume the - as part of it, and we want to keep the - for negative numbers. For it to work we have to add the $ at the end Pick-to: 6.10 6.9 6.8 Change-Id: Ibe4750ccd4d36fef604ae424fea34ee9d64432cd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML Tooling: Streamline SearchResult constructionUlf Hermann13 days2-17/+15
| | | | | | | | | | | | | Realize that the "Error" enum value is unused and remove it. This way there is only a single invalid SearchResult: The default-constructed one. Using this, we can localize the SearchResults to the places where they are returned, hopefully helping compilers and tools to perform return value optimization. Coverity-Id: 486146 Coverity-Id: 486135 Change-Id: I110c3773b9089ae0c1ca3e1340c303991b4cfbe1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Qml Tooling: Fix searchDefaultLocationUlf Hermann13 days2-13/+18
| | | | | | | | | | The .ini file searching can be extracted into a separate function, the visitedDirs can be const, and the iniFile string can be moved. Coverity-Id: 483437 Coverity-Id: 486143 Change-Id: Ifb051e2cd750a5a99d655d534a4fefa4b744defc Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Derive QmlTableModel from QAbstractItemModelMatthias Rauter13 days3-4/+25
| | | | | | | | | | | | | | | | | | | | | Previously QmlTableModel was derived from QAbstractTableModel. The upsides of QAbstractTableModel are very limited but disable the possibility to combine the similar aspects of QmlTableModel and QmlTreeModel in a common class. In QQuickHeaderView, QAbstractTableModel is treated in a special way. In Order to keep all existing code working, we are treating QmlTableModel the exact same way also after this change. This is the 6th patch in an attempt to make QQmlTreeModel and QQmlTableModel more similar and eventually merge common parts in a common abstract class. Task-number: QTBUG-138703 Pick-to: 6.10 Change-Id: Ifb1f12d147e659320bddccf6c183ac0308cfb99b Reviewed-by: Mate Barany <mate.barany@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Mention all_qmllint in the doc for qmllintOlivier De Cannière14 days1-4/+9
| | | | | | | | | This should help bring more awareness to it for people who already know qmllint. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I60e6c6cd1bcab349587904bce08f66af5aef3d95 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Add set_source_files_properties for SearchFieldDilek Akcay14 days5-0/+19
| | | | | | | | | | Added set_source_files_properties to configure build settings for SearchField in 6.10. Found in 6.10 QML API review, QTBUG-137478. Pick-to: 6.10 Change-Id: Ieff5ff3c737ee2c9ddd7a261333eea777d7ef03e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Docs: split the SQL section out from the C++ model documentationVolker Hilsheimer14 days4-84/+95
| | | | | | | | | | | | | | | | | Integration of Qt Quick's item views with SQL databases is a significant enough topic to deserve it's own page, and the overlap with exposing C++ data structures to QML is minimal. So move the section into a separate page, and adjust the section levels accordingly. Link to the Model/View Programming documentation for creating an editable model. It's more complete and authoritative documentation than the somewhat brief explanation of QAIM::setData in the cppmodels documentation page. Pick-to: 6.10 Change-Id: I52b759d2bd28ea6227e69a33653ba608fe530b20 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Acknowlege touch event state within the popup as similar to mouseSanthosh Kumar2025-08-051-1/+1
| | | | | | | | | | | | | | | | | The touch events ignored by the pop-up have not been updated with the handled status, and this makes the delivery agent consider the pop-up as the event grabber, which further blocks the touch event from propagating. This patch makes the pop-up to update the event with the touch event handling status. Thus, even the ignored status has been updated in the event, allowing the delivery agent to propagate the events to other items. Fixes: QTBUG-138478 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I2399aea70d58b6d427bf76f871a3fcc04c69a44f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* qmllint: don't grep twice for context propertiesSami Shalayel2025-08-051-4/+12
| | | | | | | | | It seems that we grep twice when grep returns 1. From the manual, a return code of 1 means nothing was found and in this case we shouldn't run the fallback grep method. Change-Id: Id8993ca914cefb8bb806f77334508be46fb60fbe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: make contextproperties a real class and renameSami Shalayel2025-08-056-51/+81
| | | | | | | | | | | | | | | | | | | | | | | | | Prepares for QTBUG-138061 where we need a way to load user-defined context properties into QQmlJS::ContextProperties. Rename QQmlJS::ContextProperties into HeuristicContextProperties to avoid confusions with the UserContextProperties. Make HeuristicContextProperties a real class so that we can add methods to load and save context properties to and from disk. Make the heuristics be saved in a list instead of a QHash, as the order of the property matters as we write them out into a file and testing becomes complicated when the order changes between different runs. Also note that it might be confusing for qmlls users if their warnings change orders during multiple runs. Rename some methods for clarity. Task-number: QTBUG-138061 Task-number: QTBUG-128232 Change-Id: Ib6302f609e182e622015293366c8b42425566a0e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Compiler: Skip type propagation for functions returning ScriptStringOlivier De Cannière2025-08-051-0/+4
| | | | | | | | | We cannot know in what context the binding will be executed. Task-number: QTBUG-138188 Pick-to: 6.10 6.9 6.8 Change-Id: I018e931cc43cdaea052cfad41d45018fcd1193fa Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* macOS style: Give Switch an outline when "Increase contrast" is enabledOliver Eftevaag2025-08-052-14/+26
| | | | | | | | | | | | | | | | | | | | | The Switch doesn't use any elements from the QuickNativeStyle module and thus won't automatically get an outlined pixmap to use as a background. In other words, we have to create the outline ourselves. Luckily, in 6.10, we have the necessary API to do just that. To make the Switch's look and feel be as similar to a native macOS switch as possible, we'll have to give both the background and the handle an outline. Since Rectangle renders its border inwards, I had to wrap the SwitchHandle's root Rectangle in a new, slightly larger Rectangle, which is normally invisible, unless "Increase contrast" is enabled. This was done, so that the borders for both the SwitchIndicator and the SwitchHandle will overlap, without causing the outline to look twice as thick. Pick-to: 6.10 Change-Id: Idc1f02a230894ccce4ce211ef9499c5e729d651c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Clarify Qt 6 hover behavior for Item::enabledDheerendra Purohit2025-08-051-6/+13
| | | | | | | | | | | | | In Qt 6, hover events may still be delivered when enabled is false to support tooltips. Updated the documentation to reflect this. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-136598 Task-number: QTBUG-30801 Change-Id: I77fa717c18a76660c4f63b175c02cb8eef21d175 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge 🏖️ <shawn.rutledge@qt.io> Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
* Don't reuse invalidated distance field cacheEskil Abrahamsen Blomfeldt2025-08-056-14/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the fonts are invalidated e.g. because application fonts are cleared, there will be a bit of a round-trip where we reset all text components to rematch the fonts they use. Since the scenegraph nodes contain direct pointers to the distance field cache, we cannot delete the cache itself before the text has been reset and a new font has been matched. This caused an issue where an application font was unloaded and a new one was loaded instead. Since they both had the same virtual file name (":qmemoryfonts/0"), however, we would get the glyph cache for the old font when we were resetting the text with the old. Since the glyph indexes referred to the new font, we would end up with random glyphs in the text. The core problem was that the stale caches were still in the hash when the scenegraph was being reset. Instead, we start the sync by either deleting inactive caches or moving the active ones into a separate list. When the text items are reset, the hash is populated with new caches. When the sync is done, we flush the stale caches: Meaning that we delete the ones that are now no longer used. Pick-to: 6.10 Task-number: QTBUG-132108 Change-Id: Iae4bebdbd1acc34ff86a2f9f6f34fdd0d6cbac0e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QtQml: Allow eval() in global contextUlf Hermann2025-08-051-9/+9
| | | | | | | | | | We don't have to crash if we can't determine a function to query for strictness or if there is no explicit "this" object. Pick-to: 6.10 6.9 6.8 6.5 Fixes: QTBUG-136688 Change-Id: I541f2d906e10a7512d8364a9286885bd6afa4423 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QtQml: Avoid unnecessary string copyingUlf Hermann2025-08-053-3/+4
| | | | | | | | We only need to retrieve the qmldir type namespace if it's not empty. Coverity-Id: 482854 Change-Id: I833e1dd1e100442cf2351944203dce18a4fb9f2b Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QtQml: Avoid unnecessary copyUlf Hermann2025-08-051-6/+4
| | | | | | | | If the qmldir file has no redirection, we don't need to copy any URLs. Coverity-Id: 482855 Change-Id: I8249ffe65b8b62401e8e0593fafa794d5ce862db Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* QQmlJSLogger: Don't trigger assert in QColorOutputFabian Kosmale2025-08-051-1/+2
| | | | | | | | | | | | | As a comment already points out, having an empty replacement message is possible. In that case, we shouldn't attempt to print it. Add a dedicated test-setup for QQmlJSLogger, to make it easier to expand tests there. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-138871 Change-Id: I55c5de140fe8175e9deaca519bb734654dc366f4 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QQuickPressHandler: c++23 compile fixTim Blechmann2025-08-051-1/+1
| | | | | | | | | | | | When building with c++23, the `= nullptr` assignment to a unique_ptr fully instantiates the underlying type to synthesize the destructor. This means the forward declaration cannot be used. Relying on the default constructor as workaround. Pick-to: 6.8 6.9 6.10 Change-Id: Iff411ae5ea6fe716dc1e2c2c4dbba9e46918fae5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>