74401 Commits

Author SHA1 Message Date
Alexandru Croitor
5220685a11 CMake: Fix capturing of x86intrin compile test output
TEST_x86intrin_OUTPUT is not set anymore since we lazily evaluate
compile tests after 605913f9d7a60461939c1a8fb8dac05054cade2d .

Use the new qt_configure_add_report_entry
COMPILE_TESTS_TO_SHOW_ON_ERROR option to dump the test values in case
of an error.

Amends 9e9099865a0881ac5bb6035237e0a0c86962c45f

Pick-to: 6.8 6.9 6.10
Task-number: QTBUG-122596
Change-Id: I48d1c57145ad5d9418631025927581c4eb5ec93c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-04 19:08:14 +02:00
Alexandru Croitor
a20a40095a CMake: Improve compile test error reporting in configure summary
Starting with 605913f9d7a60461939c1a8fb8dac05054cade2d we run
configure.cmake compile tests lazily during feature evaluation.

This means that qt_config_compile_test() calls will no longer set
TEST_foo_OUTPUT variables in the scope of configure.cmake files and
thus the build output of compile tests is no longer available for
configure summary error reports.

Instead of setting the output variable in the caller scope, save the
output in a global property.

Then, when we add error reports that mention compile tests either in
CONDITION or in a newly introduced COMPILE_TESTS_TO_SHOW_ON_ERROR
option, dump those outputs in the error report.

We continue to set the output in the parent scope, in case if
qt_run_config_compile_test is called manually.

Amends 3334a77ecfb792fba0144e99887f11cd0fa2506d
Amends 605913f9d7a60461939c1a8fb8dac05054cade2d

Pick-to: 6.8 6.9 6.10
Fixes: QTBUG-137198
Change-Id: Idc0470556a053123286983c44063e17b7eb9949d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-06-04 19:08:13 +02:00
Alexandru Croitor
7542aaea60 CMake: Improve error reporting for failed linker no undefined flag
Capture the output of the check_cxx_source_compiles calls in
qt_internal_add_link_flags_no_undefined like we do for
qt_config_compile_test.

Amends 3334a77ecfb792fba0144e99887f11cd0fa2506d

Pick-to: 6.8 6.9 6.10
Task-number: QTBUG-137198
Change-Id: Ic7dd4eae0ac1af0f8293f2ce285d2987e4e26249
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-06-04 19:08:13 +02:00
Magdalena Stojek
e94a951862 Mark qtbase/src/corelib/plugin files as security-critical
- quuid.cpp parses the string representation of a UUID
- qfactoryloader.cpp parses metadata from loaded plugin
- qcoffpeparser.cpp, qelfparser_p.cpp and qmachparser.cpp as they are
  binary object files parsers
- qlibrary.cpp, qlibrary_unix.cpp, qlibrary_win.cpp, qpluginloader.cpp
  are responsible for finding and loading plugins from untrusted
  locations.

Fixes: QTBUG-135193
Change-Id: Ibbcefeab80e7455225ade620bdba45dbc592c581
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
2025-06-04 19:08:13 +02:00
Edward Welbourne
a34195508a Fix WASM build for the recent qtestcrashhandler changes
Amends commit fddb6fceaa28df2a24f7bdd216792985bf8141d1 - the code in
qtestcrashhandler_unix.cpp is written to compile for WASM, and some
declarations in the _p.h aren't excluded on WASM, so the exclusion of
the .cpp when WASM lacks threads lead to linker errors.

Pick-to: 6.10
Change-Id: Idb941643302ed5a4c084d0fd2b4dfc07a44122e3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2025-06-04 16:30:32 +02:00
Edward Welbourne
9be6e51a50 Update QJsonValue(qint64) docs to reflect full precision
Amends commit 35adb74ddd915831789f0175423660f8e898942e (from 5.15) to
reflect the improved precision of 64-bit int when stored as a JSON
value.

Task-number: QTBUG-28560
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I07915bc190dd7696e58356143e8857f91e888c67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-04 16:30:32 +02:00
Edward Welbourne
65365e9bb7 Fix typo in qlocale_tools_p.h unicodeForDigit() comment
Got the name of the numeric tokenizer helper wrong, making the
cross-reference comment misleading.

Pick-to: 6.10 6.9 6.8
Change-Id: I88b850975aa77b6175e8d95afa2960e589c42d8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-04 16:30:31 +02:00
Tor Arne Vestbø
4d4843df42 Document QT_WARN_DEPRECATED_UP_TO
The default value is 0x070000, via qtdeprecationdefinitions.h

Pick-to: 6.10 6.9 6.8
Change-Id: I78586231e123321a11d41ec8c1324ab928e5fdc8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2025-06-04 14:07:07 +02:00
Eskil Abrahamsen Blomfeldt
2d82e845cc Revert "dwrite: Support additional font names for system fonts"
This reverts commit 6854ea63365ae419a04a470eb17e5f7662f00931.

This caused errors in a Qt Declarative test. It's possible the test
is depending on assumptions that are not strictly true (such as
QFontDatabase::styles() never returning an empty list), but it's
a surprising side effect and should be investigated. So we revert
until it can be addressed.

Pick-to: 6.10 6.9 6.8
Reopens: QTBUG-135817
Fixes: QTBUG-137398
Change-Id: I2e673b316f3d5fc14342b36095f9983ad55ea796
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2025-06-04 14:07:07 +02:00
Eirik Aavitsland
472306523a Doc: Explicitly advise adding svg, if any, before other files to QIcon
Adding in the wrong order yields a QIcon that does not provide the
expected or desired behavior.

Fixes: QTBUG-135652
Pick-to: 6.10 6.9 6.8
Change-Id: Ie1f6e50ee82ddaae8857b076c383ede20ab872df
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2025-06-04 09:18:44 +02:00
Li Changze
5ee2737d91 qdbus: add call GetConnectionCredentials interface
[ChangeLog][QtDBus][QDBusConnectionInterface] Added method serviceCredentials().
See <https://dbus.freedesktop.org/doc/dbus-specification.html>
section: 'Method: org.freedesktop.DBus.GetConnectionCredentials' for more information.

Pick-to: 6.10
Change-Id: If37687a35278fde8b0afc33eb19f9fa6b8dbe200
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-04 12:58:07 +08:00
Nils Petter Skålerud
cb09be1512 QScreen, iOS: Make grabWindow() use UIGraphicsImageRenderer
Currently the QIOSScreen::grabWindow implementaton relies on
UIGraphicsBeginImageContextWithOptions to do a screenshot. This API
is deprecated and produces a few warnings logs that we can't silence
even when we handle the errors. The current approach also has a memory
leak when taking screenshots in rapid succession (i.e 60 FPS).

This patch modifies grabWindow() to use UIGraphicsImageRenderer, which
replaces the deprecated API. This no longer produces warning logs when
errors are handled. This API can be used in the future to let us take
HDR screenshots once Qt has support for this. This patch solves the
mentioned memory leak.

Pick-to: 6.10 6.9 6.8
Change-Id: Ifbc8503482886246ce9611d0b7a19462fc830ecd
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
2025-06-04 02:37:47 +02:00
Ahmad Samir
e67c4c986f QLogging: use std::unique_ptr instead of QScopedPointer
Task-number: QTBUG-132213
Change-Id: I6c5e72108e4ed79e645b8dbd9b2103e13e4849d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-06-04 02:13:06 +03:00
David Edmundson
a639807a8f wayland: In test lock thread when setting env variables
putenv/setenv are not thread safe. The Qt wrappers lock a mutex
but this only works if all users use it.

Fixes: QTBUG-136450
Pick-to: 6.10
Change-Id: I9a46b5be607c84436864afcf7eb063275e065738
Reviewed-by: Liang Qi <liang.qi@qt.io>
2025-06-04 00:23:23 +03:00
Liang Qi
c72ba39e50 wayland: use qgenericunixtheme_p.h instead of qgenericunixthemes_p.h
This amends 54651971a260d65c987d03973168f7d274ed8930 .

Pick-to: 6.10
Change-Id: Iadeff9a59288934233bbf0f10d26510b5626b4f7
Reviewed-by: David Redondo <qt@david-redondo.de>
2025-06-03 23:23:22 +02:00
Christian Ehrlicher
a66dbb19e6 SQL/MySQL: add option MYSQL_OPT_SSL_VERIFY_SERVER_CERT
Add option MYSQL_OPT_SSL_VERIFY_SERVER_CERT to disable ssl for MySQL
5.7.x and MariaDB. This is needed as MariaDB does not support the
SSL_MODE options but defaults to ssl nowadays.
Also enhance the documentation for MYSQL_OPT_TLS_VERSION and
MYSQL_OPT_SSL_MODE by providing the needed MySQL/MariaDB versions for
those options.

Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-136550
Change-Id: If570cf8e92d0df7c9e2c4d0e009857eaf33f4f2d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-06-03 19:39:50 +00:00
Christian Ehrlicher
cc6d78325b SQLite: Update SQLite to v3.50.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.50.0

Pick-to: 5.15 6.5 6.8 6.9 6.10
Change-Id: I20eef45bbb93ae3a50cdd7ffecaa53eec18823f7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-06-03 19:39:50 +00:00
Christian Ehrlicher
15c2ec5344 QStyleSheetStyle: avoid creating QString
Don't create a QString when comparing the strings from
knownPseudoElements - a QLatin1StringView is enough.

Pick-to: 6.10 6.9
Change-Id: I69e207bac0fb3d3df12ae9d4bebc9cd30cde30de
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-06-03 21:39:50 +02:00
Tor Arne Vestbø
b02da5f04a Remove docs claiming QColormap is involved in mapping colors to display
Change-Id: Iebf949d91379fff903b229c631b97a3c8a9ad03a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-03 21:07:34 +02:00
Tor Arne Vestbø
ecad0ca351 Decouple QColor from QColormap
They don't need to be BFFs.

Change-Id: I7017347b348bd8e63dfb5f664c95597f84190e7c
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-03 21:07:34 +02:00
Tor Arne Vestbø
c7625d14df Decouple QApplication::isEffectEnabled from QColormap
Change-Id: I26468cc528d2c516492db11ca4109e6be63c1b5a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2025-06-03 21:07:34 +02:00
Toni Saario
3056da6711 Coin: Sign cross-compiled Windows binaries
Pick-to: 6.8 6.9 6.10
Task-number: QTBUG-137228
Change-Id: Idda7bfd97ac74a87987dcd4c31440b0c2f193c14
Reviewed-by: Simo Fält <simo.falt@qt.io>
2025-06-03 19:07:34 +00:00
Axel Spoerl
36ebec92e8 QCocoaMenu: Explicitly remove NSMenu from supermenu on destruction
The d'tor of QCocoaMenu calls dismiss() to remove the current menu.
dismiss() calls cancelTracking, which doesn't always remove the
menu from its parent.

Remove the menu from its parent in addition.

Fixes: QTBUG-135634
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ic8e9b4172c3b2035b7e9ad1b576725923987abf2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-06-03 18:56:07 +00:00
Michael Weghorn
77f02471ed a11y atspi: Create local variable on stack
There is no reason to allocate the OrgA11yAtspiSocketInterface
object only used inside AtSpiAdaptor::registerApplication on
the heap.

Pick-to: 6.10
Change-Id: I2985acb5bd3e2f89c60de2b4ffa77b2a78cb4eff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-03 18:56:07 +00:00
Lars Schmertmann
36b5854af5 Android: Bump androix dependency to 1.16.0
The Android target API level was bumped to 35 in
997a1fae98d35cd0d4d16f37ab68afe2729ff551 so we can
bumb the version of the androidx dependency too.

Pick-to: 6.10 6.9 6.8
Change-Id: I30d561cc0b74645c939e7d3dd595926b6013caf9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-03 19:55:47 +02:00
Marc Mutz
c485c07c6d Explain what "junk" means in tst_QDataStream::status_QBitArray_data()
It means the data contains bits outside the [0, size()[ range.

Found while debugging why these data rows fail in the 5.15 cherry-pick
of 78f8dfc5427457783ceef7d85885cddbec035ebe.

Amends the start of the public history.

Pick-to: 6.10 6.9 6.8 6.5 5.15
Change-Id: Ic21d15da25944d4897357dd27e2986d448b5ee60
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2025-06-03 17:13:55 +00:00
Thiago Macieira
ae973dc2de QFileSystemEngine::tempPath: simplify handling of fallbacks
If the environment variable is empty, we have a couple of fallbacks, one
for Apple Darwin systems and one for everyone else. A non-absolute path
in the environment or the Apple API makes no sense, but this code
retains this defensive measure for them; for _PATH_TMP from <paths.h>,
we assume it is absolute.

Pick-to: 6.10 6.9
Change-Id: I3e486f73276a3ae288d1fffdbfe20a74271f73f2
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2025-06-03 11:54:38 +00:00
Thiago Macieira
7bd7df5aa1 QFileSystemEngine::tempPath: bypass QDir and go straight to QFSEngine
Temporary paths coming from the environment must be real filesystem
things, never a Qt file engine, so we don't need to create QDir with its
QDirPrivate, in order to call QFileSystemEngine.

The replacing of canonicalPath() with QFSE::absoluteName() is fine
because canonicalizing *after* cleanPath() is the wrong thing. For
example, if you had:

  $ ln -s $HOME/tmp /tmp/symlink
  $ TMPDIR=/tmp/symlink/..
then
  cleanPath($TMPDIR) = /tmp
  absolute($TMPDIR) = /tmp    # QFSE::absoluteName calls cleanPath
  canonical($TMPDIR) = $HOME
  canonical(cleanPath($TMPDIR)) = /tmp

The lack of canonicalization now only affects when the final path is a
symlink. Doing so bought us little security if it is a symlink and it
could change, because the result is not cached and could change from
call to call. That changing is probably worse than any attack, because
you could end up with

  QDir::tempPath() != QDir::tempPath()

[ChangeLog][QtCore][QDir] tempPath() may now return a non-canonical
path. This means going up from it (cdUp()) may result in different paths
from string manipulation (adding "/..").

Pick-to: 6.10 6.9
Change-Id: Iddf6f46edf6f3b6c3222fffd1e1e5479f0be92a9
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2025-06-03 11:54:37 +00:00
Jani Heikkinen
05f8abc61d Revert "Android: consider DecorView insets at app startup"
This reverts commit e96a4b84e136d065054600c07bf5fae17f3049ce.

Reason for revert: QTBUG-137306

Pick-to: 6.10 6.9
Change-Id: Id5718737f3f426de49ad109d214af1c920e5ae22
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-03 10:47:14 +00:00
Kai Köhne
95229bb7d0 Doc: Fix broken links in Qt Widgets
The iQRhiWidget API got changed in commits acebb97b5880,  acebb97b58807d1d591.

Pick-to: 6.8 6.9 6.10
Change-Id: I7791b1a61d94f33ba01cfe22e63ecfdc7b81022b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-03 10:41:10 +00:00
Ilya Fedin
7c25b916dc xcb: mark xcb-image dependent on xcb-aux
Pick-to: 6.10 6.9 6.8 6.5
Fixes: QTBUG-86287
Fixes: QTBUG-137004
Change-Id: Ic4055078dedbbd8fcf1fba3983d6d64b7a06a20e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-03 10:41:10 +00:00
Liang Qi
ac2a38d80c Reapply: xcb: add xcb-util dependency for xcb-image
xcb-image includes xcb_aux.h, which is part of xcb-util.

0.3.8 is enough for the dependency, it also make Debian 10
(Buster) satisfied. xcb-image is from xcb-util-image, which
should follow same version number as xcb-util. Not sure how
Debian 10(Buster) got xcb-image 0.3.9 with xcb-util 0.3.8
combination.

See also https://lists.x.org/archives/xorg-announce/2012-May/date.html#1965 .

This reverts 92a57e0b016f811876ec1d62328ca8edfe452a3a .

Fixes: QTBUG-86287
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I838b1e06a25fa1e45470466de17cbb6b6da851a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-03 10:41:10 +00:00
Jie Liu
1c87e9a60a wayland: fix image copy failed problem on data control
Change-Id: I20d26af8bdbf5f35ae78c984eb21e91f6fcc72b4
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2025-06-03 09:19:03 +00:00
David Edmundson
d687ac6d3e wayland: Drop unused member variable
The only mWaitingForUpdate is checked is to show a debug. The only
public way to call requestUpdate is via QWindow::requestUpdate which has
a guard already.

Change-Id: I542e0f470ec2134f0a9fd415aab6ac7832e77263
Reviewed-by: David Redondo <qt@david-redondo.de>
2025-06-03 12:19:03 +03:00
Michael Weghorn
5e7891f73f a11y atspi: Set correct child index in children-changed:add event
When sending an object:children-changed:add AT-SPI2 event,
set the actual index of the child instead of always using
the child count of its parent.

If the new child were added at the end, its index would be
"[child count] - 1", but the new child doesn't necessarily
have to have been added at the end.

Therefore, use the actual child index either already used as loop
variable or retrieved via QAccessibleInterface::indexOfChild
instead.

The mismatch could e.g. be demonstrated with a simple pyatspi
script when typing Enter in LibreOffice Writer to create
new paragraphs.

Script:

    #!/usr/bin/python3
    import pyatspi
    def listener(e):
        if not e.host_application.name.startswith('soffice'):
            return
        print(e)
        print(f'index in parent set in event: {e.detail1}')
        print(f'index in parent reported by child: {e.any_data.get_index_in_parent()}')
    pyatspi.Registry.registerEventListener(listener, "object:children-changed:add")
    pyatspi.Registry.start()

Sample output without this commit in place:

    object:children-changed:add(4, 0, [paragraph | ])
            source: [document frame | Untitled 1 - LibreOfficeDev Document]
            host_application: [application | soffice.bin]
            sender: [application | soffice.bin]
    index in parent set in event: 4
    index in parent reported by child: 2

Sample output with this commit in place:

    object:children-changed:add(2, 0, [paragraph | ])
            source: [document frame | Untitled 1 - LibreOfficeDev Document]
            host_application: [application | soffice.bin]
            sender: [application | soffice.bin]
    index in parent set in event: 2
    index in parent reported by child: 2

Pick-to: 6.10 6.9 6.8
Change-Id: I30316c59f8ad6fd018089a8dca8e7a8d1d92d7ec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-03 05:34:43 +00:00
Christian Ehrlicher
e0130876ba QHeaderView: remove unused include, add missing include
Remove unused include of qtableview.h in the source - this also fixes
the compilation with feature_tableview = OFF.
Move the missing include of qlist.h into the header.

Pick-to: 6.10 6.9
Change-Id: Ie443cf6f3bf6b76dedc994bf1b8c16daebf9022d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-02 20:23:58 +00:00
Rami Potinkara
ea8f19f50b Android: don't disambiguate the convertToJni call with 'template'
There is no non-template overload of LocalFrame::convertToJni, and
clang 18 complains about an explicit .template without a template
argument list. We call convertToJni without either in other places, so
do so here as well.

Pick-to: 6.10
Fixes: QTBUG-136967
Change-Id: I2b4bbc8a4e2056bd2a8bff390ea0847f2e18202e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-02 20:23:54 +00:00
Michael Weghorn
6cca30bb11 a11y atspi: Support Application iface "AtspiVersion" property
As the AT-SPI XML spec for the Application interface says,
this should currently always be "2.1" [1]:

    <!--
        AtspiVersion: You should return "2.1" here.

        This was intended to be the version of the atspi interfaces
        that the application supports, but atspi will probably move to
        using versioned interface names instead.  Just return "2.1" here.
    -->
    <property name="AtspiVersion" type="s" access="read"/>

This makes the expected value show up in Accerciser with
pending merge request [2] in place instead of triggering a fallback
path in Accerciser handling the null case for Qt applications.

[1] 2d83e3a6df/xml/Application.xml (L19-26)
[2] https://gitlab.gnome.org/GNOME/accerciser/-/merge_requests/95

Pick-to: 6.9 6.10
Change-Id: I0d849d5d6d160c48fd4fc2d443e4fde43cde5606
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2025-06-02 20:23:54 +00:00
Christian Ehrlicher
db07a03874 StyleSheetStyle: Don't paint CE_ComboBoxLabel when no stylesheet is set
Don't paint through stylesheet code when a combobox label has no
stylesheet set at all.
This should be done also for others but may break existing painting
stuff so only fix this here as it's a regression from
a77a7c157d5cdcc88bf0a02caed2aa5ff8850d06.

Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-131761
Fixes: QTBUG-137108
Change-Id: I462ba198821692aa60e6869df9c8e92332422c44
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2025-06-02 19:53:35 +00:00
Cristian Le
295b3ca5bd Deprecate FEATURE_regularexpression
There have been places where regex support has been implied and bootstrap
always builds with regex enabled. Therefore, disabling
`FEATURE_regularexpression` currently produces an error. Until a need
for building without regex emerges, we are enforcing it as a
requirement.

Users must either use system or bundled pcre2.

Fixes: QTBUG-136346
Change-Id: I9e92bb4e7f0dfb84884a2a23f45b20d18ddc8985
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-02 20:54:31 +02:00
Cristian Le
618053e279 Add feature deprecation capability
Emit a warning if `FEATURE_*` variable is set. The "feature" is not
registered as a true feature after deprecation.

Pick-to: 6.10 6.9 6.8
Change-Id: I715af231c228c73d70b037ee31aa61edcd45c21e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-02 20:54:31 +02:00
Cristian Le
11fab3d150 Display feature alias information in configure
Pick-to: 6.10 6.9 6.8
Change-Id: Ia7d054436ffcca64d6fecd363795e7439694b3f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2025-06-02 20:54:31 +02:00
Joerg Bornemann
eaf87cdfd8 CMake: Add targets for building Android docs from Java sources
One can now run "ninja android_docs" to generate HTML docs for Android
Java sources of Qt. This is done with javadoc.

One can now run "ninja android_source_jars" to generate source jars for
Android. They're supposed to be loaded into an IDE.

The targets are enabled automatically for Android builds.
For non-Android builds, set QT_BUILD_HOST_JAVA_DOCS=ON to create those
targets. In that case you must also set ANDROID_SDK_ROOT.

Fixes: QTBUG-117028
Change-Id: I2df51153359a95870c055d3ee373b8381f10cb51
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2025-06-02 19:18:04 +02:00
Alexandru Croitor
89e7facc2e CMake: Fix location of iOS framework prl files
iOS prl files for static frameworks were previously placed at a path
like
  6.8.3/ios/lib/QtCore.framework/Versions/A/Resources/QtCore.prl

This caused qmake to silently fail to find iOS framework prl files.
The failure could only be seen when calling qmake with -d -d:

  DEBUG 2: QMakeMetaInfo: Cannot find info file for
    6.8.3/ios/lib/QtCore.framework/Resources/QtCore.prl

This in turn can lead to various build failures if a different non-iOS
prl file is found in a system path.

Place the prl file into the root of each framework, e.g. at
  6.8.3/ios/lib/QtCore.framework/QtCore.prl

We didn't have this issue in 6.7 and earlier, because by default iOS
was built with static libraries rather than static frameworks.

Amends 291817b0bf3f351843b0c1d0de237dc8df5c0fa5

Pick-to: 6.8 6.9 6.10
Fixes: QTBUG-137297
Change-Id: Idff8e808e9bfc009f82d2a59e5e6752ed8a55714
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-06-02 19:18:03 +02:00
Lars Schmertmann
577f9ebfe6 Android: Enable all warnings on javac for user code too
In addtion to 1cf03c974c433b7a5330b56bd9e519287fce6f7f we should also
enable all warnings in the template as a recommendation for users.

Pick-to: 6.10
Change-Id: If60a3d9f3c1fd97b49ec7513f781bdfe1775d9d4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-02 19:18:03 +02:00
David Redondo
1260aaf954 Send synthesized button release event immediately
...not only on the next frame.

Pick-to: 6.10
Change-Id: Iad31a3d80576c5cd8fa3ba7f64a39d7a6a01337a
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2025-06-02 19:18:03 +02:00
Alexandru Croitor
747741119a CMake: Improve Apple SDK name and path reporting
If CMAKE_OSX_SYSROOT or QT_APPLE_SDK was set, we still reported the
default platform sdk path, rather than taking into account the set
value.

Improve the reporting by considering these values.

The implementation is incomplete because we don't handle explicit sdk
paths, but this is not critical for the current use cases, because the
value of the function is only used for reporting purposes.

Amends ab7eb492cba64fe985ea80b2f0be22c1c18f3c5e

Pick-to: 6.8 6.9 6.10
Change-Id: Ic69aec3641d435736018c96f72ba7f75a0f74508
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2025-06-02 19:18:03 +02:00
David Edmundson
602fa3f337 wayland: Ack configure events when suspended
All configure events should be acked, and that acknowledgement is double
buffered with the surface commit.

If a window is not exposed, for example being in a suspended state, us
sending an expose event is semantically wrong. It also ends up not
resulting in a commit as at some point it no-ops, we have to commit
manually.

Change-Id: I020b06f04030c1209f2fc768adc8bd66d57975b1
Reviewed-by: David Redondo <qt@david-redondo.de>
2025-06-02 20:18:03 +03:00
David Edmundson
ca27a661bd wayland: Use modern syntax for method invokation
Change-Id: I4b4d15fcb932460a1b6a132145451fa2990496ad
Reviewed-by: David Redondo <qt@david-redondo.de>
2025-06-02 19:32:47 +03:00
Olli Vuolteenaho
3bf9047a34 Android: Don't reparse same paths in QML to Java codegen
appImports can have the same directory added multiple times - first if
it's found in the xxx_conf.rsp file and secondly for the inner qmldir
scanner. This is because the xxx_conf.rsp file can have both the
qmlModule directory and the parent of that directory as importPaths. For
example like this (the paths are truncated to save characters):

-importPath
.../build/qt_generated/qtquickview/qmlModule
-importPath
.../build/qt_generated/qtquickview

In this case when the "inner qmldir" finder processes the later path,
it would go to ./qmlModule, find the qmldir and add another
.../build/qt_generated/qtquickview/qmlModule to appImports. Also, if
there were other qmldir files somewhere under qmlModule those would
also get added twice, which would increase generation time yet again.

This commits solves the issue by removing duplicates from appImports.

Amends 7ed88eb565d40b195aa868e67777872ef07a5ea2.

Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-137316
Change-Id: I641065479aec0f3d9ae1a8727a03bf62eb169ad6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2025-06-02 17:40:54 +03:00