Commit Graph

69819 Commits (ea5e5a2e7f5aa2721823c254ce145fd0a41b652f)

Author SHA1 Message Date
Alexandru Croitor ea5e5a2e7f CMake: doctools: Avoid blocking integrations due to version mismatch
It can happen that qt repo version bumps are direct pushed, and not
merged in DAG-dependency order. This can cause a mismatch between the
qttools package version and any of its dependencies, which would block
integrations. To avoid this, we disable the warning about incompatible
package versions when building the doc tools. The version check in
that case doesn't make sense, so it's safe to do.

Amends f7f02c791bcbee44597f1fe24570ebdf352ec648

Task-number: QTBUG-128730
Change-Id: I6180ecb09c6a3dee415ae73c11549ee0f709f240
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit a8f55f4729918700b9597843c98f9f2505ff0d23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 81b3e808403253bcfa34e071d70c046ee6c4b574)
2025-02-12 09:23:45 +00:00
Marc Mutz a70a92314e QJsonValueConstRef: remove duplicate Q_ASSERT in objectKey()
Amends 14d1108d35.

Change-Id: I9fcfb864254d040cd1de8aa0dc818ccd9104487b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6aaa874d79805dc6407a68e56f8d9ee128ad37bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6dd6836227c3bce065e54d8562ed311acdacdd5f)
2025-02-12 08:59:54 +00:00
Thiago Macieira fce2a17a9c QLibraryInfo: use fewer QFileInfo in finding qt.conf
This is hot code, run early in the application's life, usually as a
result of the first qDebug() because QLoggingRegistry wants to find
qtlogging.ini. So let's not use QFileInfo, which allocates memory, just
to do string manipulation. These are always filesystem paths.

See commit d59e640c868f3db2d661970f3d34a22013d49053 for a similar change
in findConfiguration().

Change-Id: I012daf4a3aa2ebc2c5abfffd2ef7ceac1df2626d
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c74cba1117355a6312b1f0cc815efa4cdea4bbfa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3d43223448b4d5c1828501de4ec23edb2edc64d7)
2025-02-12 08:59:46 +00:00
Bartlomiej Moskal 45cfaf16b3 AndroidTestRunner: allow to call additional/extra adb call
This commit adds a new parameter (--pre-test-adb-command) to
AndroidTestRunner. The new parameter allows to pass an extra adb command
which will be called by AndroidTestRunner after installation and before
running the test.

To set the mentioned argument the new parameter for qt_internal_add_test
was proposed: ANDROID_TESTRUNNER_PRE_TEST_ADB_COMMANDS.

The new parameter is needed especially for multimedia screen capture
tests. ScreenCapture feature needs an acceptation of Security Popup. It
can be automatically accepted with additional adb command.

Fixes: QTBUG-132249
Change-Id: Ib70cd05d60d4594961ca68b554c7aae11cf42240
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b4c82eba03388aa4f9e5b56f633e0e679a3b0123)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit bc533b0fb2d50a8e124e5e54628ad847733a8de8)
Reviewed-by: Bartlomiej Moskal <bartlomiej.moskal@qt.io>
2025-02-12 09:59:42 +01:00
Alexandru Croitor df8a1a950d CMake: Simplify and fix target dependency handling in SBOMs
Previously we had complicated logic trying to differentiate between Qt
targets, system libraries, vendored libraries, custom sbom targets,
whether they are in external documents or not, when generating SBOM
dependencies for a target.

We also lacked the ability to handle regular non-Qt non-system
libraries. This was discovered while creating the SBOM for Qt Creator,
where the code treated all Creator helper libraries as system
libraries rather than just regular dependencies.

Simplify the code by unifying most of the code branches, removing
nested ifs, and removing special handling of some targets when
checking whether they are in external documents.

Now system libraries are marked at qt_find_package time by setting the
_qt_internal_sbom_is_system_library property on the target, rather
than trying to infer it base on the target name and other markers.

Now the logic goes as follows:
- check if system library based on the presence of the
  _qt_internal_sbom_is_system_library property
- check if it's a vendored lib based on walking its libs and checking
  if the _qt_module_is_3rdparty_library property is set
- mark system libraries as consumed
- if not a system library, handle it as a regular dependency, taking
  into account if it's external or not

Also add some debug messages to help keep track of system libraries.
And remove some of the unnecessary code in
in _qt_internal_sbom_is_external_target_dependency and
_qt_internal_sbom_add_external_target_dependency.

Task-number: QTBUG-122899
Change-Id: Ic43fe53446b74badee2cde6d18146e952587c292
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 66261ac0f1f2807916c80b2050536d52b8fe6d3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b91da6c94348b3225bd0a43141f34ec4e5e1f216)
2025-02-12 08:57:42 +00:00
Alexandru Croitor ce0d893025 CMake: Decouple Qt specific handling from SBOM implementation
The SBOM functions so far had a lot of Qt-specific logic inside them.

Decouple this logic into separate Qt-specific functions or explicitly
guard the code with Qt-specific handling options, to prepare for a
cleaner SBOM public API.

The generic functions then call the Qt-specific ones if various
internal options are set.
This approach is used, rather than directly passing values to the
generic functions because:
- we have cases where we need to recursively pass the values all the
  way down to all recursively created attribution targets
- some of the logic needs to know about values before and after qt
  processing, and this could be achieved with something like lambdas
  but it's not worth the complexity

Task-number: QTBUG-122899
Change-Id: I4399c41f4d976f20b16a0bb0c674d4f07ee1ccd4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit f1ac316191c010b1389f6f3549c9f0b4424b9936)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 59a571c75dbbe3cd425629ad309bdf143f0616de)
2025-02-12 08:57:40 +00:00
Alexandru Croitor fc83599fa0 CMake: Fix location of build time sboms in no-prefix builds
For build time sboms to be found in a no-prefix qt build of a repo,
specifically when finding external sbom documents, the build time
sboms have to be in the same location.

Previously they were in each repo's build dir.
Align the location to be in the qtbase build dir, just like for super
builds.
Also check for QT_BUILDING_QT because we don't want to apply the logic
for QT_WILL_INSTALL not being set in user projects.

Task-number: QTBUG-122899
Change-Id: I04a066fc0efc91a4f2ee938c190b8632c8c946aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 3a5c62d4af9cb07fba065de8a2d1b97531b6fd30)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 90b128e4cc7be623c67bd02128bf82a26efe2b57)
2025-02-12 08:57:39 +00:00
Frédéric Lefebvre 4337841f04 tst_QGestureRecognizer::swipeGesture set FramelessWindowHint
tst_QGestureRecognizer::swipeGesture() is flaky as sometimes the
gesture event is being sent before the widget's position has
been updated.

The gesture starts in the window frame.

Set flag Qt::FramelessWindowFrame to prevent this from
happening.

Fix flakiness on Opensuse 15

Change-Id: I794b022b5a51146ddfa7d6029509c6fa43b9aad6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6dc0e593939cbeaeb45392d8daf7fcd90e8cb0f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 829b67074e2d1523ec9730fc76e31f41c416ad87)
2025-02-11 19:48:45 +00:00
Frédéric Lefebvre 9eec05de3f tst_QGestureRecognizer::touchReplay give fix position
tst_QGestureRecognizer::panGesture() is flaky as sometimes
the gesture event is being sent outside of the parent. It
is being sent in the window frame instead of in the widget.

Fix position of the parent and verify that it is correct.

Fix flakiness on Opensuse 15

Change-Id: I00eacb80a7e2e658345d3bc56cdef0c0024d1a1d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 3766b9cb3cb49fdef626526181b6a7fe26870e29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 69738c76b49dc2f6ce77d9db0fbcb08eed7ecff9)
2025-02-11 19:48:45 +00:00
Volker Hilsheimer e1d742ae3b Fix warnings in benchmarks from QFile::open being [[nodiscard]]
Pick-to: 6.5
Change-Id: I8a80af3614a92645be2d64d02ce81e9d263468c8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1c3ee86f183d46709c070ccd44970e05dc70f83d)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 288ef3479eb261f8afa15c4c0f28bdd0fed59982)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-11 12:43:50 +00:00
Volker Hilsheimer d822091039 Fix warnings in tests from QFile::open being [[nodiscard]]
QVERIFY the result, with filename printed if useful.

Pick-to: 6.5
Change-Id: I1b21e213856458b7bc36682dd3671bd29c437b99
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 8563ed54053024a4673e2bff9fce506fd648a312)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2a67dcda5e20adf0b92136a248b4b797b0e2e5cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-11 12:43:48 +00:00
Volker Hilsheimer 27cb94aa2c Fix warning from ignored return value of [[nodiscard]] function
Pick-to: 6.5
Change-Id: I1e293773d70cda1c58c4f3dc798ce2f65224ed9d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
(cherry picked from commit 823c2bfc13feb13cabc89638423274f560239087)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8b2f1b4d1a874cfda286c3e6b0b2445762497fa3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-11 12:43:47 +00:00
Marc Mutz ac45d129d9 qhighdpiscaling: pass QStringView by value
QStringViews should be passed by value, not cref, so sane ABIs pass it
in registers instead of forcing the variable to the stack.

As a drive-by, s/QVector/QList/ in the return type.

Amends 51e2a64ed9.

Pick-to: 6.5
Change-Id: I6b51dfda87643f6c7ec219ac4a8970537bb6b2ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8113a50d71cb9ea320e69c2b10452972e3310f4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 76c50ca1674eecca230d4bff9001fc952cc20b3b)
2025-02-11 07:23:00 +00:00
David Boddie 770aec741c doc: Remove invalid link and tone down language
QLatin1StringView::split() appears to be invalid.

Change-Id: I11066b8224cce0a6091c758367f602a63c6136a0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 4aff3488b8262ef23f1230b7f530c46ca2d61ac1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1b245a8a46ca1728ef82ba71044cd00a158d1eff)
2025-02-11 00:49:30 +00:00
David Boddie 5d069700da doc: Fix broken links, including auto-links
Change-Id: I967304c24e1a593b1b555998a718d0a015e12900
Reviewed-by: Jerome Pasion <jerome.pasion@qt.io>
(cherry picked from commit bddfded80e225cbc112b79ccf5ada20a01e62fcf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6de04b08c4c47ac30eb8e2b2234dc7189903fc4a)
2025-02-11 00:49:26 +00:00
Marc Mutz 47df569343 tst_QAnyStringView: test which chars magically convert
QAnyStringView is designed to replace overload sets containing QString
and QChar, among others, so it needs to accept types that merely
implicitly convert to QString and QChar. It achieves this by
maintaining a hidden container to hold the converted QString or QChar
for the duration of the full-expression, much like the compiler would
do if the function took QString/QChar.

This patch adds a check for the single-char ctors to determine whether
they convert or not, by comparing QASV::data() to the address of the
QASV's argument. While it would be interesting to have the same test
for QString, that is outside the scope of this patch.

Task-number: QTBUG-126054
Pick-to: 6.5 6.2
Change-Id: I30ac2d1199da5a03fe6fee4c9d5ea2a209a003d6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f31c37a1312fc4e21a58906e2b883099629fb9e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 18b56bbae2cb1e775b5155f8fc019081780a9867)
2025-02-11 00:49:25 +00:00
Friedemann Kleint 0f2d3dc7c4 uic: Add #ifdef depending on Qt version for QPalette::Accent
Complements 17c589df94.

Fixes: QTBUG-133651
Change-Id: Ieb57df30863f8493cd170d80220ae09177842ede
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 1832ac4d25dd5c32963c47ad38836a0ea2ebd793)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 20646e132c04f2e181db354b89cc42b70ede47ad)
2025-02-11 00:49:22 +00:00
Thiago Macieira ffdb68209d QLoggingCategory: remove #ifndef QT_BOOTSTRAPPED
Amends commit 6708107873 from 6.8, which
removed qloggingregistry.cpp from the bootstrap library build.

Change-Id: I3bb5609707478df771b8fffd3e71eb889eaac53f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 696e11ec729452d246e736e54790411b408f9c3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 00caa645ff064d9c26e70699b9f14c62172b71c9)
2025-02-11 00:49:20 +00:00
Bartlomiej Moskal 154560df21 Android: Fix cursorHandle and EditPopup positions
After the commit 28df9a49776a88cb1a8e69348ae19a59b16a5b7e, a regression
occurred in the positioning of cursorHandle and EditPopup.

Previously, these positions were calculated using QtEditText
coordinates, which worked correctly because the QtEditText size matched
the QtWindow size. However, after the mentioned commit, the QtEditText
size no longer reflects the window size. In this case, we need to use
the parent View for calculations.

This adjustment was already made for the single cursorHandle.

This commit also updates the positioning of selection handles and the EditPopup.

Fixes: QTBUG-132589
Change-Id: I861292e363452d487284e3f603fe03a21a334aa4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 5bd26fda7a3f0a509a64847b58b916830ebc2d0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 941434e81fe073d55607267ea839025282413900)
2025-02-10 21:26:32 +00:00
David Boddie 09d560b876 doc: Fix broken links and incorrect information
ReadOnly was used in places where ReadWrite was the correct value.

Change-Id: I26a2f0de55665ac015fe269e8e5f0d23a2f00e5f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4dcff4ed6d24e6aa061e145bb9de9ff93351a2b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a8fe95f0eab7facc274327a54ca88d4b139eb385)
2025-02-10 21:26:29 +00:00
Frédéric Lefebvre 442614e8fb Tst_QGestureRecognizer::panGesture set FramelessWindowHint
tst_QGestureRecognizer::panGesture() is flaky as sometimes the gesture
event is being sent before the frame and position has had time to
update. The event then starts in the frame and is not received by the
widget.

Set FramelessWindowHint flag to the widget, to remove the need of
updating its frame position and position.

Fix flakiness on Opensuse 15

Pick-to: 6.5
Change-Id: Id88510a91e3ed0d5ff92fdc31422503744448b3e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit fc0e788d029beac251fda40650154fc6865e1649)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ea55328741c6a1aceb7b1a456c00d976be940a42)
2025-02-10 21:26:25 +00:00
Tor Arne Vestbø 514f6f04c2 Document QSurfaceFormat::ColorSpace deprecation
Pick-to: 6.5
Change-Id: I894316d0b3df703e5fd07a1c18f579992215e621
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ca250a637297042d39c3e799a1e25ec3168d6f15)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0ff3a84bc36ada9d88f84ee2bca8097c72903544)
2025-02-10 17:52:26 +00:00
Tor Arne Vestbø b07a7bda97 qmake: Find Apple ID via IDEProvisioningTeamByIdentifier for Xcode 16.2
The format of the Xcode preferences has changed, so we need to account
for the new format when looking up the default development team.

The account identifier (previously an email address) was not used by
any consumers of the provisioningTeams() function, so it was left out.

Pick-to: 6.5
Change-Id: I81a400000615594336e14c95db86ffa71a5c5ff9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 380a9fdc872e14e537f3e148c7a1e72be5face2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 761d516fd4ee10fe943a54743795a91c1d9d3acc)
2025-02-10 17:52:26 +00:00
Tor Arne Vestbø 1e6ba42f12 cmake: Find Apple ID via IDEProvisioningTeamByIdentifier for Xcode 16.2
The format of the Xcode preferences has changed, so we need to account
for the new format when looking up the default development team.

Pick-to: 6.5
Change-Id: Ib34c2e5245c13db4d81218a5a2460417e4fc6347
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 469e4237cf32d27609661132727555490086750b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8f837f6e6f4a9d5c118514dcc80894406e9b5dcb)
2025-02-10 17:52:26 +00:00
Tor Arne Vestbø b750a02916 cmake: Add option to pass additional arguments to _qt_internal_plist_buddy
Pick-to: 6.5
Change-Id: Icbbfcb7fffa97370c3cdf7440e801eea60de84f0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ab4aac7bf137083a401186029fe70ff00137f279)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5127aef0bbabb1b5e65c33a49228f3bfe43fea4a)
2025-02-10 17:52:25 +00:00
Tor Arne Vestbø b0fd6b4b8b cmake: Rename _qt_internal_find_ios_development_team_id
As well as the _qt_internal_apple_development_team_id_computed
property.

It's used for macOS as well, so use `apple` infix instead of `ios`.

Pick-to: 6.5
Change-Id: I7932166d094a14ac32cce95e6c9fcbfa44bb97b4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d688c73e083cecc9b9478f09b202b66b92c87e4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6a23dfba362e683f94a34d0b7f5e2bfa6002370f)
2025-02-10 17:52:25 +00:00
Mårten Nordheim 5d78dd12ba Unicode tool: use unsigned values for the bitfields
On MSVC the values stored end up as negative.

Conflicts resolved in cherry-pick:
  - The emoji-data code didn't exist in this branch

Task-number: QTBUG-132902
Pick-to: 6.5
Change-Id: I963c57c34479041911c1364a1100d04998bdfaed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 62685375a2d71fa34015faac76f03e709e4217c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 09b06a740dd5e2ea08b49f76a2c384e6eb6fa6c6)
2025-02-10 15:33:50 +00:00
Wladimir Leuschner 45cef5b85b QWindows11Style: Add left margins to Radio/Checkbox indicator
On 150% DPI scaling, the Radio/Checkbox indicators were clipped. This
patch adds an extra margin to the left to avoid this clipping.

Fixes: QTBUG-133117
Change-Id: I2e0186cbdad12481922de5ddf00f50daeb94bb37
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3d45d22b536cd5fa074f6de4d02b1fd049e6b220)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9f7437fb858cc69fcd50b32809e9bd83355d0947)
2025-02-10 11:15:47 +00:00
Topi Reinio d9801f4453 Doc: Clean up output for tabbed content macro
Insert line breaks in the content the \tab macro expands to. This
produces nicer-looking html and also fixes an issue related to
the post-processing done to the generated files.

Fixes: QTWEBSITE-1202
Change-Id: If4e7f7242f8687ef84ad715744653c4167cf907f
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 88e4e952d73db9bc442593a96c88ca22ba7ab673)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f490b4de058d7fa91b42cf48524131b965524177)
2025-02-10 11:15:47 +00:00
Edward Welbourne 9c59689de4 Modernise tst_QTextStream::manipulators() and add two new data rows
It was using int for two flag columns; we can pass the relevant flag
types now, and we get better type-checking by doing so. Expand the
integral numeric column from int to qlonglong, since that's the type
we actually end up with by the time we're asking QLocale to do our
formatting for us. Add test-cases for things we've lately noticed
aren't right, notably including the min-qlonglong test (which passes
because compilers handle the UB straightforwardly), that needed the
integral numeric column's expansion. Sign-handling for negative values
in hex fails; a later commit shall fix and remove the QEXPECT_FAIL().

Pick-to: 6.5 5.15
Task-number: QTBUG-133269
Change-Id: I39c5339b144b40a30886d8253fa464828ed87629
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 5a230596c8c1f63e662ce17e094e2ae187066d6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 055b5a83b4b1fa224b075cbc35490e8e2db2225c)
2025-02-10 08:43:11 +00:00
Even Oscar Andersen b6faeb8142 wasm: Truncate input field length to 1px, fix object selection
Having the input field length too wide causes the view to scroll
to contain it. Since it is not visible, setting it to 1px width and
height should work.

Further, input field contents where set on the showInputPanel
call. At this point in time we do not necessarily have an updated
focus object. Hence the input contents is now set on the
setFocusObject call.

Ignore input on showInputPanel/hideInputPanel. This reflects
the current design where showInputPanel do not act unless
inputMethodAccepted(), and hideInputPanel do not act if
m_focusObject.

Still hideInputPanel used to set m_usingTextInput to false,
this behavior is not kept.

Fixes: QTBUG-132057
Change-Id: I2d7088def8060df267c5da9e045824decd913faa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 7dd94d74e4497647ff62c85460643487baf372bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 43eb0dbd38e74158e7eb36a28cb416b357445d6b)
2025-02-09 10:05:20 +00:00
Christian Ehrlicher 129e8b429b SQLite: Update SQLite to v3.49.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.49.0

Pick-to: 6.5 5.15
Task-number: QTBUG-132862
Change-Id: I0978f2d3bd6aab71cded77668912dec4cb569a68
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit eb03784510c037a377c576b298b9b2fccd16759f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b2191e4450174eb101cf124ca0e7661fb4e71f29)
2025-02-08 13:53:39 +00:00
Eskil Abrahamsen Blomfeldt 4a935a192e Improve hinted rendering quality on Windows
When rendering hinted text on Windows with DirectWrite, the goal was
to keep the rendering and metrics as close to GDI as possible,
minimizing the impact of changing the default font backend.

Therefore, the DWRITE_RENDERING_MODE_GDI_CLASSIC was always preferred
when hinting was on.

However, DWRITE_RENDERING_MODE_GDI_CLASSIC only applies antialiasing
in the horizontal direction, but GDI applies vertical antialiasing
as well. The result is that text will look more aliased with
DirectWrite than it did with GDI, which arguably looks ugly
especially at large sizes and can be perceived as a regression.

Microsoft documentation recommends using symmetric antialiasing
when the pixel size exceeds 16, so this patch enables
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC for fonts larger than
16px regardless of whether hinting is on.

It's worth noting that for fonts with heavy hinting, such as
Times New Roman, the rendering using
DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC is different from
GDI, although more similar to Freetype. However, the impact
of not having vertical antialiasing is worse and as native apps
are moving towards using DirectWrite, the GDI rendering is not
going to be the definition of a "native" look anymore.

A second thing to note in this patch is that we always pass in false
for the useGdiNatural argument in GetGdiCompatibleGlyphMetrics().
According to the documentation, we should be passing in true for text
rendered with CLEARTYPE_NATURAL_QUALITY. However, doing this causes
wider kerning in certain cases. Since the tighter kerning matches
the layouts we get in native apps, as well as when using Freetype,
I've chosen to pass false for now, to be consistent.

This change also adds a manual test which can be used to switch
between DirectWrite, GDI and Freetype rendering on Windows, so
that it's easy to compare.

[ChangeLog][Windows] Improved hinted text rendering at font sizes
larger than 16px.

Fixes: QTBUG-131946
Change-Id: Iebbe5c7affe7df6266ade6b161c31bde3d2caa84
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 407a98d94fb05780f30e77463fb2bd535041a044)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e59362678880cf89a2e7870365a030f0b9c254a7)
2025-02-08 13:53:37 +00:00
David Redondo 752f16522d QScreen: Add a note to use QWindow::devicePixelRatio if possible
Like QGuiApplication does as well. Also add a note that screen and
window DPR can be different.

Change-Id: I1a24cf7f11e945187da9dce4421039350e811997
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 97049278443860d3dd1b1efd20d1f7dabaf72a35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 281c45452b93b38d50b4c43a743017c5a1aa7cd1)
Reviewed-by: David Redondo <qt@david-redondo.de>
2025-02-08 13:53:35 +00:00
Mårten Nordheim 3186048ffe QUrl: sort idn whitelist
We look it up with a binary search, so it needs to be sorted.

Pick-to: 6.5
Change-Id: I0aa25e6ff9722372c0a09f2dce9f9c839fedf00e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 382a7d006b52faa08b84e56d97cc6c216925a43e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 00ddc174b49ef4ed0e2384a2377df55d9201ad9f)
2025-02-08 13:53:22 +00:00
Morten Sørvig e66324455a wasm: don't give native focus to non-focus windows
isActive() may return true if a (transient) parent window
is active (has focus).

Compare against QGuiApplication::focusWindow() instead.

Fixes: QTBUG-129233
Change-Id: I834a5814a5db161bdea2ba3524d1010e0c0e3e6e
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
(cherry picked from commit 31762e2e704673057a292ac59977b501919f2450)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 55148eb94d314187986492214415e0f0472bbb26)
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2025-02-08 14:53:20 +01:00
Assam Boudjelthia 6e2ae09b51 Android: fix Q_JNI_NATIVE_METHOD() with namespace builds
Prepend the Qt namespace to the JNI method under Q_JNI_NATIVE_METHOD.

Fixes: QTBUG-132490
Change-Id: I73bb8119a0d760e8f7ce82e70ced2684bec76eb0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d1694476271346d13ac8ca3138328d295bf403b4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d31a94a70a4ad5c72673025ff6a8a2c4a55cd667)
2025-02-08 13:53:18 +00:00
Alexandru Croitor 248f20daca CMake: Provide a way to find all available Qt module packages
A project might want to find_package all available (installed) Qt CMake
packages that contain qt modules.

A use case might be a qml app that needs to link to all of Qt, and
support showing qml files that can load any Qt qml module.

Add a new Qt6 COMPONENT called ALL_QT_MODULES.

It can be used like this:
  find_package(Qt6 COMPONENTS ALL_QT_MODULES).

The implementation will find all installed Qt modules by globbing over
all json files installed in $qt/modules dir, and treat the file names
as package names.

It will then tell Qt6 to find_package each of those packages.

Change-Id: I89242307438576a0cbb3cdca80a9cb72818b6035
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit c7027880aa746a01362ac12491910479d7fc67e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 54cb92d58b33a7a8cc387bc84643e5d55e84b88c)
2025-02-08 14:53:16 +01:00
Leena Miettinen 4e02fec93c Doc: Update \externalpage entries for Qt Creator documentation
- The docs were restructured in v. 13.0 and 14.0, so most headings
  changed, some topics were removed and lots of topics were added
- Use the macro \QC
- Fix the broken links in qtbase

Fixes: QTBUG-132516
Change-Id: Ic173a3e9a1c80322162c3feb277098de2a9f1cc6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 7419c9f77c0b56cc98d5b44f1fd89da6bca8b148)
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2025-02-08 13:53:15 +00:00
Marc Mutz 410978efdb QStringBuilder: remove an unneeded cast
memcpy() takes void*, not char*, so the cast from QChar* to char* is
not necessary (and potentially harmful).

Amends the start of the public history.

Pick-to: 6.5
Change-Id: I7b7178290bd30d93ed9e64b6b84294d0f7576c80
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 7206f6a39d298ed9c94bccf7bdc57498fa73ac36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0e5e850691250144eb9bd5a3f88c7e2f3264e940)
2025-02-08 10:21:08 +00:00
Marc Mutz 382c991da2 tst_QTextStream::stillOpenWhenAtEnd(): use QTRY_VERIFY()
The test is flaky every now and then on the CI, so increase the timeout from
5s to 20s (a previous TRY_VERIFY precheck reported just shy of 10s waiting
time, doubling should be™ sufficient).

Amends the start of the public history.

Pick-to: 6.5 6.2 5.15
Change-Id: I8e64bf8ac1576c0ac71790a03936635016b3b2b7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 40e65f029341a01e16dc88871eb7b24979aea9bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 267acbc534095b17b139fb819ee854baf3c0f24b)
2025-02-08 10:21:03 +00:00
Pavel Dubsky 9fffaab948 Move UUID definitions out of Qt namespace
When UUID definitions are placed within Qt namespace MinGW build fails because specializations of struct __mingw_uuidof_s are now defined in a different namespace.

Fixes: QTBUG-133516
Pick-to: 6.5
Change-Id: I49270aa2a892d407675dab7b90d3929d120c5224
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
(cherry picked from commit 84b7cef13913139b2ed7e506ace0fa6b97269829)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 775d56f01d39c438c48397bdd571a607fb03abc3)
2025-02-08 08:08:51 +00:00
Liang Qi bcc5ce1057 ibus: use logging category for im debug
Pick-to: 6.5
Change-Id: I5397f1fb14273b77833979d3e66056a7110fd2b0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Inho Lee <inho.lee@qt.io>
(cherry picked from commit 5c9fd486ae82056614bdb9e685c825b586bb9809)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 4be258fd1364dca061cd9a8c6a0c06e51b8fe6f8)
2025-02-08 08:08:50 +00:00
Laszlo Agocs fd78ec9878 rhi: d3d12: Fix crash in readbacks
Amends 73405890b8911dd1a58120665ce63a38281c6ce4. The patch here
does the same for D3D12 as that previous one did for the Vulkan
backend.

Others, like D3D11, are not effected because the loop logic there
does not branch.

Fixes: QTBUG-133405
Change-Id: I88ac7c841dc0c28fc3f6b37c3402315b52de0a66
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 68e48ac60a9681887999e31f6dff622eb81bdb7d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 987ff07a85e7d9676e10e1792a1749d290d7ffa5)
2025-02-08 08:08:47 +00:00
Andrew Forrest a3203542dc Android: Fix mouse button processing
Fixes clicking UI elements with a mouse on Android.

8d8cbe87e2 introduced changes to support
mouse buttons other than Qt::LeftButton, but the release always looked
like no buttons changed, nor were they tracked (m_buttons is always
Qt::NoButton). Qt was not notified of mouse up, so nothing was clickable.

Now all mouse events go through sendMouseButtonEvents, and the last seen
button state is tracked for every event. If a mouse up with no buttons
occurs, the last seen set of buttons is used instead, so Qt correctly
handles the event. Also adds the mouse button state information to
mouse move events from Android, so the workaround for delivering
Qt::LeftButton when a window is tracking a move while a button is
pressed has been removed.

Tested on a Samsung A1 with a Bluetooth mouse.

Fixes: QTBUG-132700
Fixes: QTBUG-130297
Change-Id: I241282c2915d7e6cf99db7f0bc1ad2d541349077
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d908e043984dcfed3aa80e30cd1cafacd13b644d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 65e9eca63b3f522065018777ac07c5a71c08ff37)
2025-02-07 21:17:16 +00:00
Ivan Solovev 499a66beec [docs] Add three-way comparison overview
Task-number: QTBUG-128837
Change-Id: I64ae12994f8a48ee5f4e48ca6ed7f5980476f2aa
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 737c87b2b21e30abf5e51126fd8ff4e45521144e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 624784a729709a339c5a4d90fae982c4b5826652)
2025-02-07 16:56:49 +00:00
Giuseppe D'Angelo db6f3331d9 QVLA*: honor the RO5
The various base classes that abstract away template-independent parts
of QVLA have protected destructors to prevent slicing. Re-add the
special 5 (using the macro) and a defaulted default constructor.

Pick-to: 6.5
Change-Id: I60f036eafc808862a1abee72fd53023dd99b4cc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c10072895d1061e258d23f3cc2a9050de5236a46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5ca7ad268a3b2fb68c9505eee888aa62c2aa6189)
2025-02-07 14:25:25 +00:00
Giuseppe D'Angelo 7e2ab774bd QtGlobal: introduce a helper macro for declaring the RO5 SMFs as defaulted
If a class honors the RO0 we usually just leave a comment in the class'
body, and don't explicitly redeclare any of the RO5 special member
functions.

In some cases we may need to redeclare (some of) them. The main use-case
so far is to declare a protected destructor for a base class that is
not polymorphic, in order to prevent slicing; the compiler-provided
destructor is always public.

We can easily declare and default such a protected destructor, but that
comes with the problem that now we're violating the RO5 (as far as C++
is concerned, declaring a SMF counts towards the RO5, even if it's
immediately defaulted).

Specifically: by declaring the destructor, the class loses the
compiler-generated move operations, and the copy operations are
generated but deprecated. Clang >= 18 warns about this.

In such a scenario we *must* redeclare all five SMFs... and default them
all. This is boilerplate, therefore I'm adding a macro to streamline it.

Apply the new macro to a couple of cases were manual refactoring has
already been done.

Pick-to: 6.5
Change-Id: I5dc0ff9770621fbec0b1057c164d0623f901e3e9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fcb57391f73d36914e10ba964dbd9b01fe6f3af2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 711b86fa2471cb294d02b2ace89204b22fef0120)
2025-02-07 14:25:19 +00:00
Thiago Macieira 167af1611f QTest: fix bug dereferencing nullptr in toString<std::nullptr_t>()
Amends commit 0756cc1eae.

The generic instantiation of this function had a std::nullptr_t *
parameter, but callers had special code to pass a nullptr there because
we never needed a value of a nullptr (it's always a null pointer). For
example, in compare_ptr_helper():

        auto lhsFormatter = Internal::pointerToString<QObject>;
        auto rhsFormatter = Internal::genericToString<std::nullptr_t>;
        return compare_helper(t1 == nullptr, "Compared QObject pointers are not the same",
                              const_cast<const QObject *>(t1), nullptr,
                              lhsFormatter, rhsFormatter, actual, expected, file, line);

But in debug mode, some compilers did emit a load from this memory
location, causing a crash. So we just specialize this function to avoid
such.

We had a test for this... except it was never reached because the
earlier QCOMPARE() had already failed. For the test, this amends
commit ae02188233.

Conflict resolution for 6.8: regenerated the expected output for
tst_selftest.

Fixes: QTBUG-133330
Change-Id: I2cd3bb475788431c6a0dfffd28e730e8b613e033
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit e19b633c468123526660b40ae110f46090682c76)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 042e713cb7800f97c10d2d75a717ceb3e41ab29a)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-02-05 21:13:47 +01:00
Ivan Solovev 5762b152f9 tst_selftest: do not use -[no]throwon{fail,skip}
This commit partially reverts fde57300ab.
The reason for the revert is that tst_selftest has some tests that are
expected to continue the execution after a failure (see the follow-up
commit for one example of such test).

This patch is 6.8-only, because in 6.9 and dev the same is done by
ad568b859a6f0a16dd243f1ca2cdc19571337da3, which could not be directly
cherry-picked to 6.8 because it also reverts the testlib support for
command-line arguments.

Change-Id: Ie3fd2f755e69d05d359cdc4d1c57267ca2edb339
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-02-05 21:13:46 +01:00