Commit Graph

55315 Commits

Author SHA1 Message Date
Tarja Sundqvist 017d80e12f Merge tag 'v6.2.10-lts' into tqtc/lts-6.2-opensource
Qt 6.2.10-lts release

Change-Id: I3baf877fbd9f382c35c048d3183a635449becdce
2024-10-04 11:39:44 +03:00
Tarja Sundqvist c6ab40490d Revert "Update public suffix list"
This reverts commit b3d677019f.
The revert is needed to get the merge of tqtc/lts-6.2.10 succeed
without conflicts.

Change-Id: Id70082ff9fba8464e6f982cb93c27df30800d81a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-10-04 07:30:44 +00:00
Tarja Sundqvist c600c53360 Revert "Upgrade Harfbuzz to 7.3.0"
This reverts commit 3366abe3fb.
The revert is needed to get the merge of tqtc/lts-6.2.10 succeed
without conflicts.

Change-Id: Ib51dcc52bcf6f2dcefb6e11e0a8bcb26d5de56dd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-10-04 10:30:43 +03:00
Tarja Sundqvist f131837a9f Merge remote-tracking branch 'origin/tqtc/lts-6.2.9' into tqtc/lts-6.2-opensource
Change-Id: I2124d9528493915a273d2fc23a7660ebc75884c4
2024-06-02 22:34:32 +03:00
Tarja Sundqvist 4c1c38dede Replace the commercial license header with LGPL header
The commercial license header was in the commit
ffb9dee1b0. It's now
replaced with an LGPL header (based on the used SPDX license
in the original file on the dev branch & SPDX license
mapping table in QTBUG-67283).

Change-Id: Ic8fa801e031ecb64a8209012838df740933b5e02
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
2024-03-26 14:18:49 +02:00
Tarja Sundqvist 67934c1038 Merge remote-tracking branch 'origin/tqtc/lts-6.2.8' into tqtc/lts-6.2-opensource
Conflicts solved in a file:
	src/corelib/io/qstandardpaths_android.cpp

Change-Id: Ie8cef36c1379679ca358df50c56b3c25aa15c5d6
2024-01-22 22:31:51 +02:00
Tarja Sundqvist 694575a59b Update the LGPL license header
The LGPL license header was added into two files
that were missing it. These files were added to
Qt 6.2.7 in 29e56fe37e.

Change-Id: Ie8057040bea94ab79539a21270ba692a18a2598d
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
2023-10-31 15:57:41 +03:00
Tarja Sundqvist 8a5f6c7f81 Merge remote-tracking branch 'origin/tqtc/lts-6.2.7' into tqtc/lts-6.2-opensource
Change-Id: Ie70d33341cccaaa69968dc8d1337ec27d7895127
2023-10-03 13:47:19 +03:00
Marc Mutz 8d7d8b9bbc Update public suffix list
Version 1a4824549b093abc3077205ae5386ed57f73806d, fetched on
2023-09-20.

Fixes: QTBUG-117138
Change-Id: If288d7fce714384a0132261303de31ad2299c239
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
(cherry picked from commit dee68587d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 99aa3d5ad1)
(cherry picked from commit 1e1b4c5a59)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 733bcd21c2)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-26 13:11:44 +03:00
Marc Mutz 05681e2fac qurltlds_p.h: support easier automatic updates
Move the maintainer comment out of QT_BEGIN/END_NAMESPACE, so that
these two macros can then be used by a script to replace everything
in-between.

Task-number: QTBUG-117138
Change-Id: I3074849b9cb699dcef7fd50d563d969a190953b2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-25 10:42:09 +00:00
Andy Shaw a192b38f7c SQLite: Update SQLite to v3.43.1
[ChangeLog][Third-Party Code] Updated SQLite to v3.43.1

Fixes: QTBUG-117139
Change-Id: Id4f7d55adb317f009613245510c4eb26678ddc7a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4583d808ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 406ad89a3b)
(cherry picked from commit def88ec7fa)
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 4787d69637)
(cherry picked from commit 579e5474cd)
2023-09-23 16:53:38 +00:00
Eskil Abrahamsen Blomfeldt d40824e463 Upgrade to Freetype 2.13.2
Task-number: QTBUG-117135
Change-Id: I2485cf286f590eccee9c4be4bb19559631288fd5
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
(cherry picked from commit 5641a5e1e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b2e888dc81)
(cherry picked from commit 0449c4b4ea)
(cherry picked from commit 46f067e51a)
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-09-22 10:34:31 +00:00
Eskil Abrahamsen Blomfeldt 0e869c598f Upgrade Harfbuzz to version 8.2.0
Task-number: QTBUG-117136
Change-Id: I910c8bff2fe521aa02929b9000fa7f38192d1a51
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 08134e458d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5a6d960018)
(cherry picked from commit 27aeaf0108)
(cherry picked from commit a7dc536786)
2023-09-21 17:31:49 +00:00
Axel Spoerl 4ad98906e9 tst_QSslSocket_onDemandCertificates_member: Blacklist Windows & debug
The test function occasionally can fail on CI/Windows, when a
certificate update on www.qt.io requires installing a new root
certificate on the test VM.

This patch blacklists the test class (which has only one test function)
on Windows. It adds diagnostic output, so future failure reasons can
be established from CI artifacts.

Task-number: QTBUG-63481
Change-Id: If686d006f379fe6dbfb0d11d80b8455f72fdbb09
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7350088ab7)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2ce584cf5a)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2023-09-20 09:38:12 +00:00
Tor Arne Vestbø 47a24db40f qmake: Don't error out if QMAKE_DEFAULT_LIBDIRS is empty on macOS
The new linker in Xcode 15 doesn't provide any default linker or
framework paths when requested via -v, but still seems to use the
default paths documented in the ld man page.

We trust that linker will do the right thing, even if we don't
know of its default linker paths.

We also need to opt out of the default fallback logic to
set the libdirs to /lib and /usr/lib.

This may result in UnixMakefileGenerator::findLibraries finding
different libraries than expected, if additional paths are
passed with -L, which will then take precedence for qmake,
even if the linker itself will use the library from the
SDK's default paths. This should hopefully not be an issue
in practice, as we don't turn -lFoo into absolute paths in
qmake, so the only risk is that we're picking up the wrong
prl files and adding additional dependencies that the lib
in the SDK doesn't have.

Change-Id: I2347b26e2df0828471373b0e15b8c9089274c65d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit cdf64b0e47)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-19 14:43:11 +02:00
Eskil Abrahamsen Blomfeldt 863419667f Fix crash when reading corrupt font data
When loading the font data, we had some unprotected reads. To harden
this, we check everything against the length of the font data
before reading.

[ChangeLog][QtGui][Windows] Fixed a possible crash that could happen
when loading corrupted font data.

Fixes: QTBUG-116773
Pick-to: 5.15
Change-Id: I156df3b8833c9ed785fcc690821a7a74d9a51126
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 9fe47cf2e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d0ed5db781)
(cherry picked from commit 5121ffc21b)
2023-09-18 07:32:38 +00:00
Giuseppe D'Angelo 80ff8c87ce QWindowsFontDatabase: fix a data race
QRawFont::loadFromData can be called from any thread. It calls into
QPlatformFontDatabase::fontEngine. The code path may end up creating a
UniqueFontData and storing it a QWindowsFontDatabase member (a QMap).

Two threads calling loadFromData (on different QRawFont objects)
will therefore race on the mutation of the map.

Add the missing mutex protection.

Change-Id: Ib38c2b3539679c820d997a6548e4b397cbc2bb73
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit a1b55b1360)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 018d273557)
(cherry picked from commit 120227d025)
2023-09-15 09:17:51 +00:00
Giuseppe D'Angelo 4a8f8af2f0 QWindowsFontDatabase: avoid multiple map lookups
Use the iterator-based API, and avoid a quadruple (!) lookup into a
QMap.

I'm aggressively cherry-picking to avoid merge clashes with an upcoming
fix.

Change-Id: I05968f4aec9e42f84f909a1103e43ba323a9544f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2bc475f94e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 7a705e9c60)
(cherry picked from commit db8551a796)
2023-09-15 09:17:51 +00:00
Timur Pocheptsov 074e32eaef tst_QSslSocket: skip tests requiring TLS v 1.0 downgrade
If OpenSSL version is 3.1.1 or above - this version moved the protocol
under security level 0, but the default one is 1.

Fixes: QTBUG-116166
Change-Id: Iaabb2cf33e2a9f280d6167233ee16080dee808b0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 6d6d22b65d)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-15 07:09:14 +00:00
MohammadHossein Qanbari 1ac23bf157 doc: Remove QSettings' paths for embedded linux
Embedded Linux is just Linux nowadays.

Fixes: QTBUG-116715
Change-Id: I1f64d27550db6f711c7f1f578e85cad12d0973aa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
(cherry picked from commit d8b7c03cc5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-14 08:58:39 +00:00
Kai Köhne 94c3042300 Doc: Fix documented default for QCalendarWidget maximumDate, minimumDate
The default minimum date and maximum date for QCalendarWidget are not
the 'earliest and last dates' that QDate class can handle. Instead,
minimumDate is initialized to November 25, 4714 BCE (first Julian day),
and maximumDate to December 31, 9999 CE.

Change-Id: Ice9289853a7e825ff2b31567efb81cdfb7d678a1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 9937181159)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-13 07:33:15 +00:00
Joerg Bornemann 3dbedea8fc CMake: Fix build with CMake 3.28 on macOS
FindWrapOpenGL.cmake assumed that IMPORTED_LOCATION is the absolute path
of the library within the framework. That's not the case with CMake 3.28
anymore. There, IMPORTED_LOCATION is the absolute path of the framework
directory.

The relevant upstream CMake change is
6b01a27f901b5eb392955fea322cde44a1b782a3.

Change-Id: I6b702a28318e0978c56dec83c398965aa77ef020
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 0efea8020c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9dbb4a8f81)
(cherry picked from commit b055169f76)
2023-09-13 02:17:28 +00:00
Fabian Kosmale 83bfe979c7 QProperty: Notify observers even when dependency is gone
Problem description:
--------------------
Assume we have two properties, P1 and P2. Assume further that we assign
a binding to P2, so that it depends on P1. Let the binding additionally
capture some (non-QProperty) boolean, and only create the dependency to
P1 if the boolean is true.

The state afterwards is
P1:[p1vaue|firstObserver]
                      |
                      |
                      v
                ---[p2binding]
	       /
P2:[p2value|binding]

If the boolean is set to false, and P1 changes its value, we still
correctly re-evaluate the binding and update P2's value. However, during
binding evaluation we will notice that there is no further dependency
from P2 on P1, and remove its observer.

The state afterwards is
P1:[p1vaue|firstObserver=nullptr]

                ---[p2binding]
	       /
P2:[p2value|binding]

Then, during the notify phase, we traverse the observer's again,
starting from P1's firstObserver. Given that it is nullptr now, we never
reach P2's binding, and thus won't send a notification from it.

Fix:
----

We store a list of all visited binding-observers (in a QVarLengthArray,
to avoid allocations as long as possible). After the binding evaluation
phase, we then use that list to send notifications from every binding
that we visited. As we already have a list of all bindings, we no longer
need to recurse on binding-observes during the notification process;
instead, we only need to deal with static callbacks and ChangeHandlers.

The pre-existing notification logic is still kept for the grouped update
case, where we already have a list of all delayed properties, and should
therefore not encounter the same issue. Unifying its codepath with the
existing logic is left as an exercise for a later patch.

Fixes: QTBUG-105204
Task-number: QTBUG-104982
Change-Id: I2951f7d9597f4da0b8560a64dfb834f7ad86e757
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit f1b1773d0a)
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-12 15:48:12 +02:00
Bartlomiej Moskal 41eebd4778 Android: Fix wrong position of EditPopupMenu
When Edit Popup Menu was not shown, the size of EditContextView was
wrongly returned. That is why the popup appeared in the wrong position
and then "jumped" to the right one.

To get correct values even when Popup is invisible, size should be
calculated manually by getting height/width of all visible buttons (with
getMeasuredHeight/getMeasuredWidth[0]) and paddings of EditContextView.

[0]https://developer.android.com/reference/android/view/View#getMeasuredWidth()

Fixes: QTBUG-115632
Change-Id: I5f6abffab1a1e836c59a922ffa727d893ca9820f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 51d331b13b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-12 08:40:48 +00:00
Eskil Abrahamsen Blomfeldt 4bc95ebf50 Update to Harfbuzz 8.1.1
Change-Id: I886bc7d385e62ff0c9546c18bb7bb9273ef1cbd1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9266b6d091)
2023-09-08 20:13:28 +02:00
Marc Mutz 33e52d85f3 tst_QHashFunctions: fix std::pair test to use QFETCH_GLOBAL seeds
Because the local `seed` variable shadowed the member one, this test
was run for each QFETCH_GLOBAL with the same data and seed. That
doesn't make sense, so make the test use the member variable `seed`,
as all other tests already do.

Since zero is one of the seeds coming from QFETCH_GLOBAL, drop the
seedless calls to qHash(), too.

Amends 64bfc927b0.

Change-Id: I1e22ec0b38341264bcf2d5c26146cbbcab6e0749
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9c63667d01)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-08 18:13:28 +00:00
Marc Mutz 896c405141 tst_QHashFunctions: test with actual 64-bit seeds
The old code only tested with seed = 0 and seed = 1045982819, the
latter being a "random number", which, however, fits into
32-bits. Since Qt 6.0 increased the seed from uint to size_t, amend
the test to actually test a seed value with some of the upper half of
bits set, too, also in 64-bit mode.

While we're at it, also test with each seed's bits flipped for extra
coverage.

Remove a static assertion that prevented testing seeds with the MSB
set.

Change-Id: I5ed6ffb5cabaaead0eb9c01f994d15dcbc622509
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 8ca319a172)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-08 18:13:28 +00:00
Ivan Solovev ffef3f47d1 QCborValue: add benchmark for operator[]
In order to test the impact of migration to QASV.

Task-number: QTBUG-101707
Change-Id: I17f84ca98fc87d89bb4cd6ad98c8a12aecd315ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 516d828f24)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-08 08:19:47 +00:00
Kai Köhne 3fe5ac02a2 Mark linux_perf_event with GPL-2.0-only
"GPL-2.0" as a SPDX identifier is deprecated in SPDX 3. Use
the more explicit GPL-2.0-only instead.

Change-Id: Ie543135ad1d73205f7a94db140189f5132098ea2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 8550d60aca)
2023-09-06 21:19:44 +02:00
Volker Hilsheimer 92057f7f29 QLineEdit: ignore key release events
Amends 55fe46fd58. Before that change,
key release events were ignored as the QLineEdit::event reimplementation
continued to call QWidget::event, and as QLineEdit didn't override
keyReleaseEvent, the default implementation in QWidget got called to
ignore the event.

Restore that behavior by explicitly calling the QWidget implementation
after updating QLineEdit-specific states, and add a test case.

Fixes: QTBUG-114654
Change-Id: Ic8aa35a1c915b446aece47aaf03ef5cf1884b936
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 8afe4faf29)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-06 22:19:44 +03:00
Dennis Oberst 37bc7eb5db Update bundled zlib to version 1.3
zlib 1.3 has been available since August 18, 2023.

Version 1.3 now defines the following:

 #  define crc32_combine_gen     z_crc32_combine_gen
 #  define crc32_combine_gen64   z_crc32_combine_gen64
 #  define crc32_combine_op      z_crc32_combine_op

We patched those in manually with qtpatches.diff, so we update it to
reflect these changes.

Updated the diff with 'git diff --relative > qtpatches.diff' from within
the 3rdparty/zlib directory.

Since updating zlib always requires some manual intervention add a
minimal guide that will be printed on using import_from_zlib_tarball.sh.

As a drive-by fix an error in import_from_zlib_tarball.sh where passing
in a path already containing a backslash as:

 import_from_zlib_tarball.sh zlib-1.x/ ./

would append another backshlash to that path (zlib-1.x//). Furthermore
add the '-v' flag to the copy command to make it more verbose.

[ChangeLog][Third-Party Code] zlib was updated to version 1.3.

Task-number: QTBUG-116236
Change-Id: Ib7c8698035e1e049b455308c5774fcaf88b7622a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 3652cdf6c7)
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-09-06 19:19:44 +00:00
Marc Mutz cdc726a85f Clean up inline keyword use in qstring.h
If an inline member function is defined outside of its class' body,
its declaration must have the inline keyword. Otherwise, in certain
situations, MinGW complains like this:

   qstring.h:1118:13: error: 'void QString::clear()' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]

Fix all instances in qstring.h by

- adding the inline keyword where it was missing on the definition
  (except constexpr functions, which are implicitly inline)

- removing the inline keyword from all out-of-class-body definitions

While the latter isn't necessary for fixing the MinGW
warning-turned-error, the churn is warranted: It's enlisting all
platforms' help in checking for inline consistency (by causing
"multiple-definition errors" at link time or "inline function never
defined" at compile time when we get it wrong). If we kept the inline
keyword on the definitions, only MinGW would continue to warn, and only
in some, as of yet not fully understood, situations, so we'd have no
control over when these warnings pop up in user code.

Change-Id: I0ae78f1d8f1fa4eaec0b162ea16013669370eead
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 1c1d7ab486)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-06 13:03:58 +02:00
Kai Köhne 28534332e6 Mark freetype as GPL-2.0-only
GPL-2.0 SPDX identifier is deprecated. Use the more explicit
GPL-2.0-only instead. Also, in SPDX expressions AND and OR
need to be all uppercase.

Change-Id: I0875cf3b9b2020f69e3318d5ff314988a3992409
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0b3b1ab26c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-06 09:19:52 +00:00
Liang Qi 78f6289718 widget: set WA_X11NetWmWindowType* after xcb window was created
This amends 17d68c4fc3.

Fixes: QTBUG-116696
Task-number: QTBUG-39887
Change-Id: Idf385bcbeb630ddfc51b39b2af35da3ab94b07c0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 29b076d614)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-05 23:14:07 +00:00
Volker Hilsheimer 061a83afce QPrintDialog on macOS: Don't crash when parent is not a window
The test case is an incomplete version of the test that will be added to
verify the fix for the referenced bug report. The test crashes already
when showing the dialog without this fix.

Task-number: QTBUG-116277
Change-Id: I969a723157f6453b78bafae5cb24a6b37b1eea50
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e73f35d9c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-09-05 21:26:49 +00:00
Axel Spoerl 09ede19959 QAndroidPlatformInputContext: send composition text and cursor jointly
QAndroidPlatformInputContext::focusObjectStopComposing() sends an input
event for each character newly added by the Android virtual keyboard.
It then sends a second input event to notify that the cursor has
advanced to the position after the new character.
The implicit assumption is, that the receiver of the input event does
not change the text.

If e.g. QLineEdit::setText() is called in the QLineEdit::textEdited
slot, the text does change. If the change implies a cursor change,
QLineEdit notifies the platform input context about it.
However, by sending the second input event, QAndroidPlatformContent
returns the cursor back to the position after the last character added
by the virtual keyboard.

This patch joins the composed text and the cursor position into one
single input method event. A new cursor position, set by the receiver
of the input method event, is no longer overridden.
The patch adds test functionality to tst_QLineEdit::setText().

Fixes: QTBUG-115756
Change-Id: I85ffac5d6bab93ccb144be0f5b8083258a270550
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit be3b9b2ab1)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-01 16:47:43 +00:00
Ilya Fedin 4c1b9ee5b0 FileChooser portal: set current_file only when file already exists
According to xdg-desktop-portal documentation, current_file should be set
only when such a file already exists and xdg-desktop-portal-gnome enforces
this by being totally broken when current_file is set to a non-existent path

Change-Id: Ie3c80a7c6fd0cf23eea88ddec2149f5904c63394
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7927b05b2f)
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-09-01 09:56:12 +02:00
Assam Boudjelthia 43148c8a55 Image Gestures Example: use QFileInfo for images file names
The example keeps around image file names only and append
them to the selected dir path, that works fine for file
scheme files, but for Android with content scheme files,
that doesn't work as good because usually the paths are
returned by a provider and managing them manually like
appending a file name to a directory (tree) path might not
work.

This patch retrieves QFileInfo objects and use the absolute
file paths to open any image.

Fixes: QTBUG-116181
Change-Id: I9911a181d92ba0452500398cbe052b9583bd79a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 381612f794)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-31 22:27:05 +00:00
Assam Boudjelthia d705543c20 Android: fix handling of tree content uri with sub-document
Check for the index of last '/' from the non-encoded path.

Amends ea75e34d69.

Change-Id: I3ef5d454a46c711a85fe7ef01ea9d3d93a2d574f
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 4721721f60)
2023-08-30 07:08:12 +00:00
Christian Ehrlicher 16f7681904 QTextFormat: documentation fix
The QTextFormat description refers to setDirection() but this function
does not exist. The correct function name is setLayoutDirection() even
in Qt4.

Change-Id: I2d1f49fba558874b5875d8d93ef61d6208134609
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit fd96e11bb1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 22:18:26 +00:00
Christian Ehrlicher b0a0a0fcfe SQLite: Update SQLite to v3.43.0
[ChangeLog][Third-Party Code] Updated SQLite to v3.43.0

Fixes: QTBUG-116248
Change-Id: I039f572d21a8506faa5e29a48cdc7e40f990d946
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 49e52e8dd6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-28 10:14:00 +00:00
Axel Spoerl ec33e65079 QDockWidgetGroupWindow::adjustFlags() - don't show() empty group window
The method calls show() on a dock widget group window, when the window
flags have changed. When all of its contained, tabbed dock widgets are
programmatically hidden or docked on the main window, an empty group
window is shown.

This patch implements bool hasVisibleDockWidgets(). It returns true, if
at least one of the group window's dockwidget children is not hidden.
It replaces show() by setVisible(), passing the return value of
hasVisibleChildren().

It adapts tst_QDockWidget::floatingTabs() to test the fix.
(Drive-by: remove dead code)

Fixes: QTBUG-115058
Change-Id: Ifb8e2450e91a7c78decc06f592e160631ca2faf5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit e03bc88a80)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-28 07:32:56 +00:00
Eirik Aavitsland 91942a24b4 Update bundled libjpeg-turbo to version 3.0.0
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 3.0.0

Change-Id: I960c4bfdef268eced93317ded814e2c84befa451
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 3498baef76)
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-08-25 23:40:41 +02:00
Eirik Aavitsland ed0b4dc994 Add wrapping build of the bundled libjpeg
Similar to how it is done libpng etc. This is a backport from 6.4: it is a partial cherry-pick of be2745e478.

This prepares for merging the update to version 3.0.0 of libjpeg-turbo, which includes significant building changes.

Change-Id: I7ce0c91c673695bdbc522e125a7d425e799095fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-08-25 18:47:09 +00:00
Ivan Solovev e0540f768e double-conversion: update to 3.3.0
Retrieved from/changelog here:
https://github.com/google/double-conversion/releases/tag/v3.3.0

Task-number: QTBUG-116236
Change-Id: Ifac887dfcb9151fe2bd8b7e3f5dfe763836a9adb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 605412dd19)
2023-08-25 15:37:03 +00:00
Timur Pocheptsov c8bb334332 tst_QDtls: use DTLS v 1.0 test data conditionally
Starting from OpenSSL v 3.1.1 DTLS 1.0 is only available, if the
security level is 0, which is not the case most of the time. So
we consider this version number to be a 'threshold' after which
we don't test v 1.0 anymore.

Task-number: QTBUG-116166
Change-Id: I9763703f36ae742e1d3c7cb17872cf8d0d82ab85
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c1b287c531)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-08-24 15:24:26 +02:00
Axel Spoerl a9fe8dde7a QXmlStreamReader::readNextStartElement() - return false on document end
The method reads the next element in a loop, as long as valid elements
exist. Within the loop, it returns
- false if the end of an element has been reached
- true if a new element has started

When the document end has been reached, the loop continues, until
readNext() returns Invalid. Then, PrematureEndOfDocumentError is launched.

This is wrong, because reading beyond the document end is caused by a
missing return condition in the loop.

=> Treat document end like element end and return false without
reading beyond it.

=> Test correct behavior in tst_QXmlStream::readNextStartElement()

Fixes: QTBUG-25944
Change-Id: I0160b65880756a2be541e9f55dc79557fcb1f09f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ccd8a496cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-22 15:29:57 +00:00
Christian Strømme 267dca3a51 Update to Freetype 2.13.1
The build fix applied to the 2.13.0 update has also been applied to
this update.

This cherry-pick also includes the follow-up patch:
11321384d9

Fixes: QTBUG-115340
Change-Id: I970b560948af3472b222690019a85a79c537b7d9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 0bdd01b7f7)
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-08-22 12:09:45 +02:00
Marc Mutz 058526690d tst_QHashFunctions: use actual seed in consistent() test function
We were only ever testing with a 0 seed, even though the function was
called for all QFETCH_GLOBAL seeds.

Add the seed.

Amends 5e93361888.

Change-Id: I3c78714ad6fb3f94233789dd2c8884d9b157fa76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fa522eb8be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-08-18 21:02:12 +00:00
Mitch Curtis 0d4adaa776 Improve Qt Test documentation regarding skipping/expecting failures
- Mention QEXPECT_FAIL on the best practices page.
- Link to the best practices page from "Chapter 6: Skipping Tests with
QSKIP".
- Add some more links.

Change-Id: I0c9e0adb9fe500791dad44869434cf6ecdcf51a1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 5de991059e)
2023-08-18 18:09:38 +08:00