Commit Graph

16157 Commits (bb10)

Author SHA1 Message Date
Thiago Macieira c07c2d5a52 CBOR/JSON: fix crash when comparing strings with different length
Amends 8e5ce9cd36, which introduced the
QtPrivate::equalStrings() call. At that time, equalStrings() had already
required equal lengths (see 1560e0161a),
so no excuse.

[ChangeLog][QtCore][QCborMap and QJsonObject] Fixed bug that could
result in a crash or failing to find a entry in the map/object with non-
ASCII keys.

Manual conflict resolution for 6.9:
- Port from keyView() to key(), because the former is a 6.10+ feature.

Fixes: QTBUG-133744
Change-Id: I6b0f8b0a2e47d3ef905afffda6c4c079814a0914
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 54daec43a041cb69cff31cbfd1dd0b7127e8ba87)
(cherry picked from commit 8e94b67ba11fecfee134950eaae5c5b29812e82c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit d4a90a3f3013eae4e837fbd2df63d5803f19608a)
2025-03-17 13:10:27 +00:00
Thiago Macieira 8f5e26f51f tst_QUrl: improve toNSURL()/toCFURL() tests
This extends the test with a few more rows, and with delimiters that the
Apple APIs seem to encode differently. Rather, it's QUrl that deviates
slightly from the standard: we keep the delimiters unchanged,
regardless, like browsers do.

Task-number: QTBUG-134073
Pick-to: 6.5
Change-Id: I20a7b66a9959b17597cffffdf3652b9167d00d07
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 31753e722cd441de371be8f1e11b3bf089b187e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6deb5098a10b8b3fdfab0aab51c6bf78c0dce7f4)
2025-03-04 22:21:55 +00:00
Thiago Macieira 52a5ac7690 QUrl: decode square brackets in fromLocalFile()
QUrl has an intentional deviation from RFC 3986 when it comes to those
characters, matching the behavior of major browsers: we distinguish the
forms '[' and ']' from their encoded forms. However, for local files,
they are definitely identical, because there's no such thing as a
percent-encoded file names.

[ChangeLog][QtCore][QUrl] QUrl::fromLocalFile() will now decode the
square bracket characters '[' and ']' to their percent-encoded forms.
This will be visible in calls to toString(), toEncoded(), or the encoded
form of path(). QUrl's comparison operator will consider the old
(created from an encoded URL string) and new forms to be different.

Fixes: QTBUG-134073
Change-Id: I9eae083007103e34f73cfffd59a618069eba0e19
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 5e936b60fc921e21b8153a83113886a1de333b57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit de3cf05b77e595a7cb8700e34b232c5dc0a4e76a)
2025-03-04 22:21:55 +00:00
Christian Ehrlicher 58815d6508 QCssParser: don't allow negative values for cuts in border-image
The spec does not allow this and qDrawBorderPixmap can not handle it.

Pick-to: 6.5
Fixes: QTBUG-107904
Change-Id: I5873dec2312865fb96ccccd3cc2292c6b9e1d4f0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 254fc6a9782b29180cd545e18c34bcaf4cc03a7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 351357c3a07b69cf5cf68b03450a084f8dd0344b)
2025-03-04 19:20:02 +00:00
Milian Wolff 26e3a06aca Add explicit test coverage for QTimezone::utc
Basically this should work exactly the same as constructing the
QUtcTimeZonePrivate directly. Follow-up performance optimizations
should not change any of this behavior.

Pick-to: 6.5 5.15
Change-Id: I2a3e78965f3a553b8b70cb12f7772b9fdfbf7bf7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7a79ce13a93aab724e8943d83fc903c88466d053)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9cba61e5eb7cbbfb197f2b90d33b294e43291065)
2025-03-04 08:51:32 +00:00
Marc Mutz 40b45176b9 tst_QByteArray: check replace() doesn't replace the terminating \0
It doesn't.

Pick-to: 6.5 5.15
Change-Id: Ica3fb2b8a65d0f9d14490ecdcce72eba82258916
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit fff69288781bf946ad645fd781ad51ab48ebcbdc)
(cherry picked from commit 8e2c6a590429892d9fecf9a0ccc7c6a00d6c7b6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-03-01 23:45:32 +00:00
Marc Mutz 7637203f8d tst_QByteArray: check replace() with empty and null needles and haystacks
Some time ago, we spent a lot of time fine-tuning the behavior of
indexOf() and split() w.r.t. matching of empty needles, or in empty
haystacks. Make sure that (QByteArray) replace() is behaving
consistently.

It isn't. Filed QTBUG-134079 to track the issue.

Pick-to: 6.5
Task-number: QTBUG-134079
Change-Id: I16af5d2bb5b309a56e81854be434fa9430ae284f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5fc1e9fa0c1925654412af5bf46ff95da99bc190)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit c653cf1171d6ccf8a8036d8b396e57465b9a7d4e)
2025-03-01 23:45:26 +00:00
Marc Mutz d13a416d00 tst_QStringTokenizer: check when the lazy range may be empty
Only when using SkipEmptyParts...

Pick-to: 6.5
Change-Id: I7dd67b801fa0deaab14eb7bb7e9905f60891ec48
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit cef7892135b4fccc85512629e8bee76ddfbc3240)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 0e7f52c8726c3c5b53d7dc9133a82e551fe830a7)
2025-02-27 19:19:50 +00:00
Cristian Le de0b702d31 Bundle Kitware's RunCMake test module
Introduce a new module `TestInternalPrivate`.

Kitware's RunCMake allows to create more granular unit tests using
`cmake -P` scripts instead of configuring, generating and building full
projects.

[ChangeLog][Third-Party Code]
Add upstream cmake's RunCMake test infrastructure module to
src/testinternal/3rdparty/cmake to aid in creation of cmake auto-tests.

Change-Id: I08cb7c6dc6f61bde29f176d58295f4f660b34ca8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 39e7946cb6562c6f9b1baf5c44b1694922d0538e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 926abdce783542638dcfa59fa1f4218b9cf3a151)
2025-02-26 20:13:33 +00:00
Konsta Alajärvi e8a71279c6 Unblacklist tst_qrhi renderToTextureSampleWithSeparateTextureAndSampler
Unblacklist test function by skipping it with Android with Vulkan.

Fixes: QTQAINFRA-6335
Change-Id: I2ee093542f09f68044baa044b697a09af066fcd8
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Lauri Pohjanheimo <lauri.pohjanheimo@qt.io>
(cherry picked from commit fd15b2178a3468bf1fcd04b79467e1400ec6c8d3)
2025-02-26 10:44:08 +00:00
Lauri Pohjanheimo 7fcd6c1aef RenderToRgb10Texture test unblacklisted
On CI an Android emulator with SwiftShader software graphics
implementation is used. SwiftShader implementation is unable
to emulate this OpenGL functionality.

Blacklisting removed. QSKIP the test if it is run in Android platform,
OpenGL and SwiftShader sw graphics implementation is found.

Task-number: QTQAINFRA-6331
Change-Id: I4a7e64e464ea04409154be2e7b3135ecd88a29fc
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 3fe904e23199fe73637425a26bb81dbbf069b2f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-25 13:28:02 +00:00
Eskil Abrahamsen Blomfeldt ca8ee54544 Escape calculating vertical windows-metrics if they're too big
This amends 073fae097ce40bee1532c252a8c696840b5dfc16 which added
an escape before calculating the vertical metrics if they were too
big and would overflow. It missed one spot, which was when using
the winAscent/winDescent instead of the typo-metrics.

Change-Id: Ib6a7705f6676c66bfd04b37efa30fe2d1b99581c
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
(cherry picked from commit f846754663aae1652e4eec9a441ee222af352319)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e51d03e334b18cd34fbfb708b9835327658f2075)
2025-02-24 10:52:19 +01:00
Thiago Macieira ee068f2ec5 QProcess/Unix: don't close the childStartedPipe too soon
We were accidentally closing it along with all the other file
descriptors if the CloseFileDescriptors flag was active. That meant we
were unable to report start problems back to the parent process.

So instead of closing everything immediately, we simply mark everything
as FD_CLOEXEC so they'll be closed by execve()'s success. Because we're
using CLOSE_RANGE_CLOEXEC now to detect the system call, we don't need
the configure-time test.

[ChangeLog][QtCore][QProcess] Fixed a bug that caused QProcess not to
report start failures if the UnixProcessFlag::CloseFileDescriptors flag
was active.

Change-Id: I4d81d763281354e886d9fffd56ef6ab8b6115715
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
(cherry picked from commit 3d007ff2e9caf328f92d65f71a94fd869552b1b6)
(cherry picked from commit 01010851cb61f5d7964ba2317defb67cdfcb72f5)
2025-02-22 13:20:54 +00:00
Marc Mutz 73c44c8381 QLocale: fix UB (signed overflow) in formattedDataSize()
Coverity complains that qCountLeadingZeroBits() may return 64 and then
the RHS will be out-of-range for int. Of course, 64 leading zero bits
means that the argument is 0, which we excluded in the first `if` of
the if-else chain.

I can only guess (because it doesn't tell me which value of `bytes` it
is using for the analysis) that Coverity assumes bytes ==
numeric_limits<qint64>::min() and considers the overflow in qAbs() to
yield a 0, because, it being UB, it may yield anything.

Be that as it may, the fact remains that formattedDataSize() invokes
UB when passed numeric_limits<qint64>::min(), as confirmed by ubsan:

   global/qnumeric.h:479:26: runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself
   text/qlocale.cpp:5062:82: runtime error: signed integer overflow: -2147483648 * 3 cannot be represented in type 'int'
   text/qlocale.cpp:5062:26: runtime error: division by zero
   FAIL!  : tst_QLocale::formattedDataSize(English-Decimal-min) Compared values are not the same
      Actual   (QLocale(language).formattedDataSize(bytes, decimalPlaces, units)): "-inf bytes"
      Expected ("output")                                                        : "-9.22 EB"

So fix the overflow by using the new QtPrivate::qUnsignedAbs(). Then
sit back and await Coverity's verdict on the next run.

[ChangeLog][QtCore][QLocale] Fix issue when calling
formattedDataSize() with numeric_limits<qint64>::min().

Amends 9d23aebb27.

Pick-to: 6.5 6.2 5.15
Coverity-Id: 474294
Change-Id: I9a5a5acbdcf881a624bb827ca1dd970771f1bb6e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit b93575de01760ff2ab0d817557a642c71cdb4414)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6cefb8be965759cc022ce3ef1ae7a722f0566ce7)
2025-02-21 21:24:30 +00:00
Marc Mutz 65f7bdd3ab tst_QCryptographicHash: remove remnants of BigData split
The ensureLargeData() and 'large' members were only used in BigData
tests that have since moved to a different executable.

Amends fff217824b532da7306af1ac755581e76e098a27.

Pick-to: 6.5 6.2 5.15
Change-Id: Idc99a868e082098dda4e1bee62470370c7e20f62
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5cd046f154a0a31635c935bf6c9f1abd27837b80)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9479f9bbfc24d603df66993388a50200641fabd2)
2025-02-21 21:24:30 +00:00
Christian Ehrlicher 3c4df2657d QSqlTableModelTest: misc cleanup
Cleanup QSqlTableModelTest:
 - use pmf QSignalSpy ctor
 - use QCOMPARE/QCOMPARE_GE instead QVERIFY where possible
 - properly close additional databases so temporary folders created for
   sqlite can be deleted on exit

Change-Id: I84e8960b81128c141a0e2cd6d03837c9b5ac6652
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit a47dc990793a1e299e9ba869e1d6c76fa0bf9d65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3cd991037dde9ee86cf880d256889c465d157975)
2025-02-21 21:24:30 +00:00
Mate Barany f9b6666e1d Do not keep the headers and message body in case of temporary redirect
The implementation of GET requests with body (QTBUG-112871) keeps the
body after it has been redirected. However, in case of temporary
redirect (status code 307) this seems to be an incorrect behavior.

Reset the headers and the body in case of temporary redirect.

Change-Id: I10be702b017a42cca27a37dfe2249da2f59c0328
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f6a5c7e011d24db22afa5a3bf92749b9bb9e9354)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5581c629221948058da043179a2be2e6442bc597)
2025-02-21 00:03:44 +00:00
Marc Mutz 5153fda147 tst_QCryptographicHashBigData: skip Sha1 tests on ASAN CI builds
The SHA-1 test has started to time out in CI ASAN builds recently, so
skip it there. Keep it on non-CI or non-ASAN builds, though.

Amends c6e092a5f8.

Pick-to: 6.5 6.2
Change-Id: I8d653c2a8304cfae290befafda570d5c49dd4536
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 929466ba64c503cc1a7c6205f0a424350a9a201f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 76783a4487b8b8fbe6b7e8b066bccfefef7ba912)
2025-02-20 21:46:57 +01:00
Ahmad Samir 21070f4b5c tst_QCryptographicHash: split 4GiB tests to a separate unit test
With those tests split, tst_QCryptographicHash takes about 4ms.
When FEATURE_openssl_hash is enabled those tests take about 15s on
their own, but when openssl_hash is disabled they take about 2 minutes.
That makes running the tests locally a bit of a hassle when hacking
code ... test ... hack ... test.

This is with a debug build, GCC, `-O0 -g` flags.

Pick-to: 6.5 6.2
Change-Id: I8b8f5d1954feb1f9eb8115e27635610a41b42f47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fff217824b532da7306af1ac755581e76e098a27)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2025-02-20 20:46:57 +00:00
Frédéric Lefebvre 3a9c8665e5 Harden tst_QWindow::framePositioningStableAfterDestroy()
StablePosition was in some cases recording a wrong position, as it was
taking the framePosition and considering it to be the widget's
position. That erroneous position was then used to place the window,
resulting in a correct position but a wrong framePosition.

Wait and check for the window.geometry() and the
window.frameGeometry() to be different. If not the frame
has not been updated, or there is no frame when there
should be one. The test will most likely fail because
of this.

Fix flakiness on Opensuse 15

Pick-to: 6.5
Change-Id: I8e05ee7769de4efc2ac55ec7afbe366f76e325db
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 21ef8bed6d738551c1a322e78366d3c347a0e09e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e20364d6c92dc5b46cea3639a9bd4b744c07bf0c)
2025-02-20 16:21:26 +00:00
Marc Mutz 3c4bef981f tst_QLocale: actually check formattedDataSize() with qint64
... not just int, and not just non-negative values.

Reveals a problem with bytes == numeric_limit<qint64>::min(), says
ubsan (example; all min64 fail):

    global/qnumeric.h:479:26: runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself
    text/qlocale.cpp:5062:82: runtime error: signed integer overflow: -2147483648 * 3 cannot be represented in type 'int'
    text/qlocale.cpp:5062:26: runtime error: division by zero
    FAIL!  : tst_QLocale::formattedDataSize(English-Decimal-min) Compared values are not the same
       Actual   (QLocale(language).formattedDataSize(bytes, decimalPlaces, units)): "-inf bytes"
       Expected ("output")                                                        : "-9.22 EB"

So exclude that from testing, for now.

Pick-to: 6.5 6.2 5.15
Coverity-Id: 474294
Change-Id: Ia1f8e87c58a9fdc2668b6745956e913384cff4c7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 562cb8e4d9c5e6482b8c6b85fbb6f735d3000ad2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 173eebbd968e55fbce6833d4c0699dd71aacf6bc)
2025-02-20 09:21:59 +00:00
Matthias Rauter 2f5e2f4630 Silence warning in tst_qwidget.cpp
Amends: 1a0f056f318417ba5e54c8110257b75cf5537acb

Change-Id: Ib67016bbb7d5abe48224d23d49e36e2e01e416fc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 2c15086b7ed561b59cfb0d028c35d15631c12738)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b05f06d5b97263a194e14edf6ea5a7b649c6db64)
2025-02-18 22:58:30 +00:00
Mårten Nordheim dbff2edaa1 Update UCD to Unicode 16.0.0
They added some new scripts.

There were a few changes to the line break algorithm,
most notably there is more rules that require more context than before.
While not major, there was some shuffling and additions to our
implementation to match the new rules.

IDNA test data now disallows the trailing dot/empty root label,
technically to be toggled off by an option that controls a few things,
but we don't have options. For test-data they changed the format a
little - "" is used to mean empty string, while a blank segment is
null/no string, update the parser to read this.

Changes in this cherry-pick:
  - Reran tool to resolve conflicts due to
    emoji-data not being extracted in this branch

[ChangeLog][Third-Party Code] Updated the Unicode Character Database to
UCD revision 34/Unicode 16.

Fixes: QTBUG-132902
Task-number: QTBUG-132851
Pick-to: 6.5
Change-Id: I4569703659f6fd0f20943110a03301c1cf8cc1ed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 85899ff181984a1310cd1ad10cdb0824f1ca5118)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5985c90d37a096f35b68546f916bec29a218e112)
2025-02-17 14:39:31 +01:00
Thiago Macieira b0c4941c23 tst_QGetPutEnv: use a lambda instead of a macro
Neater and more debuggable. This code was added in Qt 5.4, before we
could use C++11.

Pick-to: 6.5 6.2 5.15
Change-Id: Icd8acccb4a9ae1f500e7fffdc4d4fc7c310cbb89
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b888bc09ce33a91800cb2119a52097897f3d62d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ddd0a084905bb0b52f941c151e84a40821527329)
2025-02-15 09:49:47 +00:00
Thiago Macieira d9d7b14f09 qEnvironmentVariableIntValue: fix off-by-one with MSVC's getenv_s
This meant a string containing the octal form of INT_MIN (-020000000000)
would be just too long and getenv_s() would fail. This was never caught
because code that was meant to test different bases simply forgot to use
the base. Amends commit bb56586e32.

I've renamed the rows to be the text being parsed, so it matches the
previous rows and it makes clear what was being parsed just by reading
the test's output. That also revealed a duplicate row to be removed.

[ChangeLog][QtCore][QtEnvironment] Fixed a bug that caused
qEnvironmentVariableIntValue() to fail to parse octal values from
-020000000000 to -010000000000 with MSVC. Other compilers were not
affected.

Pick-to: 6.5
Change-Id: I9095d86cccd9e8001e85fffd6fbbcd6a9a1678c3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 83f2d1130aa49228a8a87547660791708735dd4b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ff7675817d9e31c261ddaca81ca7f58a362d8295)
2025-02-15 09:49:35 +00:00
Ulf Hermann 70ac048188 QLibraryInfo: Consider resource paths as absolute
This is what QDir::isRelativePath() does, for better or worse. We've
used QDir::isRelativePath() before and we shouldn't change the behavior.

Amends commit c74cba1117355a6312b1f0cc815efa4cdea4bbfa

Change-Id: I03e3e921977af2b9c6ff2593535d846d6ce28fe2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit dd2dc8c70d0227ff235a8c7feaca7d7c4ead9c63)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3fd08e19d4fe2b0299394ef6506d5263b67a57fa)
2025-02-15 04:17:33 +00:00
Mårten Nordheim b93ec378c3 QByteArray(View)::lastIndexOf: Guard against needle > haystack
Otherwise we would traverse beyond bounds.

We calculate the delta in sizes between the haystack and the needle and
if this delta is smaller than the starting position
(the `from` argument) then we start from there.

The default value for `from` is size(). With the needle being longer
than the haystack, the delta is negative and we set our starting
position to be the delta, i.e. we start before the start of the
haystack.

[ChangeLog][QtCore][QByteArray/QByteArrayView] Fixed a bug in
lastIndexOf() that could lead to out-of-bounds access when the needle
is longer than the haystack.

Pick-to: 6.5 6.2 5.15
Change-Id: Id5cd772f00b0c3c50fbf61b4e888bba5587391ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d25e5e2cb78a2e2f2a1791fed250421ce9eefc46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9a634a5c4b7e51bf1ae27e1f1111c41f019e3238)
2025-02-15 04:17:33 +00:00
Thiago Macieira be3b8e6a14 tst_QByteArrayView: stop using std::basic_string<signed char>
That's not a valid type for the Standard's string, because the Standard
doesn't allow for std::char_traits<signed char> either.

Fixes: QTBUG-133689
Change-Id: Icd0d4928fa4cdc9d806bfffd4053f0eb1073e6b4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 0cc41083c30c1474a862a34b59a4f755d4c51640)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5b10a1e8b4137cd8031f100039c39a1cc93f5d4e)
2025-02-15 04:17:33 +00:00
David Faure cdcf00390c QToolButton: allow opening a menu after it first failed because empty
Commit 353ce5344fbde5a6cecbdd2c131e1cf0f4b7f383 made QMenu::exec()
return immediately (without showing the menu), which meant it never
emitted aboutToHide() and QToolButton didn't reset mouseButtonDown.
Therefore, on the next click on the toolbutton (maybe by then the
menu has actions), it won't even try to show it (because mouseButtonDown
is still true).

Task-number: QTBUG-129108
Change-Id: I3f84b9a35eb444fc33d8516c4be130293c04017d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit f0508b7ff3d2393521f49dcb1a9e880bf7665a87)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 05016926ae37ae73a9da9375a95f3a4e8234477e)
2025-02-12 20:26:40 +00:00
Thiago Macieira d4ceec964b QUrl: avoid going up from the drive path on Windows file URLs
On Windows, using a URL of "file:///c:/" as a base to be resolved with
"../" should not result in the Windows drive being removed.

[ChangeLog][QtCore][QUrl] Fixed a bug (regression from 6.7) where
resolving a base URL of an absolute file path containing a Windows drive
could result in said drive being removed (e.g., resolving "file:///c:/"
with "../" would result in "file:///").

Fixes: QTBUG-133402
Change-Id: I58286b9c5e5d02363f0efffdb06f983b560340df
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 340c9d88ab353e201f117d64609fa5f7d2fa2b21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8c5736e68f9619a6f2f223c7363a820e528d089c)
2025-02-12 07:54:55 -08:00
Thiago Macieira 09f0470790 QUrl: set the host to empty but present for "file" URLs
We set it when manipulating full URLs. If you're creating them from
parts, you may end up with one without a host. We will still fix that up
in QUrl::toString() ("manipulates full URL").

This allows the path normalization code to avoid accidentally creating a
URL with no host/authority and with a path that starts with double
slash.

[ChangeLog][QtCore][QUrl] Fixed a bug (regression from 6.7) where
QUrl::resolved() could create invalid URLs when the relative URI being
resolved contained a path with double slashes (e.g., combining
"scheme:a" with "..//b.txt")

Fixes: QTBUG-133403
Change-Id: I3fe9d5fbd2efcaa66d66fffdc010e5a84066b641
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 7d05f5ed7d3472028e28a09eeda175bb1b1eeb00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 86597d289116789463e905d3fdcdb3850f4b5918)
2025-02-12 07:54:55 -08:00
Ahmad Samir ba33345d71 QDir: refactor PathNormalization enum
AllowUncPaths (and the whole enum) is private API that is always enabled
only on Windows (build-time decision). So, remove it and change the
unittests to match reality. Now DefaultNormalization on Windows implies
handling UNC paths.

This was suggested in code review by Thiago; since this is a hot code
path, the goal is letting the compiler keep the flags parameter to
qt_normalizePathSegments() in a register, by keeping the
PathNormalization enum as small as possible.

Drive-by change: since those lines in the unittest are changed anyway,
take the chance and use u""_s syntax.

Change-Id: I3dcf30d888a0ea9f8898e260e65c5f85655296d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4f47ee4de46f1fa2df9fef163590807e2fae28d1)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-02-12 07:54:54 -08:00
Ahmad Samir 95e071255d QDir: change qt_normalizePathSegments to preserve trailing '/'s
... for local URLs too.

For example normalizing "/Users/sam/troll/qt4.0/.." by following the
alogrithm at https://www.ietf.org/rfc/rfc3986.html#section-5.2.4:
- replace "/.." with a "/" in the input buffer, then remove the previous
  path segment from the output buffer up to, and including, the
  previous "/"
- next iteration will find the input buffer starting with a "/" which
  is moved to the output buffer; the final result would be:
  "/Users/sam/troll/"

Remove the KeepLocalTrailingSlash enumerator, it's become redundant with
this change.

De-duplicate a row in tst_QDir.

[ChangeLog][Important Behavior Change] Aligned how QDir and QUrl
normalize paths with respect to preserving a trailing slash. That is,
QDir::cleanPath("/b/.") and
QUrl("file:///b/.).toString(QUrl::NormalizePathSegments) will return
"/b/" and "file:///b/" respectively. For more details see:
https://www.ietf.org/rfc/rfc3986.html#section-5.2.4

Task-number: QTBUG-128940
Change-Id: Id5a4bdab14e7312a60b1b54de07e5d9f3e8aa40a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ec894d694506fcce75fc9643f08dfb1c79f64c8b)
2025-02-12 07:54:53 -08:00
Ivan Solovev 36fddaae7b tst_qfuture: silence all continuation overwrite warnings
Introduce a helper function to silence this lengthy warning, and use
it consistently in all places where the warning was triggered.

Amends 502a7706b9 which introduced the
warning.

Pick-to: 6.5
Change-Id: Ifa5c7e0182a12885af4db42ef5d68b1f27a0c6bc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a30289ee0be41e8311aef6d8737885b354a9f047)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 08ef73f94f6428f8cefc0386980b2ba1f63bee84)
2025-02-12 12:44:15 +00:00
David Faure d275841dd1 QMenu: improve test for "empty menu" to be style-independent
This amends commit 353ce5344fbde5a6cecbdd2c131e1cf0f4b7f383 so that
the behavior doesn't depend on the widget style.
If QStyle::PM_MenuPanelWidth returns 2, then size will be (2x2),
which is hardly a valid menu to show - don't show that either.

Task-number: QTBUG-129108
Change-Id: I2daa05932ea00971880747daeffdfa20a8be3f22
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9dfd8410b07b0c484443ad6355004ace5f9b2b8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit bbc46bbc7a15728264574c39e13b6be4c9229b54)
2025-02-12 12:44:15 +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 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 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
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
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
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
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
Marc Mutz eb10876c7d Unbreak QSet::intersect()
The selection of which set to iterate over and which one to remove
from based on their relative size violates the function's
documentation, which clearly states that items are removed from *this,
and not from `other`, so the result must never contain any elements
from `other`.

Amends 4f2c96eaa8. Instead of reverting
to the gruesome old code with the forced detach-just-to-remove copies,
distinguish four cases:

- if the two sets are shallow copies of each other, then their
  intersection is *this

- otherwise, if either set is empty, clear() *this. This is required
  for one of the tests that 29017f1395
  added to succeed.

- otherwise, if *this is detached, perform the operation in-place,
  using removeIf()

- otherwise, create a new set and move-assign to *this to avoid
  detaching just to remove something again. In this case, we can
  continue to iterate over the smaller set, but we need to keep
  picking elements from LHS into the result.

[ChangeLog][QtCore][QSet] Fixed a regression (introduced for Qt 5.2)
in intersect() that caused equivalent elements of `*this` to be
overwritten by elements of `other` if `other.size()` was larger than
`this->size()`.

Not picking to 5.15, as users will have likely adjusted their code to
the buggy behavior, and because removeIf() isn't available there.

Pick-to: 6.5
Fixes: QTBUG-132536
Task-number: QTBUG-106179
Change-Id: Idfa17c3b3589c4eacec27259fc01df6aeaa6c45f
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 162015e9c6f469951d9212ef655cff16dcace071)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit eb13efc4a606cdb0c6f785a6319c489ad53626f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-02-05 15:57:55 +00:00
Marc Mutz 0e17856f63 Revert "Optimize QSet::unite"
This reverts commit 92acc94fa9.

The change broke QSet ordering guarantees: The documentation clearly
states that each item from `other` that isn't already in `*this` is
inserted ("STL insertion behavior"). Swapping *this and other breaks
this.

Independent of STL vs. Qt insertion behavior, making the picking of
elements from containers "random" in the sense that the size of the
container is now important, and not merely LHS vs. RHS, is a bad idea.

[ChangeLog][QtCore][QSet] Fixed a regression in unite() that caused
equivalent elements of `*this` to be overwritten by elements of
`other` if `other.size()` was larger than `this->size()`.

Fixes: QTBUG-132500
Change-Id: Ia636b62325139d618b5467a643ff710716324296
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2d1b3028673493cb144060cbec49b1b95f4188d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3dff1a3f7b22bc623b3c326630bfd94d2bd35d08)
2025-02-05 15:57:49 +00:00
Marc Mutz 88d9371d2c QSet: check that unite() and intersect() prefer elements from *this
In Qt versions 5.0..6.7, at least, this used to be the implemented
behavior for unite(). For intersect(), it was implemented up to and
excl. 5.2. Even the documentation states as much:

intersect(): Removes all items from _this set_ that are not
             contained in the other set.

unite(): Each item in the other set that isn't already in this set
         is inserted into this set.

Add checks that the functions behave as documented (hint: they no
longer do, since 6.8 (unite()) and 5.2 (intersect()), resp.), this
being the only correct way to implement these functions (items in
sets may be equivalent, but not identical; it is important that the
set operations work in a manner consistent with insert(), to meet
user's expectation of how these functions work (unite() just
inserts() the rhs, intersect() removes if !rhs.contains). Note that
QSet, unlike other Qt associative containers, actually has STL-style
insertion behavior (insert() doesn't overwrite).

subtract() is the only one that's still true to its docs. A test for
this function will be added in a follow-up commit - eventually.

In anticipation of adding rvalue-other overloads of at least
unite(), add a test with that, too.

Pick-to: 6.5 6.2 5.15
Task-number: QTBUG-132500
Task-number: QTBUG-132536
Change-Id: Id309ab5192e6d1c9bbeef496cbd7116d306eaae8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 0d4fd5c545b47966c56ed0b9eb9b5c0a8f75c02a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 12f39bb2ab0e2bbf70c538af7b36014024b5901a)
2025-02-05 15:57:41 +00:00
Giuseppe D'Angelo d25dbb9a7b tst_QGestureRecognizer: do not leak the point device
QTest::createTouchDevice() passes ownership of the device to the caller,
so make sure to delete it.

Change-Id: I100d3de9eab8ec9f88ed3e0850ada9d988bd962e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 28d0e658e297b5de52fb0cccaede08179c7f4b8c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8ef6d4ede857691798465eafcb7571f6c42c0ba9)
2025-02-02 15:38:10 +00:00