summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Windows11Style: cache value for PM_MenuButtonIndicatorChristian Ehrlicher2025-10-302-4/+13
| | | | | | | | | The value for PM_MenuButtonIndicator depends on the size of ChevronDownMed char from Segeo Fluent font. Avoid the recalcuation of this value by a small cache. Change-Id: I974ed5f1675a76f6a4f4d600c99450f0005169fd Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* a11y: Fix cursor-based text{Before,After}OffsetMichael Weghorn2025-10-301-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, qt_accTextBeforeOffsetHelper and qt_accTextAfterOffsetHelper (used by QAccessibleTextWidget and QAccessibleQuickItem) were not consistently returning text items of the given boundary type that is completely *before* or *after* the given index, but could e.g. return the word in whose middle the offset is when using QAccessible::WordBoundary. This could for example break an assistive technology feature of navigating through a text by word if it relies on those methods. Adjust the implementations to prevent that from happening, by calling QAccessible::qAccessibleTextBoundaryHelper again with an index moved by one character until either a result before/after the given index is returned or the start/end of the text has been reached. Extend the existing QTextEdit a11y test by a few cases that would previously fail. (Note: Depending on the text granularity used, not every character in the text is necessarily considered part of any text item: E.g., when using QAccessible::WordBoundary, space characters in between words are not, at least not for the QTextCursor logic as used in QTextEdit or qtdeclarative's QQuickTextEdit). Fixes: QTBUG-140504 Task-number: QTBUG-139943 Change-Id: Ie6f0f2b2579237f42964d2498c818d1f02bf4bb8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y: Don't assert on text existing before indexMichael Weghorn2025-10-301-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | As the QAccessibleTextInterface::textBeforeOffset doc says: > Returns the text item of type boundaryType that is close to offset > offset and sets startOffset and endOffset values to the start and end > positions of that item; returns an empty string if there is no such an > item. Sets startOffset and endOffset values to -1 on error. Therefore, return an empty string and set indices to -1 if there is no text item of the given boundary type before the given index in QAccessibleTextInterface::textBeforeOffset instead of asserting, since this is a valid result and this code path can e.g. get called by platform a11y bridge implementations like the one for the AT-SPI Text interface's GetTextBeforeOffset method. Extend the existing QLineEdit a11y test accordingly. Fixes: QTBUG-140467 Pick-to: 6.10 6.9 6.8 Change-Id: Ibc8d7b4f65ae7787cad8eeebc85b99fd0fb43503 Reviewed-by: Timon Sassor <timon.sassor@governikus.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y: Fix name in qAccessibleTextBoundaryHelper docMichael Weghorn2025-10-301-1/+1
| | | | | | | | | | | | | Adjust the documentation according to 8307ab784eb4d8d22441ee61f02cb381684ca3a2, which moved and renamed the method that was previously QAccessibleTextWidget::getBoundaries. Amends 8307ab784eb4d8d22441ee61f02cb381684ca3a2. Pick-to: 6.10 6.9 6.8 Change-Id: I5bb541c502434a0e11af37f4b1e164bb7100aca2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y: Extract helpers for getting text at/before/after offsetMichael Weghorn2025-10-303-39/+88
| | | | | | | | | | | | | | | | | | | | | | | | | Move the existing QAccessibleTextWidget logic to implement the QAccessibleTextInterface::textAfterOffset, QAccessibleTextInterface::textBeforeOffset and QAccessibleTextInterface::textAtOffset interface methods using a QTextCursor out of that class to 3 new QtGuiPrivate helper methods. This will allow to reuse them in QAccessibleQuickItem in qtdeclarative, which implements the exact same logic (for one code path). In a first step, only move the existing logic, i.e. no change in behavior is intended by this commit. In an upcoming commit, the actual logic will be improved, which will then fix both, the QAccessibleTextWidget and QAccessibleQuickItem implementations without having to keep the code in sync manually. Task-number: QTBUG-140504 Change-Id: I87690fb6af040d6c9207bf19ddffe2e3eba16b0d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y: Simplify/Deduplicate qAccessibleTextBoundaryHelperMichael Weghorn2025-10-301-33/+27
| | | | | | | | | | | | | | | | | Extract a local helper function qAccessibleTextBoundaryHelperHelper that takes care of moving the cursor to the start and end positions and returns the corresponding indices. Simplify and unify QAccessible::qAccessibleTextBoundaryHelper to use that helper for multiple cases instead of repeatedly implementing equivalent logic. Also return the result early instead of first assigning it to a local variable. No change in behavior intended. Task-number: QTBUG-140504 Change-Id: I10df3957166cf815220a3c67f1774fc37c5e7311 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y wasm: Report orientation via "aria-orientation"Michael Weghorn2025-10-302-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As documented in [1]: > The aria-orientation attribute indicates whether the element's > orientation is horizontal, vertical, or unknown/ambiguous. Therefore, map the QAccessible::Attribute::Orientation attribute introduced in a previous commit to the "aria-orientation" property in the WebAssembly accessibility bridge for elements that have roles for which the property is applicable according to [2]. In a test with the QTBUG-140769 sample program in Chromium 140.0.7339.207, this gives the expected result when inspecting the attributes of the scrollbars: * aria-orientation="vertical" is set for the vertical scrollbar * aria-orientation="horizontal" is set for the horizontal scrollbar When inspecting the corresponding objects of Chromium's accessibility tree in Accerciser Accessibility Explorer [3] on Linux, the result is now also as expected: * ATSPI_STATE_VERTICAL is set for the vertical scrollbar * ATSPI_STATE_HORIZONTAL is set for the horizontal scrollbar Previously, ATSPI_STATE_VERTICAL would incorrectly be set for the horizontal scrollbar as well, because according to [1], "vertical" is the default value for elements using the scrollbar role. [1] https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-orientation [2] https://w3c.github.io/aria/#aria-orientation [3] https://gitlab.gnome.org/GNOME/accerciser/ Task-number: QTBUG-140769 Change-Id: I8160c7ab2a53ebea6b3369f1b2774cdd23d4db3e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y macOS: Report orientation via NSAccessibilityOrientationMichael Weghorn2025-10-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | In the macOS accessibility bridge, implement mapping of QAccessible::Attribute::Orientation introduced in a previous commit to the equivalent NSAccessibilityOrientation [1]. In a test with the QTBUG-140769 sample program, this gives the expected result when inspecting the attributes in Accessibility Inspector: * "Orientation: AXVerticalOrientation" is shown for the vertical scroll bar * "Orientation: AXHorizontalOrientation" is shown for the horizontal scroll bar * no explicit "Orientation" is displayed for the scroll area's widget which doesn't have an orientation set [1] https://developer.apple.com/documentation/appkit/nsaccessibilityorientation Task-number: QTBUG-140769 Change-Id: Ib51146a8f5f30e6894ab91a3f11bb794ba2b2cd9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y uia: Report orientation via UIA_OrientationPropertyIdMichael Weghorn2025-10-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support UIA_OrientationPropertyId [1] by mapping QAccessible::Attribute::Orientation introduced in a previous commit to it. In a test with the QTBUG-140769 sample program, this gives the expected result when querying the value in NVDA's Python console: For the vertical scroll bar: >>> mouse.UIAElement.GetCurrentPropertyValue(30023) 2 For the horizontal scroll bar: >>> mouse.UIAElement.GetCurrentPropertyValue(30023) 1 For the widget inside the scroll area (that doesn't have any orientation set): >>> mouse.UIAElement.GetCurrentPropertyValue(30023) 0 That matches the expected result according to the OrientationType enum in UIAutomationCore.h: enum OrientationType { OrientationType_None = 0, OrientationType_Horizontal = 1, OrientationType_Vertical = 2 } ; [1] https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids Task-number: QTBUG-140769 Change-Id: I365d2400e74f972b1f1b4e61c35934dc3d9d348d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
* a11y atspi: Handle special max count 0 in AT-SPI CollectionMichael Weghorn2025-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | As described in libatspi's atspi_collection_get_matches documentation [1], a value of 0 for the count means no limit. Handle it accordingly in the AT-SPI Collection implementation initially added in 7a478ff96f27fbfc8ddfbc67ba62276580aa02b4. Otherwise, no objects instead of all matching ones are returned, which turned out to be one reason why Orca's structural navigation feature didn't work to navigate between headings in the Qt 6 variant of LibreOffice. Related pending at-spi2-core merge request to update the corresponding AT-SPI Collection XML doc as well: [2] [1] https://gnome.pages.gitlab.gnome.org/at-spi2-core/libatspi/method.Collection.get_matches.html [2] https://gitlab.gnome.org/GNOME/at-spi2-core/-/merge_requests/208 Task-number: QTBUG-139334 Change-Id: Ic74dd1dd768647d8554fc7c7779a23f2fa62798d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* a11y: Prevent infinite loop in QAccessibleTextInterface::textAtOffsetMichael Weghorn2025-10-301-1/+5
| | | | | | | | | | | | | | Detect the case when there is no more boundary and return an empty string and -1 for the start and end offset (because no text unit of the wanted type could be found), instead of looping infinitely. Fixes: QTBUG-141388 Task-number: QTBUG-139943 Pick-to: 6.10 Change-Id: I752ebfc9015e5de74465f03a1b9bb5662abfdc0e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Don't claim that PCRE2 is optionalJoerg Bornemann2025-10-301-2/+2
| | | | | | | | | | | | | Using PCRE2 isn't optional anymore since Qt6. Fix QtUsage text in PCRE2's attribution file. Don't mention the options to turn off the pcre2 feature in configure's help text nor configure-cmake-mapping.md. [ChangeLog][Third-Party Code] Don't claim that using PCRE2 is optional. Pick-to: 6.8 6.10 Change-Id: I53ea08a4cf7311fac9da2a514553f5e65a9bbc91 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QDataStream: remove description from Version enum values' docsAhmad Samir2025-10-301-44/+44
| | | | | | | | | | | | | | | | | | | It's redundant; the repeated values clearly show that the version doesn't necessarily change with each Qt release: Constant Value QDataStream::Qt_6_5 Qt_6_0 QDataStream::Qt_6_6 21 QDataStream::Qt_6_7 22 QDataStream::Qt_6_8 Qt_6_7 This also makes updating the enum values simpler, and avoids bugs like QTBUG-116886. Fixes: QTBUG-116886 Pick-to: 6.10 6.8 6.5 Change-Id: Ie89c29417e5c901f693f0fcc1906fde46f39d27e Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove DEPLOYMENT_DIRECTORY argument from ↵Alexey Edelev2025-10-301-6/+2
| | | | | | | | | | _qt_internal_android_add_aux_deployment The argument is never used and was a leftover from the intermediate implementation stage. Change-Id: If03fedf0da2e1e4a114e715d8586c96840f0af58 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Enable multi-abi builds for the modern Android bundlesAlexey Edelev2025-10-301-65/+85
| | | | | | | | | | | | Forward the QT_USE_ANDROID_MODERN_BUNDLE and QT_USE_ANDROID_TARGET_BUILD_DIR variables to the per-ABI external projects. Adjust the dependecy chains, so modern android bundles now require the per-ABI projects built first and only then continue the deployment process. This still needs further changes to support dynamic features. Change-Id: If48fc3b433fd9954e123790c6e310ce9a015b711 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add _qt_internal_android_get_deployment_settings_file_genexAlexey Edelev2025-10-301-12/+13
| | | | | | | | | | Function returns the generator expression that returns path to the android deployment settings file after evaluation. This deduplicates the code. Pick-to: 6.10 Change-Id: I4f094aeb7adc351f5275fc8a311c642a54ff7c2c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QFileDialog: Remove unused QFileDialogLineEdit::d_ptrhjk2025-10-302-5/+1
| | | | | Change-Id: Id539eaaa1e426171bd58b6c0b2a7b48a2299e010 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Upgrade PCRE2 to 10.47Giuseppe D'Angelo2025-10-3069-3140/+8202
| | | | | | | | | | | New upstream release. Adjust the license files and attributions, matching upstream. [ChangeLog][Third-Party Code] PCRE2 was updated to version 10.47. Pick-to: 6.10 6.8 6.5 Change-Id: Ie7934d186a9c0e02bf16ccbcccfbe4844c13fef9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wayland: Ignore wl_pointer.leave serialVlad Zahorodnii2025-10-301-2/+2
| | | | | | | | | | | | | That serial is not suitable for anything useful. It cannot be used for interactive move/resize, setting a selection, or any other requests. It is also not suitable for event ordering. Qt doesn't use these serials itself, they are mostly useful for communicating back to the compositor. The serials in wl_keyboard.leave events are already ignored. So it also improves code consistency. Change-Id: Ieb684c369ae665c4aeb08a6dc4be31206e0b6ed0 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* wayland: remove duplicate include of qwaylandshmbackingstore_p.hJie Liu2025-10-301-1/+0
| | | | | | | | | The file already includes <QtWaylandClient/private/qwaylandshmbackingstore_p.h>, so the local include "qwaylandshmbackingstore_p.h" was redundant and has been removed to avoid duplicate inclusion. Change-Id: If3596e233ed90c2a04c736cb93056aa58dfd34e1 Reviewed-by: David Redondo <qt@david-redondo.de>
* Drop never defined QWellArrray::cellContentMichael Weghorn2025-10-291-1/+0
| | | | | | | | | | The method is only declared, but unused and not actually implemented anywhere. Drop it. Change-Id: I9e89052789780fa7f5b87acb99ed3bea5f203bd4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* doc: QRangeModel: Fix link to C++ tuple protocol in Trees of dataKai Uwe Broulik2025-10-291-1/+1
| | | | | | Pick-to: 6.10 Change-Id: Ifa966971c61b8a433d62c04f6f3469a0df654593 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Mark Q{Sequential|Associative}{Const|}Iterator as \internalUlf Hermann2025-10-292-0/+20
| | | | | | | | | They've never been documented properly and otherwise produce qdoc warnings. Now that they're deprecated, we don't need to start documenting them anymore. Change-Id: I7686a974f9c97c6198e36bd466e9744e815a8c5c Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* QXcbAtom: add missing <cstdlib> #includeMarc Mutz2025-10-291-0/+1
| | | | | | | | | | Clang 21 complained about free() being an undefined identifier. Amends d67214302f269242ae3d8d2b962fd91ec42c979e. Pick-to: 6.10 6.8 6.5 Change-Id: I16742b06b302576b2ff15fa972d91d1e077f3057 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows QPA: Add missing refresh rate updateMorteza Jamshidi2025-10-291-0/+5
| | | | | | | | | Added missing handleScreenRefreshRateChange call to QWindowsScreen Fixes: QTBUG-139966 Change-Id: If34ea49b61db1e6ec8b0af92517aee42480c4ce8 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Fix typo in lidbus-1 headers third-party nameKai Köhne2025-10-291-1/+1
| | | | | | Pick-to: 6.5 6.8 6.10 Change-Id: I885b40062214aedbf367f2298eb346c594e1a297 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* SHA3: Replace git SHA with tagKai Köhne2025-10-291-1/+1
| | | | | | | | | | [ChangeLog][Third-Party Code] Replaced version information of 'Secure Hash Algorithm SHA-3' from a git SHA to a semantic version. The content remained the same though. Pick-to: 6.5 6.8 6.10 Change-Id: Ic05b0746eb78491fe9abdfea4d09092d4181a647 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: Fix double emission of certain a11y eventsTimon Sassor2025-10-281-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 3c709198838866d5122c69a30cacdc806605d0cf and e7a211d702d6aa21a30eff56ceeffc153385443e introduced a11y actions for focusing and scrolling. However they also accidentally introduced a double emission of their according events. This causes problems, since every new event stops the processing and announcement of the previous in TalkBack. We remove the sendEventForVirtualViewId() calls from performAction() and performActionForVirtualViewId(), because they are the culprit. If an action like focus or scroll changes the app state, an a11y update is triggered, which ends up calling notifyObjectFocus() or notifyScrolledEvent() where the according event is then emitted and the a11y delegate state is updated. For the focus there is an exception, since an element cannot gain the active focus if is is disabled. However TalkBack should still be able to place its focus frame on that element and read out its content. Pick-to: 6.10 6.8 Change-Id: I9061eec713fd5382feb7aacafdffe393968ef8f1 Reviewed-by: Lars Schmertmann <SmallLars@t-online.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Narrow eccentric usage of QLocale::FormatType to one compilation unitEdward Welbourne2025-10-284-7/+6
| | | | | | | | | | | | | | | | | In qtimezonelocale.cpp some functions use QLocale::FormatType with a locally-defined eccentric meaning. I'd made the mistake of letting that infect a QTimeZonePrivate method's signature, even though its callers only ever passed NarrowFormat and its name said it was for narrow usage. I managed thereby to mislead myself as to what it would do for other format types. Instead, drop this parameter, pass NarrowFormat to an internal helper of the implementation where the argument was previously passed, and save the two callers and the stub implementation from carrying a misleading distraction. Amends commit d13e9a1ae53ee53c4929bc88d578a02eec4b2dc4 Change-Id: I819a87a1b04f6509adffc66bd2c81150667b208a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUnicodeTools: port initScripts() to QStringIteratorMarc Mutz2025-10-281-10/+4
| | | | | | | | | | | | After fixing the roundabout way of updating 'eor' in a previous commit, this is now trivial (no nested loop). Amends c20422af13fb30751eaa58e8755c7a9a7fd20a50. Pick-to: 6.10 6.8 6.5 Change-Id: Idbbfc503f4bf3878d1fc57729224c99973bddc32 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QUnicodeTools: don't look up surrogate line-break propertiesMarc Mutz2025-10-281-6/+12
| | | | | | | | | | | | | | We know they're SG, so don't go through the properties trie, hard-code the result. As a defense against changes, add checks to the generator and tst_QUnicodeTools. This is in preparation of porting getLineBreaks() to QStringIterator. Pick-to: 6.10 6.8 6.5 Change-Id: Ib3567398ba56f7ad3ce6fbca81f6b0f40379ee7d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QUnicodeTools: port some functions to QStringIteratorMarc Mutz2025-10-281-22/+9
| | | | | | | | | | | | | | | | (those which don't have nested loops due to the need for look-ahead). Use QStringIterator's new nextOrRawCodeUnit() to replace a Clang-21-Wcharacter-conversion-prone pattern of parsing a UTF-16 string. Amends cbfdec66033d14020d3e8a49bacc0d12d2b6798e (getGraphemeBreaks(); though that commit merely moved the code there from Harfbuzz) and 824180a12249e48c0e3280fec64940825ce0aa6e (getWhiteSpaces()). Pick-to: 6.10 6.8 6.5 Change-Id: I26b64fca6a26bb7ea4ab8ad14ba590213e949190 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* a11y: Report QAbstractSlider orientationMichael Weghorn2025-10-282-0/+20
| | | | | | | | | | | | | | | | Support QAccessible::Attribute::Orientation newly introduced in a previous commit in QAccessibleAbstractSlider, the accessible implementation for QAbstractSlider. This e.g. makes the orientation available for QScrollBar. Extend an existing QScrollbar accessibility test accordingly. Fixes: QTBUG-140769 Change-Id: I8ac32116ed175b3b6760e5d1577e78180849e0e7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
* a11y: Introduce accessible attribute for orientationMichael Weghorn2025-10-283-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce QAccessible::Attribute::Orientation to allow reporting an explicit orientation for an object. Drop the comments about horizontal and vertical for QAccessible::State. This no longer needs any consideration on whether or not to introduce such states, as it is implemented as an attribute now (that can indicate either horizontal or vertical orientation, instead of having two separate states). Allowing to explicitly set an orientation is for example helpful for scroll bars, so assistive technology users know what orientation those have, and what keyboard shortcuts apply (e.g. up/down keys to change the scrollbar position for a vertical scroll bar, left/right keys to change the position of a horizontal one). Corresponding states/attributes/properties exist in multiple platform a11y APIs: * Linux/AT-SPI2: states ATSPI_STATE_HORIZONTAL [1] and ATSPI_STATE_VERTICAL [2] * Windows/UIA: UIA_OrientationPropertyId [3] * macOS: NSAccessibilityOrientation [4] * web/ARIA: "aria-orientation" property [5] Initially, handle the new attribute in the AT-SPI2 adapter for Linux. Handling for more platform a11y bridges and using the new states to report the QAbstractSlider orientation will be implemented in separate upcoming commits. [1] https://gnome.pages.gitlab.gnome.org/at-spi2-core/libatspi/enum.StateType.html#horizontal [2] https://gnome.pages.gitlab.gnome.org/at-spi2-core/libatspi/enum.StateType.html#vertical [3] https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids [4] https://developer.apple.com/documentation/appkit/nsaccessibilityorientation [5] https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-orientation [ChangeLog][QtGui][QAccessible::Attribute] Added new Orientation enum value that can be used to specify the orientation of an accessible object. Task-number: QTBUG-140769 Change-Id: I87ac29447622189561fa7f25947cfd7f6b028056 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
* QSaveFile: add std::filesystem::path supportThiago Macieira2025-10-282-0/+34
| | | | | | | Fixes: QTBUG-141433 Change-Id: I8fbc9a78026237e0e823fffd1760cff3adf0bd40 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QTest: include <chrono> instead of relying on transitive includesAhmad Samir2025-10-281-0/+1
| | | | | | | | Found in code review. Pick-to: 6.10 6.8 6.5 Change-Id: I111907d6b365ea642c44dff6caed65192124dff9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFile: move the std::filesystem supporting content to qfiledevice.hThiago Macieira2025-10-282-28/+33
| | | | | | | | So this can be used for QSaveFile. Change-Id: I9a5e12778acffe3382e1fffdad99da8ba440ad76 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Windows11Style: don't crop checkbox with no textChristian Ehrlicher2025-10-281-9/+29
| | | | | | | | | | | | | The size calculation for a checkbox with no additional text/icon did not match the drawing code. There are still some values to settle but the logic is now correct even the spacing might change in the future to match the WinUI3 style spacings. Pick-to: 6.10 Fixes: QTBUG-135628 Change-Id: I37e44fe8ad4f377ad346e55aac9854f4da6fc222 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* Windows11Style: use 'More' icon for QToolBar extension buttonChristian Ehrlicher2025-10-284-1/+62
| | | | | | | | | | Use the windows font 'More' icon instead the Qt default png icon. This will make the icon work in dark monde with the windows11 style. Pick-to: 6.10 Task-number: QTBUG-140688 Change-Id: I1d8e1d820b08e8fa7a28f0445f049a571fb36520 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* QIOOperation: use std::get_if everywhereMårten Nordheim2025-10-281-6/+6
| | | | | | | std::get has code that uses exceptions. Change-Id: I9c2a46779bcf00ec9574432e7ca0383ce9288046 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Titlecase HTTP/1 headersMårten Nordheim2025-10-271-1/+14
| | | | | | | | | | | | | | | | | | | | Following the addition of QHttpHeaders and the relevant patches to port existing code to use it, we decided it was OK to start sending all header names as lower-case. This had the unfortunate side-effect that certain HTTP/1 servers did Case-Sensitive comparisons on the header name, causing them to stop functioning with Qt. To restore compatibility with these, we title-case them at the boundary to HTTP/1. Simply upper-case the first letter and the letter immediately following a dash. Ignores specific casing of raw headers, e.g. MyHeader turns into Myheader, and a lower-case header would still be titlecased. Fixes: QTBUG-137203 Pick-to: 6.10 6.8 Change-Id: Ic7ccf95eb7aa5cba355fc5933b7b9c86600821bb Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QUnicodeTables: separate Properties::cases from the restMarc Mutz2025-10-272-3375/+3827
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These entries are quite repetitive, esp. the all-zero entry for uncased characters (but not only: there are also 137 non-zero duplicates), and each one takes 8 bytes of the total 20 bytes of sizeof(Properties). Make a new array with these entries and only store an index into it in Properties. The new array happens to have a size of 448 entries (down from 3372 unique Properties), so 9 bits would suffice for the index, but a sizeof(Properties) == 14 is probably rather pointless, so add a reserved field to prop the struct up to 16. That sounds like the ideal size for rapid indexing and probably improves qGetProp() performance, esp. if case information is not needed. Theoretically, this should save 3372 * 4 - 448 * 8 = 9904 bytes. The TEXT size of libQtCore, however shrinks by a bit more, 10596 bytes, on optimized Linux AMD64 Clang 19 builds. Picking to all active branches, because the Unicode tables are still maintained in all of them. Fixes: QTBUG-139427 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: If4dc47ef06c674ad0263f0623ec408a25b977b3a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QLockFile: add some missing std::move()sMarc Mutz2025-10-281-2/+2
| | | | | | | | | | | | | | | Coverity complained that two QByteArrays were copied into the LockFileInfo struct when a move was possible. It's correct. Add the moves. Amends 772863355a0cf57a49e93608790dfd17c8fd82da. Pick-to: 6.10 6.8 6.5 Coverity-Id: 896868 Coverity-Id: 896870 Change-Id: I146a588e4b2ef5bb6053274479ad96bcbdf75c11 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QUnicodeTools: fix weird variable assignment in initScripts() loopMarc Mutz2025-10-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code updated the `eor` variable in the third field of the for loop, after the increment of the loop variable, `i`, to the then-value of `i`. The variable was initialized as zero. This is a very roundabout way of doing things, because, if you look at it from the right angle, `eor` will always have the value 'i' has when entering the loop body. Proof: - First round: i = 0, eor = 0. So i == eor. Check. - Next round: i = 1 + whatever value `i` had at the end of the previous iteration. eor := i, so i == eor. Check. So rewrite the code to create `eor` at the beginning of the loop body, with the then-value of 'i'. This allows marking it const, too, and scoping it correctly, drastically improving readability. The tighter scoping runs afoul of the assert(eor == string.size()) after the loop, which, however, is pointless, because it's true by construction: the loop has no break statement, so the only way it can be exited is by failing the loop condition. At that point, eor := i and i == string.size(), so eor == string.size(). Partially reverts 3df159ba174c1775a0e77d2305a639eeab1ea71d, but the loose scope of the variable was present even before that. Pick-to: 6.10 6.8 6.5 Change-Id: I983aef94caa8a3bc09ab378b8bb9bb4a18dabeb4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QUnicodeTools: improve variable allocation in getSentenceBreaks()Marc Mutz2025-10-271-4/+4
| | | | | | | | | | | | | | | Make 'pos' and 'prop' const, indicating that they're not modified by the lengthy loop body, and don't re-use 'ucs4' and 'prop' from the outer loop, make the inner loop have their own versions. This shadows the outer loop ones, but -Wshadow is not in effect in implementation files. I found it more important to avoid churn than to rename the variables to avoid the shadowing. Shadowing is well-defined in C++. These are in preparation of porting the function to QStringIterator. Pick-to: 6.10 6.8 6.5 Change-Id: Ia8b136c2cf4c8bc70d7444456adae93aecf6138b Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QUnicodeTools: improve variable allocation in getWordBreaks()Marc Mutz2025-10-271-4/+4
| | | | | | | | | | | | | | | Make 'pos' and 'prop' const, indicating that they're not modified by the lengthy loop body, and don't re-use 'ucs4' and 'prop' from the outer loop, make the inner loop have their own versions. This shadows the outer loop ones, but -Wshadow is not in effect in implementation files. I found it more important to avoid churn than to rename the variables to avoid the shadowing. Shadowing is well-defined in C++. These are in preparation of porting the function to QStringIterator. Pick-to: 6.10 6.8 6.5 Change-Id: I2b0c135276ccef403802dba8b780dcbf8c0ed519 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QStringIterator: add nextOrRawCodeUnit()Marc Mutz2025-10-271-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While fixing Clang 21 -Wcharacter-conversion warnings, I came across many code snippets that used a pattern like char32_t ucs4 = string[i]; if (QChar::isHighSurrogate(ucs4) && i + 1 != len) { ushort low = string[i + 1]; if (QChar::isLowSurrogate(low)) { ucs4 = QChar::surrogateToUcs4(ucs4, low); ++i; } } (this one from qunicodetools.cpp) The natural question is why this was never ported to QStringIterator, and the answer is: because QStringIterator doesn't support this. Add new functions nextOrRawCodeUnit() (and previousOrRawCodeUnit()), to fix this shortcoming. The name of the functions is chosen so that it will work also in a future UTF-8 string iterator. Add tests that verify that the old code and the new functions produce the same series of code points. Pick-to: 6.10 6.8 6.5 Change-Id: I34ba8e416ee290badc1c16e33b46a17d56741574 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QBasicAtomicInteger: Add (internal) refRelaxedFabian Kosmale2025-10-274-1/+16
| | | | | | | | | | | | | | | | | | | | It is known that incrementing the refcount can use relaxed semantics, compare https://web.archive.org/web/20251016043603/https://devblogs.microsoft.com/oldnewthing/20251015-00/?p=111686 However, we can't modify QBasicAtomic::ref, because that is documented to use "ordered" semantics. So introduce a new (internal) refRelaxed method, which simply calls fetchAndAddRelaxed(1) instead. Compared to ref, we also do not return anything, as no expected user has a need for the return value (and it only causes more work for the compiler to get rid of it again). Our deref operation is still using acquire_release semantics, so everything is fine. Port QArrayData to use it as a first user so that the functionality is tested. Change-Id: I678870551fe85b83d9bb073ddb5947e649845264 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QUnicodeTools: prefer lineBreakClass() convenience functionMarc Mutz2025-10-271-4/+2
| | | | | | | | | | | | | | | | ... where applicable Simplifies the code. In some cases, the code queries more than one property of the character, in which case we keep using qGetProp(). Amends 85899ff181984a1310cd1ad10cdb0824f1ca5118 and 1f73d4b87c153224b4eeee164269d0b313a11a8b. Pick-to: 6.10 6.8 6.5 Change-Id: I27cc0e5607b1e730f649c9d73f05f6b1227bdd17 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QByteArray: de-duplicate code by using QtMiscUtils::fromHex()Ahmad Samir2025-10-271-17/+7
| | | | | | | | | Pointed out by Thiago in code review. Drive by, tighten the scope of the local variables. Change-Id: Id12af76daac382495cb6abad6a6ecf35cdd1cbc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>