Commit Graph

68955 Commits (7f45fdefd64a09d5ecdfd424195ed652117cbcc9)

Author SHA1 Message Date
Edward Welbourne a6b350acbc Pass string to ICU-wrapper as a QByteArray, not a QString
The definition of QtTimeZoneLocale::ucalTimeZoneDisplayName() said it
takes a QByteArray but the header-file's declaration said it takes a
QString. That was never going to end well.

Fixes: QTBUG-129896
Change-Id: I5c15f88370f2d15efe2055ff73388c22fdc4ef46
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 01219276fdd3c1b6c867e97f6b8337f46ac82e28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-14 15:15:26 +00:00
Edward Welbourne ac6f080d16 Remove a duplicate inclusion of qlocale_data_p.h
In tst_qlocale.cpp there was a #include that caused the static data
tables to be duplicated, violating ODR. All it actually needed was the
ability to iterate all rows of the locale_data[] table, so export a
method to do that from QLocaleData and have the test run that instead
of pulling in a second copy of the tables.

Conflict resolution at 6.8 needed the declaration of locale_data_size
moved up qlocale.cpp, which happened after 6.8 as part of other work
that isn't included in 6.8.

Pick-to: 6.5 6.2
Task-number: QTBUG-128930
Change-Id: Ie5ebdf508a622eeca93f8785bc09b086502aa0e2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 96c07655c46afdd3e2da7ef7d339b518d36c83c5)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-10-14 17:15:03 +02:00
Zhao Yuhang 2e18882763 QOperatingSystemVersion: Add Win11 24H2
Windows 11 24H2 has been publicly released already, which can be
downloaded directly from Microsoft's official website [1].

[1] https://www.microsoft.com/en-us/software-download/windows11

Change-Id: I0394e8413c07ec902cadd43bd2fac8a3d4c42c7b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c846db292de94dda9dc58bf5e7697c75a0b0769f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-12 13:44:09 +00:00
Volker Krause 768c49a7e9 Android: Send locale/language change events on system locale changes
This enables applications to retranslate or otherwise update their UI
when the Android system locale/language settings are changed during
their runtime.

Change-Id: Id482ca146080d9f3e74990f64e686f6b3504887c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 83483b8b200ab5cedf659f418c7296719902ddc4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-12 06:24:20 +00:00
Eirik Aavitsland a012e558d5 QPainter: Fix regression in drawText with empty rect and DontClip flag
A recent bugfix introduced a shortcut in text layouting, skipping all
layout when the cliprect parameter is empty, since all will be clipped
away anyway. However, the case when the DontClip flag is set was
overlooked. This commit rectifies that.

This commit modifies c7df8dda8b60b4e4e7b1859f462d65cef5d8c85b

Fixes: QTBUG-129914
Change-Id: Ief44acdd08e5e5f5491241362aacfcd2083f011d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit b587e7143d7f1eeb6686b52727fbb9d7db6a820c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-12 06:24:17 +00:00
Thiago Macieira 7d858ad28c Benchlib: remove unused init() virtual function
Commit 051f68c2d3 (Qt 5.2) made it empty
by moving the content to QBenchmarkPerfEventsMeasurer::start().

Change-Id: I65f48d72a9d079f0aee5fffd6abeae9cf7fcdcf5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d44b3ad1c8f1e6615e47c4d62b236c57f051b709)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-12 06:24:08 +00:00
Thiago Macieira 8101f3366a QBenchmarkPerfEventsMeasurer: move the perf_event_attr data to the stack
There's no need for it to be a global variable. It needed to be global
because we configured the event globally before start(), but in commit
4731baf6d3 (6.5.0) we instead introduced
the Q_GLOBAL_STATIC with a QList containing the globally-configured
events.

This is using designated initializers despite their being a C++20
feature, because GCC and Clang have supported them as an extension to C+
+ for a long time. This file has needed that extension since that commit
anyway.

Change-Id: I1c9080d23df9f7ba3cbafffd7eae7bd57cd69b67
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 31b4150dc3a789ffaf3f660151971127ac86510d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-12 06:24:07 +00:00
Christian Ehrlicher 26cf464e48 Windows QPA: add icon for zoom-original
zoom-original can be mapped to "Zoom" (0xe71e) icon as can be seen here: https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font

Pick-to: 6.7 6.5
Change-Id: Ia13776d2f6007dada51bb06d2a5472cc9cdbb370
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit ab6f11600974c803d807f2550d6dd7723749f75f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-12 06:23:56 +00:00
Thiago Macieira a0b46eaf3a QtTest: add missing newline to -throwonfail/skip lines
Amends fde57300ab.

Change-Id: Ib63838f3ccbd614164cbfffd0c3029e25331cc13
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f566b09ed7b71f47c477f8dfd306e568dac1936f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-12 06:23:53 +00:00
Marc Mutz 9c9a1b37b4 QSharedMemoryPrivate: fix -Wshadow in create()
Rename the function argument from size (which is also a data member of
the class) to sz, a common abbreviation in Qt.

The code predates the start of the public history, but
eaa7528baa made create() an inline
function. Hopefully -Wshadow doesn't apply to mere argument
declarations, so not picking further than said commit.

Pick-to: 6.7
Task-number: QTBUG-126219
Change-Id: I637d731ba33247b7223b5d796bc170c0b87edcad
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
(cherry picked from commit 724a3cab887e4dcc455389e929ac2b97ebedb94a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-11 15:21:21 +00:00
Marc Mutz 729a30a9df De-inline dtors of QAbstractEventDispatcherPrivate subclasses
... pinning the vtables to a single TU each, instead of duplicating
them for every user.

Task-number: QTBUG-45582
Change-Id: I3b7bce14567dc8be89795a48f6871eb24fe908aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
(cherry picked from commit 2e2f5093912faf612f0be72289180b167d6326a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-11 15:19:09 +00:00
Marc Mutz 94dab5c628 qxmlstreamparser_p.h: fix -Wshadow in parse()
The name `prefix` is also used for a data member, and the very next
rule actually assigns to it, so using the same name in this huge
switch is actually impairing readability.

Fix by abbreviating the local variable.

This code predates the start of the public history.

Pick-to: 6.7 6.5 6.2 5.15
Task-number: QTBUG-126219
Change-Id: Iece828a9303b5449397ac93e51f540bf890f7d08
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io>
(cherry picked from commit 2fda30053dcf13356d72f9a8116413d26bcb14a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-11 15:18:57 +00:00
Marc Mutz b1d325a9e0 QStringConverter/ICU: optimize NUL-termination of codec name
ICU unfortunately requires converter names to be passed as
NUL-terminated C strings. This means that the names that come in via
QAnyStringView have to be encoding-converted (assuming US-ASCII,
ie. Latin-1), and NUL-terminated.

The old code used the convenient toString().toLatin1() methods for
this. This, however, transforms L1 and U8 inputs twice: first to
UTF-16, then to L1. It also always allocates memory.

To fix, first change the temporary string container to std::string
(which has an SSO buffer into which most common charset names will
fit, avoiding memory allocation) and then skip the conversion to
UTF-16, going directly from the source encoding to L1, treating UTF-8
as L1 (because US-ASCII is a common subset of both).

Unfortunately, our L1-to-U16 converter doesn't allow to select a
replacement character other than '?' for out-of-range input
characters, but valid charset names should not contain question marks,
so here's to hoping that ICU doesn't strip them willy-nilly, causing
False Positive matches. The old code had the same problem.

Amends f6c11ac4f20a16d0b2113014e2dac63b95d946ae.

Conflict resolution for 6.8:
- ported from q20::cmp_less_equal to regular operator<

Fixes: QTBUG-126109
Change-Id: If1dd494cf4ee8e2d304a0648c22dc8806718f104
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 62108a08c12abfc1421c283cf34e75ffeded2c12)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-10-11 15:18:14 +00:00
Eskil Abrahamsen Blomfeldt 7bf79ee390 Windows: Release old references when invalidating DirectWrite db
When the font database is invalidated, we need to release all
references to populated fonts and clear the lists, so that they
can be repopulated from scratch. This was not really measurable
as long as the contents of the database did not change, but it
was a possible source of errors.

Task-number: QTBUG-129849
Change-Id: Ic7ed4abcb13f13332e8edb77e2039f08da9660fd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2ea099b67943634a06bce642e13062f84de7e3be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-11 05:55:22 +00:00
Eskil Abrahamsen Blomfeldt 6dfe5c847e Windows: Fix memory leak in DirectWrite font database
In ec38f0002d, we introduced a guard
for automatically releasing references to DirectWrite types to plug
a small leak. Unfortunately, this change removed a call to Release()
without putting the pointer inside a guard, hence it introduced
another leak. This was noticeable if the font database was invalidated
and repopulated multiple times.

[ChangeLog][Windows] Fixed a memory leak when repopulating the
DirectWrite font database.

Task-number: QTBUG-129849
Change-Id: I59e3132b6836501b7756679ffac82fb65e3027cb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 247cd80abdd5fc0bc6243581e506354a5509518e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-11 05:55:06 +00:00
Eskil Abrahamsen Blomfeldt 5c675fb298 Windows: Use correct default font when desktopSettingsAware is false
The DirectWrite engine had hardcoded a default font instead of checking
the system settings for this.

Usually this will not matter, since the theme will call
QWindowsFontDatabase::systemDefaultFont() to get the default, but when
this code path is disabled by setting
QGuiApplication::desktopSettingsAware to false, the defaultFont()
function is called. With DirectWrite we would always return a Segoe UI
font of size 16 in this case.

The other databases respect the system settings for the default font,
even when desktopSettingsAware is set to false, so this is the expected
behavior. It is also what the GDI font database does, so this change
will appear as a regression for users upgrading.

[ChangeLog][Windows] Fixed a regression where the default font on
Windows would be larger than before if desktopSettingsAware had been set
to false.

Fixes: QTBUG-129832
Change-Id: I959e7a52680678a6ab767b49ee643fade5e7209a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b09fb51e7bb576137f92d4697f9f812f3dcb2b7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-11 05:53:54 +00:00
Lorn Potter 8375adcbe4 wasm: add dragleave event handling
Fixes: QTBUG-129149
Change-Id: I946f43e3a696c801a60a9a209a70ccaf57252a60
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 8a93093271329f1fb867c0627e63f61ed7330860)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-11 01:03:25 +00:00
Marc Mutz a12be9e909 QIcc: remove unneeded internal qHash(QIcc::Tag) overload
Qt has had a qHash() overload for (also scoped) enums since Qt 6.5
(fb4bc5fa26). Since the hashed type is
internal to the qicc.cpp TU, it doesn't matter whether we change the
result of the hash calculation (but this author assumes we don't).

Pick-to: 6.5
Change-Id: I58238cc13113157438be0951c471f654a838b608
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
(cherry picked from commit 4f5b48d4c69527e5f2450694219432e84b2af6df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-10 19:31:48 +00:00
Allan Sandfeld Jensen 1896424554 Fix text drawing onto transparent ARGB32
We can not use the same blend routines for ARGB32 as we use for
ARGB32PM. It needs to blend transparent colors differently.

Pick-to: 6.5
Fixes: QTBUG-91262
Change-Id: I6b75fa8096b92452655dcad94478ae2a74415939
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit bb854606ec8f95787dfd2a4d1b6bcaddbcf4d042)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-10 15:18:36 +00:00
Alexandru Croitor 25686af631 Don't load the lldb bridge from Qt Core script in a Qt Creator session
If a process is being debugged from within Qt Creator, the Qt Core
lldb helper script should not try to load the lldb bridges from each
Qt Creator installation that has been found, because the main
Creator's lldbbridge.py was already loaded, and trying to do it
again would just return early.

In some cases that could even silently break the dumper helpers if a
bridge of an older Creator is loaded, because of the side-effects of
importing lldbbridge.py.

Detect that lldb was launched by Qt Creator via either the
QTC_DEBUGGER_PROCESS or the QT_CREATOR_LLDB_PROCESS variables being
set.

The former is set by Qt Creator 14 and earlier, the latter is newly
introduced in Creator 15.

Add an opt in to force trying to load the bridge if the
QT_FORCE_LOAD_LLDB_SUMMARY_PROVIDER environment variable is set.

Fixes: QTCREATORBUG-31769
Change-Id: Id59ed71f1e59c6c430bc0c72eb30a075db5fa603
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0806aee2bb355e54abcabe87a5fd97504f692ba9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-10 14:59:39 +00:00
Alexandru Croitor 2469cb7a12 Add more debug messages to the lldb QtCore debug_script.py
So that it's easier to troubleshoot why a certain bridge might not be
loaded.

To enable verbose debug messages, set the
QT_LLDB_SUMMARY_PROVIDER_DEBUG environment variable to 1 when
launching Qt Creator or lldb.

The informational message to set the env var is also shown if no
bridge was loaded successfully.

Task-number: QTCREATORBUG-31769
Change-Id: I53e7b26950fdd635e51d0458cb5fb90600b158a2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 8b01ea5261fdb97c949dc4b3d9a4ea902858bd08)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-10 14:59:37 +00:00
Volker Hilsheimer 34a41d83d8 QTranslator: rewrite loadLocale test, include failing cases
Add test coverage for the bug reported in QTBUG-124898 with
QEXPECT_FAIL to document the failure in our truncation logic in
QTranslator.

The attempted fix in 9a11273b745a30cebb5cd648c89eb224e9704492 then
introduced QTBUG-129434, as we ignored the order of languages reported
by the system locale. Add a test case for that, and use a QSystemLocale
subclass inspired by the QLocale unit test to override the system locale
with a specific one that supports multiple languages for this test.

Pick-to: 6.5
Task-number: QTBUG-124898
Task-number: QTBUG-129434
Change-Id: Iaae80d29e267fd3a2d14df0e73db27ba4c58b31a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 1f2ab46745af12e4776695c1b1a2523ac170368e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-10 11:21:41 +00:00
Volker Hilsheimer c9d31c70d8 QLocale: document that uiLanguages() might return multiple languages
Especially for the system locale, the list of UI languages might span
multiple languages, rather than just different variations of the same
language. That was not clear, and not covered by the test cases.

Test case augmentation in a follow up commit.

Pick-to: 6.5
Task-number: QTBUG-124898
Task-number: QTBUG-129434
Change-Id: I39dd7b35778a9ffe0bdce86b2f4c474f275f61b0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 8230c7d7af684aa8640c5566f0b19c3dd48c1ef0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-10 11:21:38 +00:00
Volker Hilsheimer fbdeec7098 QTranslator: add categorized logging
Add categorized logging to QTranslator to trace what QTranslator tries
to load based on the requested locale and the files present in the
search path.

Pick-to: 6.5
Task-number: QTBUG-124898
Task-number: QTBUG-129434
Change-Id: I32425e72623356820fa9b928418f52fac23fafa9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6a785ce90c1c31e1201c608511a6dc625623ccd9)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-10-10 11:21:35 +00:00
Edward Welbourne bcb2cd49e5 Document potential problems with empty timezone names
Make clear that QTimeZone::displayName() may return an empty string
and that Q(Date)?Time::toString() may consequently skip a zone text.

In the process, fix a typo in the QTime::toString() docs and add the
zone-naming formats to the mention of when applying
QLocale::toString() to the Q(Date)?Time may be preferred, moving the
earlier discussion of AM/PM that it joins to sit just after the table.

Pick-to: 6.5
Change-Id: I313b8b1b452078421252a05aa599bc5f91d43105
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5d18017213c110d5a99abeaf53cc4d29a6bfb660)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-10-10 13:21:35 +02:00
Edward Welbourne 450dd785c0 Tidy up QTimeZone documentation
Update to reflect changes in reality now that I can more faithfully
describe what's happening (thanks to lessons learned during L10n of
display names, though that work isn't in 6.8).

Pick-to: 6.5
Change-Id: I248c924af598c8e8d6cd84675ac04e1733927355
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 1dd785d10d69b0705f86e1580c058d8cd017798b)
2024-10-10 11:21:20 +00:00
Matthias Rauter 1212298fb4 Add note about Latin1StringView in UTF-8 source
Pick-to: 6.7
Task-number: QTBUG-77020
Change-Id: I903917a000b21bc7502bf257f759bbfc71f10d45
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit f4076f1058b97f92f65d668a274aa3bbd6d302f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-10 07:38:16 +00:00
Marc Mutz d9a8caca47 QStringConverter: de-pessimize lookup by UTF-16 name
Instead of converting the QStringView into a L1 string (allocating
memory), duplicate the matching code for char and char16_t.

Fixes a ### comment from the time we converted lookup to
QAnyStringView.

Amends b3edce58e5aea76d1d84c868f76171c2b40520a4.

Task-number: QTBUG-126109
Change-Id: I5ae6eb452e68af19b495b3790fe79ee583968d72
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c095f7fbf820ac944c5d3096f48dd18752a218b3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 21:39:46 +00:00
Bartlomiej Moskal b60db83faa Android: Allow to open Keyboard without touch
After changes in f4050cc5ea commit, the
keyboard can be opened only when internal m_currentEditText is set (what
is happening only on touch). Because of that, the keyboard cannot be
opened just by setting focus on an item like it was before.

To allow open the keyboard not only after touch, QtWindow needs to be
informed about each focus change.

Fixes: QTBUG-124360
Change-Id: Ic3ca4451f53df55bfb1f3e300078fd1916e77155
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2971dbfe062de6b0be3ed9f251f9506bd45d5854)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 21:34:58 +00:00
Bartlomiej Moskal 4cbef8822a Android: Ensure that Layout params are applied on editText
Make sure that the Layout parameters are applied to the editText
before opening the Popup (in openContextMenu method).
Without them, it may cause incorrect behavior.

Especially in the case of the error:
  "E BufferLayer: dimension too large 212x9957
   E SurfaceFlinger: createBufferLayer() failed (Invalid argument)
   E SurfaceComposerClinet: SurfaceComposerClien::createSurface error
       Invalid argument"

It may cause crash.

Fixes: QTBUG-129770
Change-Id: Ib9ef4b5b77fb1faf196e56431976c2a0e6e4a1e2
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0d4778497ee13f93ecaff9036ee7f5f6d24bb2a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 21:34:58 +00:00
Christian Strømme 6f56cc73ce visionOS: Make sure the multiview caps is enabled
The caps for visionOS are the same as for macOS, so just set the
same for both, including support for multiview.

Task-number: QTBUG-126294
Change-Id: Ie3a551f134d8a8a39d63801bc7fd8dcca1e715c9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 2c2d36fae186a308f4bf2aa799551b74eb24eacb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 19:14:45 +00:00
Mårten Nordheim a7ad2641c5 DecompressHelper: retain the error from internal counter
We never copied the error string so after the call to 'clear' it went
away completely. Additionally, stop clearing the error string in clear()
since we reset it when the encoding is set, in case the object is
reused.

Pick-to: 6.5
Fixes: QTBUG-129697
Change-Id: Ia64e1d13a99b62760f61cac6b67ae3cff5e2c9da
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit f84c83be52462536ce5ae5ba68205e7061369fe3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 18:28:10 +00:00
Wladimir Leuschner 31367fd2c8 WindowsQPA: Respect ENV and cmdline darkmode overrides
Currently the commandline and environment parameters (windows:darkmode)
for setting the darkmode handling are ignored when the application
starts. This patch adds a condition to
QWindowsTheme::effectiveColorScheme that checks whether darkmode
handling was explicitly overridden and initializes in the constructor
the m_colorScheme with the result of passing Qt::ColorScheme::Unknown
toeffectiveColorScheme.

Fixes: QTBUG-127135
Change-Id: I365d26c66fdb3a754832cb7c579aeebecab093fd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 2ced94b4100c03c5feb7d5b1c0006c9fc451e944)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 15:00:23 +00:00
Wladimir Leuschner b33e0eac97 QWindowsVistaStyle: Fill menu popup with theme color
The background for menu items is not drawn and can lead to a transparent
background when switching from QWindows11Style to QWindowVistaStyle at
runtime. This patch fills the background of menu items with
MENU_POPUPBACKGROUND.

Fixes: QTBUG-125474
Change-Id: I246db15ec821f9bc46ba410293c41b7e24548716
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 3de6d6fd348668ff5179504e950ce20b15075391)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 15:00:13 +00:00
Joerg Bornemann 8f89f45f42 CMake: Fix build on Solaris the stack_protector feature enabled
Solaris requires the ssp library to be linked when
-fstack-protector-strong is passed to the compiler.

Fixes: QTBUG-129085
Change-Id: I55396fd9dc102ffd98bef54fc3dfc1aadf18a404
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 73875b8bb5faf9f6ec1064704efaae76e33b0e35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 15:00:13 +00:00
Thiago Macieira ea4c74ccaf QFileInfoGatherer: Fix internal build (with Q_AUTOTEST_EXPORT)
I'm surprised that this passed the CI on Windows, because
Q_AUTOTEST_EXPORT is Q_DECL_EXPORT, which is __declspec(dllexport) and
all dllexport'ed functions must be defined in the current DLL, not
imported from elsewhere. This is similar on Unix systems with the
no_direct_extern_access mode, because then Q_DECL_EXPORT behaves like on
Windows.

That means Qt modules can't call a Q_AUTOTEST_EXPORT function
from another module (only tests can). Solve this by providing a function
that is properly exported with Q_CORE_EXPORT.

Amends commit 3d08816f4c4245f08a53307775fe3c4ed31a7a32.

Task-number: QTBUG-28246
Task-number: QTBUG-31103
Change-Id: I2ba317ab34bda8c18954fffd28395f7354cb54f2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fbe61def33a2708e35e5e6a796e88976b04941f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 14:58:57 +00:00
Christian Ehrlicher 333a4ca7dd Windows11Style: allow usage also on windows 10
There is no reason to limit the usage of the windows 11 style to win11
or above - it works perfectly on windows 10 when using the correct font.

Change-Id: I179d2c017cdad130a134f45c2f0dfadc052a39f0
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit c9306baa825c4070e37aa46aff00aa1905bf1681)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 14:55:13 +00:00
Fabian Kosmale dd5c13d09e QMetaObjectBuilder: Fix construction logic for enums
We need to put metatypes in the correct place; this is especially vital
starting with Qt 6.9, given that we need it to query it to figure out
whether we have a 64bit value or not.

As a drive-by, replace some ugly casting when constructing the meta-type
array with a call to QMetaType::iface.

Change-Id: I4b1f42f974e9f7a21f6aa4c87c3f8919f6965d6e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d392d3b22c94f86fea50f26284bc9ac8b35f6851)
2024-10-09 08:48:13 +02:00
Tim Blechmann d12327bc3c QGraphicsFrameCaptureMetal: silence deprecation warnings
StringBuilder has deprecated support for char[], using wide string will
also avoid run-time unicode conversions.

Change-Id: Iff865463fb255acfa55224393807ece9ecb818b4
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
(cherry picked from commit d86224250322550169dd72bb04987a73aca74e69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-09 02:44:51 +00:00
Alexandru Croitor 3946e7af6f coin: Move cross-compilation build directories outside of sources
This stops confusing the 'reuse' tool when trying to generate a source
SBOM. The tool considers all files in the source dir as source files,
and because we placed the build dir inside the source dir, all build
files were considered source files. This caused errors saying the
files don't have copyright headers.

Change the build directory for cross-compilation jobs to be outside of
the source directory, similar how we do it for the native builds.

Augments ae62d908a5

Task-number: QTBUG-82820
Task-number: QTBUG-96513
Task-number: QTBUG-122899
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Change-Id: Ie82a6c55aa5326f7e9cc5c0e09342f3405e78d17
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit fc08a07a0035b3398cf009fef1ab4956ab4b60ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-08 16:46:36 +00:00
Alexandru Croitor be2e37f85a coin: Remove dead code that used to build host Qt in a cross-build
We don't build a host Qt during a cross-compilation build for a few
years now. Instead we reuse the prebuilt host from the platform
dependencies. This was left over to allow gradual porting to the new
way of using platform dependencies, which is now long done.

Remove the code to ease maintenance.

Amends 684fea1314

Change-Id: I9988da6f33f9d9b98d304316317d39c3dfb7c633
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit bb3ce6989eb90c0a8142c158a05eb237dfa8f032)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-08 16:46:35 +00:00
Simo Fält 2822db26be CI: Set SBOM_PYTHON_APPS_PATH env variable only if not set already
Change-Id: Ie8849721ff576079d708412c441cdf4830dbe427
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit cfa106c7d48167c1ae36dd56391de801758a0383)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 18:50:13 +00:00
Santhosh Kumar be974c4855 Avoid referring to invalidated observer during binding evaluation
The property observer reference used during binding evaluation can
become invalidated as the container used to maintain the
the observer would invalidate the existing observers during its
resize, leading to referring to invalid memory.

Recognize that we do not need to store the observer, but only its
binding - the observer itself is not used later.

Therefore, change the PendingBindingObserverList to become a list of
QPropertyBindingPrivatePtr to avoid the issue.

Fixes: QTBUG-127596
Original-patch-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Pick-to: 6.5 6.2
Change-Id: I8c97721ca563083d6280194175f8a915dac2ff04
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 275202215376238bf414d5008d3c727085e58a4c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 17:26:50 +00:00
Laszlo Agocs c60505140d Fix typo in rhi doc snippet
Change-Id: I51ca55edf328a56154ab6420674755db94da5b7d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 9b9b3cdf36ad61c835059f0bf3cb47b8909ffe86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 14:49:00 +00:00
David Faure 9f11db1855 QTableWidget: assume column 0 when dropping a row below another one
When dropping at a column > 0, the deserialized data wrapped around,
leading to multiple rows being inserted instead of just one (and
column 0 remained empty). Very weird behavior from the user's point of
view.

Drive-by whitespace changes due to clang-format.

Fixes: QTBUG-1387
Change-Id: I8d1dc14c124e468454e98ea6a14f33e3bef6e41a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ff8068deb45e45eb683745486956d3c6c795a708)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 12:30:28 +00:00
Jøger Hansegård ac81827ed8 Add WS_CLIPCHILDREN style to native window in embeddedwindows test
When a native/foreign window is used as a parent, its WS_CLIPSCHILDREN
style should be enabled. If it is not, the parent will paint on top of
the children and cause flickering. It is not Qt's responsiblity to
adjust the styles of foreign windows, so instead we document this in the
manual test.

Change-Id: I84bc25668d702c3475dfbd75a94dd3ed43a1695c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a645128c296756ea6c7e70259958a0d000d029e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 12:30:27 +00:00
Alexey Edelev 839695567f Trigger reconfiguring of android ABI projects when CMake files changed
Remove the stamp files of 'configure' step to ensure that we re-run
cmake for android ABI projects, otherwise the per-ABI projects do not
consider the changes in CMake files when re-running the build.

Task-number: QTBUG-129358
Change-Id: I5b5c682358052044a9e550587ed0457694857e09
Reviewed-by: Soheil Armin <soheil.armin@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 87930bb568018cc40ccd30babb42c8701e1d030c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 12:03:32 +00:00
David Faure 52c908fdb5 QAbstractItemView: implement full-row drop indicator
When the selection behavior is SelectRows, we're dragging full rows,
so it was very weird that the drop indicator was showing a single
column. Instead, expand the drop indicator over all columns.

This is typically for QTreeView but it also works for a QTableView where
a single row represents a single underlying object (otherwise, why use
SelectRows?).

Since we're testing the selection behavior of the drop side, not
the drag side, only do this when inserting rows, or (for OnItem) when
they're the same widget.
There's a use case for dropping single properties (from a different widget)
onto specific columns of full-row objects (there's also a use case for
overwriting the whole object but we can't know which one it will be...).

Fixes: QTBUG-1656
Change-Id: Idde0f4f8592970339f19dcc11ba667cf12677438
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a818326985295ba1cf1b31043b24e9f089b1d834)
2024-10-07 11:52:41 +02:00
Even Oscar Andersen 4bda9b977e wasm: Handle theme colors
Changing color themes did not work since the results from
qt_fusionPalette is cached by default.

The solution is to track changes and call qt_fusionPalette
when necessary.

Fixes: QTBUG-129399
Change-Id: I77824098349be5e5264fa9e230a949e3ccd6f14f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ff645479e7489de5a88c71c0215748d84be3de9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-07 09:52:41 +00:00
Assam Boudjelthia ca304ec1bf Android: delete androidContentFileEngineHandler in terminateQt()
Similar to other Android file engine handlers.

Change-Id: I63591e09312e439eee1e7bdd71a65d3df4cefbae
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit cd5d30fa3368ab9cf995ed934ea737f3e569e9ce)
2024-10-07 07:25:34 +00:00