Commit Graph

75309 Commits

Author SHA1 Message Date
Tor Arne Vestbø 53f9feae1b Make doc-snippets a "build part", ie -nomake/make doc-snippets
For now the private feature 'doc_snippets' is left as is, and acts
as the default for the build-part.

Change-Id: I37476f5f7aabe741cc5eb87c801ec47578d6b488
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-07-30 16:01:51 +02:00
Tor Arne Vestbø f0667601ac Skip doc snippets that depend on QProcess when feature is unavailable
Change-Id: I382025b9e2276acde914f8c5844e25c73978bd55
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-07-30 16:01:50 +02:00
Oleksii Zbykovskyi bd0fa8b0d3 Remove documentation of non-existing QWeakPointer members
For historical reasons, qdoc sees a different declaration of
QWeakPointer than the compiler, and when we removed deprecated members
from the latter in e40320c552 for Qt 6.0,
we evidently forgot the former.

Remove those now from the declaration that qdoc sees as well, so that
we don't claim that they exist as deprecated members.

Pick-to: 6.5 6.8 6.9 6.10
Change-Id: I1167a9317df727054c0b0bc447083d64b59087bc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-30 09:30:35 +02:00
Tim Blechmann d7097efcb8 CMake: add missing headers to project files
Making the code a little more IDE friendly by populating IDE projects.

Pick-to: 6.8 6.9 6.10
Change-Id: I7071e1072d5dec710d633078f567c282c75f212b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-30 09:45:38 +08:00
Tim Blechmann 0fce9b718d Snippets: fix unity builds
Snippets contain duplicate functions / structs, so they break unity
builds. Disabling unity builds fixes compilation again.

Change-Id: I4d9e70dbc8107204c244167ce4396a29be2f08c3
Reviewed-by: Oleksii Zbykovskyi <Oleksii.Zbykovskyi@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-30 09:45:22 +08:00
Ahmad Samir 58b4be482c QMetaMethod: change parameterTypes() to return a list of QBAV
These are views on the `signature` QByteArray data member, so should be
safe to use.

Pick-to: 6.10
Change-Id: I92f490585944f367cb776881094ce98c64e1a20d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-30 02:14:08 +03:00
Ahmad Samir 872b855670 QMetaObjectPrivate: de-duplicate method signature parsing code
Pick-to: 6.10
Change-Id: I3a6b98c3f6d3f56e54ef9184945c27ccf0f23bed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-30 02:14:08 +03:00
Volker Hilsheimer a6f30f34ec QPA: Construct GeometryChangeEvent with old native geometry
Amends 2fea6bbe8e, which moved the
construction of the event object after the QPlatformWindow::geometry had
been updated already. Since the constructor takes that stored geometry
to compute the requested geometry, this resulted in a behavior change.

Fix this by adding a constructor parameter that takes the requested
geometry, and move the High-DPI mapping consistently to the call-site.

As a drive-by, replace const QRect & parameters with QRect values, as
QRect is small and trivially copyable/movable.

Task-number: QTBUG-136045
Pick-to: 6.10 6.9 6.8
Change-Id: Ie44060d299dac9b63b8b6ba8c1e07f3e422dbe03
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Viktor Arvidsson <viktor.arvidss@gmail.com>
2025-07-30 01:12:29 +02:00
Nicolas Fella e53cbad741 Update SSL trust store locations for modern Red Hat
Red Hat family distros haven't used /usr/share/ssl since 2004:
https://bugzilla.redhat.com/show_bug.cgi?id=143392

/etc/ssl/certs has never been a canonical location on Red Hat
family distros, and as of
https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile is
being removed. The same change also removes
/etc/pki/tls/certs/ca-bundle.crt . This updates both magic lists
with the modern canonical locations for Red Hat and derived
distros. The tls-ca-bundle.pem bundle has been around in Fedora
since around 2013:
d538ada99c
The directory-hash dir has been around since around 2021:
1c8b67fb5a

Original patch from Adam Williamson <awilliam@redhat.com>

Pick-to: 6.10 6.9
Change-Id: I6b6060f66ae1bfd4b50db6852ecc490bf54cbb58
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-30 00:06:23 +02:00
Marc Mutz a7bd2ab43c moc: pass Symbols by reference, not pointer
The very first line converts the pointer into a reference, so just pass that.

Amends 0c9d1f99da.

Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I3e8c863996fb6f2d35533f216336459ae547ba57
Reviewed-by: Aurélien Brooke <aurelien@bahiasoft.fr>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-07-29 22:54:21 +02:00
Błażej Szczygieł f86bf8b37f wayland: improve copying of shm buffer with alpha channel and scaling
Painting to image with alpha channel and DPR > 1.0 enters slow path in
"QRasterPaintEngine::drawImage()".

Better performance is achieved when painter's matrix is scaled together
with clipping region instead of scaling the target draw image size.

Fixes: QTBUG-135954
Pick-to: 6.10
Change-Id: Ic3b71f8667b5b99739477541ffdb0397a9855a67
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2025-07-29 22:11:15 +02:00
Tor Arne Vestbø 57ada89c04 Define macOS QOperatingSystemVersion constants using only major version
Otherwise comparisons of current > QOperatingSystemVersion::MacOSSonoma
will trigger for 14.1 and above, instead of 15 and up. The expectation
is that the constant represents the major version.

[ChangeLog][macOS] QOperatingSystemVersion constants for macOS 11
and up are now represented with their major version only, and minor
and patch versions unspecified, as documented.

Task-number: QTBUG-107907
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I62dbac54f6b37b5797459c30c326706341b403a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-29 21:23:39 +02:00
Kai Köhne 4e246d74fe Doc: qt_add_resources() make target-based variant more prominent
The target-based variant is more in line with modern CMake, and also what
we are promoting in our examples. So let's list it first, and the (old)
variable variant second.

Pick-to: 6.9 6.10
Change-Id: Idd92e2bc317ff559f1640a989d5fe884501a2ce9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-29 20:06:36 +02:00
Xavier BESSON 71c0d8d472 Add previewColumnVisible property in QColumnView
Make it possible to have a QColumnView without a preview widget.

Fixes: QTBUG-1826
Change-Id: Id169540224150a2fe804f61f90ee9bf2aabeb9ff
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-07-29 17:36:34 +02:00
Lars Schmertmann e1125c4965 Add missing changed signal to QML Window.flags
[ChangeLog][QtGui] Added signal flagsChanged to QWindow.

Task-number: QTBUG-137933
Pick-to: 6.10
Change-Id: Idd0f272e2f44cbd773a7110fa1c90abea09e8665
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Schmertmann <SmallLars@t-online.de>
2025-07-29 14:45:52 +00:00
Volker Hilsheimer 3ad667b549 QRM: override setHeaderData
We are overriding all virtual function so that we can provide a
specialized implementations later, without getting into trouble later
due to then-existing subclasses potentially not calling our parent class
implementation.

Amends a92c78784f, where setHeaderData was
forgotten.

Pick-to: 6.10
Change-Id: I63392e5c630aa4cf273d8783cfd6fd97e0d57492
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-07-29 16:45:52 +02:00
Alexey Edelev a55acf13b9 Make the confusing variable name in qt_add_resources docs lowercase
Pick-to: 6.8 6.9 6.10
Change-Id: Ic3cc4261481a1e8218837046f0da91364470b14b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-29 16:45:52 +02:00
Oliver Eftevaag ca004ffd0c Get accent color from GetSysColor for high contrast without winrt
When Qt for Windows isn't using cpp_winrt, the accent color would
be retreived from the Windows registry. This color would be different
from what native WinUI controls would use, which instead is the
COLOR_HIGHLIGHT value from GetSysColor.

Fix this by using GetSysColor, when a contrast theme is enabled, instead
of the value read from the Windows registry.

Pick-to: 6.10
Done-with: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Change-Id: If7025d4f52223abd6160feeb065df6b68b8fb2b5
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
2025-07-29 16:45:52 +02:00
Volker Hilsheimer 26c24bae77 QAIM: add internally used role values to Qt::ItemDataRole enum
Some Qt models use role values below Qt::UserRole for special purposes.
To avoid that we keep reusing the same value for different models and
potentially cause conflicts across modules (which might already be a
problem when Qt RemoteObject's QAIM wrapper is used on a
QStandardItemModel or QFileSystemModel, as both use
Qt::UserRole - 1), add those values to the Qt::ItemDataRole enum, but
omit them from the documentation.

Not included in this change are the Qt::UserRole + 1/2/3 values we use
in QFileSystemModel for FilePath/Name/Permissions roles. We won't use
role values above Qt::UserRole in Qt in the future.

Use these enum values then internally where we currently hardcode the
values. Pick this back to 6.10 to avoid conflicts. This is not an API
addition.

Amends, at least, 6e8563fb2d.

Pick-to: 6.10
Change-Id: I6cd93c32b5c6709355b6f048f9d6d574421d6fbb
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-07-29 16:45:52 +02:00
Kai Köhne 16d9ed713a Doc: Add target for section in Qt for Android Manifest documentation
Allows pages in qtdoc to link to the section with a stable anchor.

Pick-to: 6.5 6.8 6.9 6.10
Task-number: QTBUG-138527
Change-Id: I086f76be542b3667e72c6bc231e581f123b08368
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-07-29 15:20:01 +02:00
Oleksii Zbykovskyi 4daf775823 Make last files in code folder compilable
Fixed small issues in each of the files and added to the build system.

Task-number: QTBUG-137566
Change-Id: Iabe88b38c43f2db527027a0518840f16091898ad
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-29 15:20:01 +02:00
Oleksii Zbykovskyi c7a7783668 Fix of files under tools prefix
Made each file compilable and added them to the build system.

Task-number: QTBUG-137566
Change-Id: I51aac946a1bfd8922c6a3669483d4e6f591795b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-29 15:20:01 +02:00
Oleksii Zbykovskyi c1889bd953 Make files under thread and time prefix compilable
Make these file compilable and add to the build system.

Task-number: QTBUG-137566
Change-Id: I3edf8204428a1e619fe5049e5d46ae51c6900002
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-29 15:20:01 +02:00
Alexey Edelev b1f2279a18 Warn qt6_add_resource(<target> ...) is called prior the target creation
qt6_add_resource function has two signatures that have completely
different processing. Since there is no explicit indication of what
signature should be used, qt6_add_resource checks if the first argument
is an exising target or not. This is not safe, since users may easily
mess the call order, so the target is not created when calling the
respective qt6_add_resource(<target> ...) function, and this leads to
unclear error. Since the arguments of two signatures differ
significantly, we may predict this situation and warn user, by checking
the use of the 'qt6_add_resource(<target> ...)' signature arguments in
the second 'qt6_add_resource(<outputfile> ...)' variant.

Pick-to: 6.10 6.9 6.8
Change-Id: I11df9ae56186cd56d9aac481a14b272f76716937
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-07-29 15:06:05 +02:00
Jan Moeller a4cc955cb9 a11y Android: Forward new QAccessibleAnnouncementEvent on Android
Android support was missing and the QAccessibleAnnouncementEvent had
no effect, this implements its support on Android.

Task-number: QTBUG-75003
Task-number: QTBUG-135413
Pick-to: 6.8 6.9 6.10
Change-Id: Ic51920f7181c84ee54c729cb50b9b1418e208afd
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-29 15:06:05 +02:00
David Redondo 8f344036d5 Make mapFromSource and mapToSource invokable
So it matches QAbstractProxyModel

[ChangeLog][Qt Core][QConcatenateTablesProxyModel] mapTo/FromSource are
now marked as invokable and can be called from QML.

Change-Id: I235c5de1b823a21127f041774f1f8298a88df425
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-07-29 13:06:05 +00:00
Jie Liu a249efc8fd wayland: flatten if condition to improve code clarity
Change-Id: I8294721045d26b950d3ab3e0fc4a7c71fb8976ed
Reviewed-by: David Redondo <qt@david-redondo.de>
2025-07-29 13:06:04 +00:00
David Edmundson ac914b0a18 wayland: Explicitly commit buffer in fallback expose handling
Amends 68562d9b2e. Right now the code
appears to work as all configure events cause a wl_surface.commit,
but we should use the same path as typical rendering in order to also
submit a frame callback and handle future updates.

The backing store test is changed to behave more like a real client.

Pick-to: 6.10
Change-Id: I72d167072620c2684a130ca69a548088392e0bfd
Reviewed-by: David Redondo <qt@david-redondo.de>
2025-07-29 13:06:04 +00:00
Oliver Wolff 9083b6586d windeployqt: Cache PEHeader information
Do not read PE header information on every access but store the data
once it's gathered.

Change-Id: I883842d764638347fb73ddd17d5dfec61b99aa2e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-07-29 13:49:30 +02:00
Oliver Wolff cceae37a13 windeployqt: add PeHeaderInfo helper class
Clean up utils files and have code covering that area in a dedicated
helper class.

Preparation for upcoming caching of this data.

Change-Id: I698321d65c8e07ed7166af01bddb3e678c36f2ad
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-07-29 13:49:29 +02:00
Oliver Wolff 0af0c8c42e windeployqt: Clean up findDependentQtLibraries & readPeExecutable
Separate collecting of generic information from PE header files from
dependency tracking. Cramming everything into one function hurts
readability and maintainability.

Change-Id: I6e56735969ed99b0361dcfce0a4d8d03ea761e72
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-07-29 13:49:29 +02:00
Oliver Wolff d5f6c4c377 windeployqt: findDependentQtLibraries: Remove unused parameters
Change-Id: Ie73d9b8a5b4af7a1846164d19ff8ac42799c5cff
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-07-29 13:49:29 +02:00
Oliver Wolff 4066491d57 windeployqt: readPeExecutable: Remove unused "isMinGW" parameter
Change-Id: Ibee0168f029889bfc0e427dc5e8f89e7e8799918
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-07-29 13:49:29 +02:00
Frédéric Lefebvre b24a9b96c9 Fix flaky tst_QStatusBar::QTBUG4334_hiddenOnMaximizedWindow on Ubuntu
Fix flaky tst_QStatusBar::QTBUG4334_hiddenOnMazimizedWindow on Ubuntu
by replacing a single check with QTRY_VERIFY to allow multiple
verification attempts.

Unblacklist the test on Ubuntu 24 xcb as it is no longer flaky.

Fixes: QTBUG-129027
Pick-to: 6.10 6.9 6.8
Change-Id: I7399b86957271055fb9e6e471968e5e3ac04a518
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-07-29 11:49:29 +00:00
Vlad Zahorodnii e2b88612e5 XCB: Remove extra xcb_randr_select_input() calls
This fixes high CPU usage in kwin.

If there is a ConfigureNotify event for the root window, QtXCB will
call xcb_randr_select_input(). The problem is that the X server may send
an output change event in response to xcb_randr_select_input().

When kwin sees that output change event, it will process the event and
it can update its override redirect windows, which can produce a few
ConfigureNotify events for the root window and make kwin get stuck in an
update loop.

Since the QXcbConnection constructor already subscribes to the RandR
events, these xcb_randr_select_input() function calls can be removed.
Also, `true` is not a valid argument for xcb_randr_select_input(). It
expects a mask of events to listen. For what it's worth, `true`
corresponds to XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE = 1, which
xrandrSelectEvents() already subscribes to.

Pick-to: 6.10 6.9 6.8
Change-Id: I950a0a6e2e34822ac3da8cd69b96670e4bf4b07d
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-07-29 10:38:08 +00:00
Lars Schmertmann c0391330aa Darwin: Add missing micro version to QSysInfo
productVersion() and prettyProductName() are currently missing
the micro version Apple uses for bug fixes or patch releases.

For productVersion we always include the micro version, but for
prettyProductName we only include it if it's non-0, just like the
"about macOS" dialog.

Fixes: QTBUG-131513
Pick-to: 6.10 6.9 6.8
Change-Id: Ic8beabe5cd783d49612a1a6ea2a563aec76c3fe2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-29 10:38:08 +00:00
Kai Köhne 86436ef97d Doc: Improve documentation of qDebug and friends
Document the QDebug stream operator variants separately,
as part of QDebug (where they belong).

Reorder the remaining documentation for better readability:
Talk about the arguments and show an example first. Mention
common placeholders like %s and %i for easier access. Give
the details about the exact sink behavior later. Do not mention
the default message logger behavior, as that is better
documented centreally.

Also, call the first argument of the printf() style debug
format, to make it more obvious that it can contain placeholders
and format options.

Pick-to: 6.9 6.10
Change-Id: I370f490a524123c635d6c84feda385dad5174dcc
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-07-29 08:22:39 +02:00
Kai Köhne 834b620f5a Doc: Mark QMetaAssociation methods as internal
QMetaAssociation class is (intentionally) undocumented.

This fixes warnings

     qt5/qtbase/src/corelib/kernel/qmetacontainer.cpp:833: (qdoc) warning: No output generated for function 'QMetaAssociation::keyMetaType()' because 'QMetaAssociation' is undocumented
     qt5/qtbase/src/corelib/kernel/qmetacontainer.cpp:843: (qdoc) warning: No output generated for function 'QMetaAssociation::mappedMetaType()' because 'QMetaAssociation' is undocumented

Change-Id: I76a5a63fc703e9cac1021c3bbb2b78ef1f66395a
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-07-29 08:22:31 +02:00
Kai Köhne ee32e4bb00 Doc: Remove link to deprecated macro Q_GLOBAL_STATIC_WITH_ARGS()
The macro got deprecated already in Qt 6.3.

Pick-to: 6.5 6.8 6.9 6.10
Change-Id: I17b4ade0abd7b487726ce17abacface137105023
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2025-07-29 08:22:21 +02:00
Kai Köhne ca8674ef2c Doc: Remove link to deprecated method QPixmapCache::replace()
The method got deprecated in 6.6.

Pick-to: 6.9 6.10
Change-Id: I0912086f5954b1608bde7c4d14ff0f27e2aa4428
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2025-07-29 08:22:18 +02:00
Kai Köhne cf9a1fcc6f Doc: Remove links to deprecated method QMetaType::typeName()
The int based API got deprecated already in Qt 6.0. No point
of linking to this method from the non-deprecated API.

Pick-to: 6.5 6.8 6.9 6.10
Change-Id: I1c710e144c6dd9f454f60fad8340a00a3ae801be
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-29 08:22:16 +02:00
Kai Köhne 5e5f19e889 Doc: Remove links to deprecated method QDateTime::setOffsetOfUtc()
The method got deprecated in Qt 6.9. Remove the last links to it from
the non-deprecated API documentation.

Pick-to: 6.9 6.10
Change-Id: I5ec7e9087f3e33ff532502d60cdbe16f70a64e1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-29 08:22:11 +02:00
Tim Blechmann 8b68a2b45e Platforms: cocoa - ensure namespacing of all symbols
A few symbols have been emitted that are prone to clashing with client
code. We should either namespace them or use hidden visibility

Task-number: QTBUG-138543
Pick-to: 6.10
Change-Id: I66863d5e869ddd161be97a8523e1c0ca0663f56e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-07-29 11:14:59 +08:00
Axel Spoerl b4cbe20d6d QCborStream code snippet: Explicitly construct qfloat16 from float
Direct assignment of a float to a qfloat16 with operator= fails to
compile with "conversion from ‘float’ to non-scalar type ‘qfloat16’
requested".

Explicitly use the float constructor of qfloat16.

Change-Id: I3e55478887bc191125479044120e081edba34b1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-29 02:00:47 +00:00
Alexandru Croitor 31e282de42 CMake: Fix QT_RUN_CMAKE_SCRIPT_PATH not being unset
Because add_RunCMake_test is a macro, QT_RUN_CMAKE_SCRIPT_PATH is only
set once, which means only one test gets tested multiple times,
instead of different tests.

Make sure to unset it after each test run.

Amends 0d2775af92

Pick-to: 6.8 6.9 6.10
Change-Id: I5a5568607f04e9f9196c347730b0dc1c323b9eba
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2025-07-29 01:19:37 +02:00
Christian Ehrlicher c925407c3a SQLite: Update SQLite to v3.50.3
[ChangeLog][Third-Party Code] Updated SQLite to v3.50.3

Pick-to: 5.15 6.5 6.8 6.9 6.10
Change-Id: I9cb935bbc598b9d046130e11ff43ea3d5996dd66
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2025-07-29 00:35:09 +02:00
Volker Hilsheimer 410bb2d5fc QRM: update documentation of data/setData for gadgets and QObjects
Pick-to: 6.10
Change-Id: Idbefa64049575dda7b31359584098d7512b5d226
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2025-07-28 21:31:15 +02:00
Marc Mutz 6ccd5ed346 tst_QLocale: add a test for Greek final sigma rule
In Greek script, there are two versions of lower-case sigma: ς (GREEK
SMALL LETTER FINAL SIGMA) ("\varsigma") and σ (GREEK SMALL LETTER
SIGMA), but only one upper-case form: Σ (GREEK CAPITAL LETTER
SIGMA). The first one is used at the end of words, the middle one
everywhere else¹. So when going from upper-case to lower-case, the
algorithm needs to take into account whether the character is at the
end of the word or not.

The QLocale platform-specific implementations (ICU, Mac) get this
right, while Windows, and Qt's own implementation, which acs as
fall-back for QLocale::toUpper(), do not.

This acts as a reproducer for QTBUG-2163 and QTBUG-138705.

¹ https://en.wikipedia.org/wiki/Sigma

Task-number: QTBUG-2163
Task-number: QTBUG-138705
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I4aa44ee077de572925304c1cd957a35db19a6b2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-28 19:14:30 +00:00
Marc Mutz c376f2f40e tst_QLocale: replace complicated ifdefery with macro
This stops the shotgun surgery necessary when the condition changes,
by centralizing the condition and assigning a symbolic name to the
feature is represents. The more so as this list has evolved over the
lifetime of the still-active branches: First it was only ICU, then
Windows was added, and then Mac.

Task-number: QTBUG-2163
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I0fa604f9726a9fcf12b90655a5621b4169a7199b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-07-28 19:14:30 +00:00
Marc Mutz f1c3af04a4 QLocale/ICU: static_assert(is_same<UChar,char16_t>) and remove casts
Since ICU 59, ICU's UChar is the same as char16_t in C++ mode¹, so we
don't need the casts if we use QString::DataPointer::data() instead of
QString::data() (that also avoids the detach attempt).

Add a static_assert() to document the assumption.

¹ https://icu.unicode.org/download/59 Release 59.1 on 2017-04-14,
  so should be old enough.
  (didn't find the release date of 59(.0), if there was one)

Don't fix the indentation, since there's an untouched third line in
each call and a follow-up commit will have to reindent this, anyway.

Task-number: QTBUG-138583
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I9f4a83b7b93445a32e3275ae717fb4e8f5c6a397
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2025-07-28 19:14:30 +00:00