65727 Commits

Author SHA1 Message Date
Marc Mutz
95feea933b QSpan: apply LWG 3346 work-around
We have not hit the GCC < 10.4 problem with containers that define
both element_type and value_type, yet, but we have with
QVersionNumber, so proactively apply it to QSpan, too.

While we're at it, copy the QList code to mark QSpan, too, as
contiguous.

Pick-to: 6.7 6.6
Change-Id: I883fd0b5f75db175a730262035ebbf0cb19de529
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-02-08 17:43:59 +01:00
Marc Mutz
f4cfc21dec QList: give the LWG 3346 #ifdef'ery a symbolic name
We'll need this in more places, so centralize its definition in
qcompilerdetection.h.

Amends 595b4e1a9b436a8190964dc41f79621400f5a6be.

Pick-to: 6.7 6.6 6.5
Change-Id: I87f84cb9ff3ad339c000604423295180176f5799
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-02-08 17:43:59 +01:00
Edward Welbourne
8b4536ccf5 QIcuTimeZonePrivate::displayName(): tidy and critique
Made the code simpler and amended comments. Computing the offset costs
less than computing full data at the given moment, especially when
we're going to ignore the daylight-offset that reports and call
another ICU function for it, if needed. Explain why the result is
unreliable and why, when that matters, we probably came via a
different code path that gets it right. Note the potential
inconsistency in locale between the UCalendar's construction and the
request for localized display name.

Change-Id: I2203c0bb053fa0e658373e4a818b77739be50a23
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-08 17:43:58 +01:00
Ievgenii Meshcheriakov
0e67553aac tst_qttextboundaryfinder: ignore unsupported tests
Qt currently has custom implementation for Indic grapheme breaks.

QTBUG-121907 was created to evaluate whether it is better to use
Unicode implementation instead.

Remove BLACKLIST. The remaining tests pass.

Fixes: QTBUG-121529
Task-number: QTBUG-121907
Change-Id: Ifd8fd76aeeba51d08c9f23b867abbf39750fc7d9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-02-08 17:43:58 +01:00
Ievgenii Meshcheriakov
1f73d4b87c Unicode line breaking: Implement rules LB15a and LB15b
The new rules were added in Unicode 15.1 (TR #14, revision 51).

The rules read:

    LB15a: (sot | BK | CR | LF | NL | OP | QU | GL | SP | ZW)
           [\p{Pi}&QU] SP* ×
    LB15b: × [\p{Pf}&QU] (SP | GL | WJ | CL | QU | CP | EX
           | IS | SY | BK | CR | LF | NL | ZW | eot)

Add two new line breaking classes LineBreak_QU_Pi and _QU_Pf to
represent quotation characters with context that matches left
side of LB15a and right side of LB15b respectively. This way
it is still possible to use the line breaking classes table.

Also add a coment about the original source of the line
break table.

Task-number: QTBUG-121529
Change-Id: Ib35f400e39e76819cd1c3299691f7b040ea37178
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-02-08 17:43:58 +01:00
Ievgenii Meshcheriakov
b2764f7802 QUrl IDNA: Update to Unicode 15.1
Unicode 15.1 (more spcifically UTS #46, revision 31) changes how
host names are processed. The initial Unicode host name mapping
is done without validity checking. That check was used in the past
to mark QUrl's invalid. This patch inserts simplified validity
check later. This check is similar to one performed before
conversion to unicode, but does not include BiDi check to keep
names starting with xn-- valid.

Additional complication is that U+1E9E LATIN CAPITAL LETTER SHARP S
must be mapped to "ss" with transitional processing.

It is not possible anymore to predict whether Qt implementation
considers a URL valid by using only error codes in the tests
vectors file. The test was adjusted to expect an empty string
(indicating invalid QUrl) or string matching the entry in vectors
file if there are any processing errors specified for that entry.

Unblacklist tst_QUrlUts46::idnaTestV2.

Task-number: QTBUG-121529
Change-Id: Iad5dadd1a6695fa54b432e35000b350cd6e06341
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-02-08 17:43:58 +01:00
Ievgenii Meshcheriakov
bfd09ec38c unicode: Import version 15.1 (UCD version 32)
Add enumerator for the new Unicode version to QChar::UnicodeVersion.

Remap new line breaking classes to their Unicode 15.0 values:
* AK, AP and AS to AL,
* VI and VF to CM.
These are classes for new line breaking support for Indic scripts
that require more work.

Blacklist failing tests for now:
* tst_QUrlUts46::idnaTestV2
* tst_QTextBoundaryFinder::lineBoundariesDefault
* tst_QTextBoundaryFinder::graphemeBoundariesDefault

Regenerate the source files.

Task-number: QTBUG-121529
Change-Id: I869cc9fbaa53765d8ae6265c22cdbef9f19d05bf
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-02-08 16:43:58 +00:00
Tim Blechmann
25b89f2c88 cmake: build repo helpers - fine-grained test/example options
the tests/examples could only be enabled globally. when working on a
specific repo, it's beneficial to disable tests/examples for other
projects to reduce project sizes (and cmake configure/generate times)

Change-Id: I0026ba87b667d427043cc8eb1baa6c28b2046dd7
Pick-to: 6.7
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-08 23:30:29 +08:00
Juha Vuolle
68179f7605 Change type of internal locationHeader constexpr to QL1SV
QL1SV is what QNetworkReply::rawHeader() ingests, and also it's what
QHttpHeaders::nameAt() returns.

Pick-to: 6.7
Change-Id: I967416cf6f203fe0f0980ef7eae2de7efc6d5377
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-08 17:02:52 +02:00
Juha Vuolle
7288db6083 Remove unnecessary case-insensitive header name comparisons
HTTP header name fields are case-insensitive and the QHttpHeaders class
stores them as lower-case. Therefore the case-insensitive comparisons,
when comparing against a lower-case value, are not needed.

Pick-to: 6.7
Change-Id: I7f38ef16aa7c61103abc4c81c13aebdd6e535dc8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-08 15:02:52 +00:00
Juha Vuolle
60f471f4b6 Replace QHttpHeaders::toListOfPairs() usage with iteration
... as a more computationally effective way, which was not present at
the time those usages were introduced.

As a drive-by add spaces around a binary operator

Task-number: QTBUG-122017
Pick-to: 6.7
Change-Id: I0528c995d1a3c1fe171486c5c313697d1706ee10
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-08 17:02:52 +02:00
Alexandru Croitor
a61ac2ca58 CMake: Add test for configuring a standalone test
A standalone test is one that uses
 find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
in its project code.

To ensure we don't accidentally regress this feature, test it as a
cmake test.
Also run test, this somewhat covers testing qt_internal_add_test.

Pick-to: 6.5 6.6 6.7
Change-Id: Ia9f27eef2bd7bd5bb57b96e553304924db252365
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-08 15:40:04 +01:00
Oliver Dawes
95c20ffac3 Initialize QRhiD3D12::activeAdapter for imported device path
This commit makes it so the QRhiD3D12::activeAdapter is set when
using an imported device. QD3D12MemoryAllocator::create would
crash before as it would attempt to call IDXGIAdapter1::GetDesc1
on the passed uninitalized pointer. With this change using an
imported device with the d3d12 rhi backend will no longer crash
the application.

Fixes: QTBUG-122007
Pick-to: 6.7 6.6
Change-Id: Iadc67fee0c7ee70ac904f66a523acd3b1a63e42b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-02-08 14:40:04 +00:00
Ahmad Samir
803d65dc12 QFileSystemMetaData: add is{Readable,Writable,Executable} getters
Change-Id: I18cc56435f5e725ad6b80797291cabaf63fc2fb3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-08 16:40:04 +02:00
Samuel Gaist
f4cb42ed0b QDom: give name to all anonymous parameters as well as too generic ones
This patch has several different goals:
- Make the QDom classes easier to use through PySide6 by avoiding the
  the generation of variable names that have no meaning.
- Make the code cleaner as using unrelated single letter parameter is
  not the best way to convey the information.
- Improve the documentation.
- Make qdoc's work easier

Fixes: QTBUG-121670
Task-number: QTBUG-121468
Change-Id: Ia31d119b3a1cc3c92ed6f77a60280191db3b74bc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-02-08 14:40:04 +00:00
Edward Welbourne
b0f4bd7f23 Move QTimeZone's CLDR-derived data into a namespace
Introduce namespace QtTimeZoneCldr instead of having a Q prefix on
each class name used for the data.

Change-Id: Icb22a91340b67f9cc93173b77374a70f69f81bbe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-08 15:40:04 +01:00
Edward Welbourne
a736e613fc Document LocaleScanner's constructor
I needed to know in order to make recent changes.
Save the need to work it out again next time.

Change-Id: Ibc606cbe2e6af16e6820fd753a643331a03cdfb3
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2024-02-08 15:40:04 +01:00
Nicolas Fella
00d9a9a9b5 QIcuTimeZonePrivate constructor: save iteration over all zone IDs
ICU returns a "valid" representation of GMT when given an unrecognised
ID, so QTZ's constructor has been checking the ID is available before
passing it to the backend constructor. That availability check was
done by generating the list of available IDs to see if the given ID
was in it; this is very inefficient. Furthermore, the QTZ constructor
was also checking availability, to work round the same issue in only
this one backend, making the check redundant.

So overide isTimeZoneIdAvailable() in the ICU backend, calling
ucal_getCanonicalTimeZoneID(), which answers the question directly;
and drop the duplicate check in the QTZ constructor. Expand a test to
verify an invalid name is rejected.

Fixes: QTBUG-121807
Pick-to: 6.7 6.6 6.5
Change-Id: I34f996b607b958d12607a94eb273bb1b406cca1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-08 15:40:03 +01:00
Morten Sørvig
b33b85cc46 qfreetype: Fix caching of memory fonts
Make QFreetypeFace::getFace() not return the same font
face for all memory fonts.

QtFreetypeData has a cache which maps QFontEngine::FaceId
to QFreetypeFace instances. Each FaceId should then
have a unique hash value, which is accomplished by
by hashing the font file name and a stored uuid.

However, we were not setting the uuid in all cases,
which means that in-memory fonts (which do not have
a file name) would hash identically.

Fix this by setting the uuid to a value based on the
address of the FontFile, which should be unique.

Pick-to: 6.7
Change-Id: I45de37b512fb666c26490551c831c0db824b5f35
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2024-02-08 14:37:50 +01:00
Jacek Poplawski
ef5ab6e006 Disable unloading libraries on VxWorks
Unloading plugins after each test case in QtDeclarative autotests leads to crashes (signal 11) during type registration in subsequent test cases.
The issue arises due to the unloading process, where unloading and then re-registering types in the next test case leads to sig11.
Disabling the unloading of libraries prevents the crashes.

Pick-to: 6.7
Task-number: QTBUG-115777
Change-Id: I6712f687134fd452fb0b962363a8f0fde85344ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-08 14:17:49 +01:00
Michał Łoś
141cd13ab4 Override detection of OS for sqlite3
sqlite3 doesn't detect properly VxWorks. Add workaround that hardcodes
detected OS to "UNIX".

Change-Id: I255bb1af94caf7b15c0bd05a4d4d9df6a076fc22
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-02-08 13:53:17 +01:00
Eirik Aavitsland
930535fe30 Modify the baseline testing framework to show new test items
If a commit adds new baseline test items, they would not be reported
to the server when doing a LanceBot test on that commit, and so not be
visible in the report either. This commit fixes the client side of
that issue; the server is already updated.

Change-Id: I60c2958def5e7b54ddc2789cf5727edcbb1a90e1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
2024-02-08 12:29:17 +01:00
Eskil Abrahamsen Blomfeldt
ec38f0002d Fix memory leak in DirectWrite backend
This fixes a memory leak due to a missing call to release
on the localized names in populateFamilyAliases(). The
DirectWriteScope makes this automatic when it goes out
of scope.

We did release in the other places, but for hardening
the code a bit, this also adjusts them to use the scope
guard.

Change-Id: I88402fad930e36cdd3a78244941fb53ca214520e
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2024-02-08 11:18:27 +00:00
Ahmad Samir
9e64088729 Qttestlib-manual.qdoc: fix typo in API docs
Change-Id: I7865afbdaed266edfb54866cddacc6d6e5ab725c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-08 13:03:50 +02:00
Mårten Nordheim
3b3b2024f9 Add QNetworkRequestFactory::(set)?Priority
To enable setting a default priority for all requests to a given site.

Fixes: QTBUG-121669
Change-Id: Icd8a9c59e4afb0432c65f84cc8115ae0c7f85506
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-02-08 11:38:10 +01:00
Tim Blechmann
27383285a1 cmake: improve documentation of NO_PCH_SOURCES
Add the reference to unity builds in the documentation of
NO_PCH_SOURCES to fully describe the semantics.

Change-Id: Icfd3ee401efa154da4b8ed9a307d29f2605d948a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2024-02-08 10:12:09 +00:00
Tim Blechmann
381d6b5ac9 serialization: cborparser - silence gcc warning
Change-Id: Ic28f85e7f6efbd65c79d67ce2fb3a367f36412fb
Pick-to: 6.7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-08 17:39:37 +08:00
Morten Sørvig
5e5e6240c2 wasm: fix onLoaded delay functionality
onLoaded and the initial expose/paint should be sequenced
such that onLoaded is fired first, followed by the expose.
This makes sure that we don't spend any time on painting
frames before Qt is completely initialized.

Add a "requestUpdateHold" mode to QWasmCompositor (initially
on) which disables requestUpdate calls, as well
as releaseRequestUpdateHold() which enables requestUpdate
calls again. This is a one-way transition; the mode
can't be enabled again.

This amends commit f2e22774 which implemented the concept
of startup tasks, where onLoaded can be delayed until
for instance font loading has been completed. After
this commit the expose event and initial commit will
be delayed as well.

Change-Id: Icc784306726174fbabe8785d54485860e968745a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2024-02-08 06:04:58 +01:00
Alexey Edelev
74dac559c0 Remove the commented legacy code from Qt6CoreConfigExtras.cmake.in
Pick-to: 6.7 6.6 6.5
Change-Id: I44243ed239c21382569f0c4abf9a271da42b9a19
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-07 23:23:40 +01:00
Alexandru Croitor
329dbfcc78 CMake: Fix undefined symbol: qt_resourceFeatureZstd issue
When cross-compiling, host rcc might generate zstd compressed
resources, even though the target might not support zstd
decompression.

To avoid that, we made sure to disable zstd compression when using
cmake api like qt_add_resources if the target platform does not
support it.
We did not do it for CMAKE_AUTORCC though.

In such a situation, the linker would fail with:
 error: undefined symbol: qt_resourceFeatureZstd

Add the --no-zstd option to AUTORCC_OPTIONS for targets that are
created by Qt CMake public API like qt_add_executable and
qt_add_library if the target platform does not support zstd
decompression (check via the QT_FEATURE_zstd variable).

This in turn applies to our own qt_internal_add_ API as well.

Allow opting out via the QT_NO_AUTORCC_ZSTD CMake variable.

[ChangeLog][Build System] Targets created with qt_add_executable
and qt_add_library will now add the --no-zstd option to AUTORCC_OPTIONS
when the target platform does not support zstd decompression. You can
opt out via the QT_NO_AUTORCC_ZSTD cmake variable.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-121948
Task-number: QTBUG-106466
Task-number: QTBUG-101353
Change-Id: Ibdcfecd9a4b1e206479a3f4588b1b624dd91e122
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-02-07 15:43:11 +01:00
Jari Helaakoski
600ac7b6aa Fix build when systemsemaphore is disabled
Change-Id: I508edd50f4fa8a799dcfd746a0a916e3e39be84d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-07 14:02:19 +00:00
Ivan Solovev
cbc6ee0eb9 Deprecate QDataStream::readBytes(char *&, uint &) instead of removing it
We cannot remove the overload using QT_REMOVED_SINCE, because a qint64
lvalue in the new overload will not bind to an uint& parameter, so the
old code would not compile.

Deprecate the old overload, and add a unit-test that makes sure that
it still behaves correctly.

This commit also introduces the new deprecation macros that are
required to do the deprecation in Qt 6.11.

Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef

Found in 6.7 API review

Pick-to: 6.7
Change-Id: I02893bfbe040df736f8e746384e0261a0f0041d3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-07 15:02:19 +01:00
Ivan Solovev
0aaf7092cd Fix QDataStream::operator<<(const char *) to handle 64-bit length
The operator was not converted to using a new streaming version, so it
supported only 32-bit length.

Fix it and add a manual test for serialization/deserialization of
large c-style strings.

Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef

Pick-to: 6.7
Change-Id: I83704edec021d400b992de810feba5da52d5ffe1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-02-07 15:02:19 +01:00
Ivan Solovev
be04a47a8b QDataStream::readBytes(): only chunk when data is not all available
If the underlying QDataStream's device already contains all data that
we want to read, we can optimize the allocation algorithm, and try to
allocate all needed memory at once.

Use bytesAvailable() to determine if the underlying device can provide
all requested data, and adjust the initial block size based on the
result. If not all data is available, fall back to the geometric
growth algorithm.

Change-Id: I6384d2caa16c238c2dbb77b2ad761cbd8a44df6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-07 15:02:19 +01:00
Ivan Solovev
a1bfac287e QDataStream::readBytes(): make the growth of the buffer geometric
The algorithm tries to allocate the memory using 1 Mb blocks.
When the input data is large, this results in a lot of reallocations,
which is slow and inefficient.

This patch modifies the algorithm in such way that the allocation size
increases at each step, resulting in geometric growth of the buffer.

Pick-to: 6.7 6.6 6.5
Change-Id: I071df68d51ba1dbd8b2eb5f94eb078a33223505f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-07 15:02:19 +01:00
Ivan Solovev
dd514160ce QDataStream: use SizeLimitExceeded status in write operations
Set this status when the stream tries to write more data than the
current serialization format supports.

Update the methods that write containers to return early if they fail
to write the container size, and do not try to serialize the elements.

Convert the manual tst_manualqdatastream test into a data-driven
test, allowing us to specify various stream versions. Adjust the test
code to check that the SizeLimitExceeded status is set when the
stream version is <= Qt_6_6.

Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef

Found in 6.7 API review

Pick-to: 6.7
Change-Id: If4c62ea53ac9bccd423f00f0f03afd6ba6bdc4f5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-07 15:02:19 +01:00
Ivan Solovev
0ed34d1992 QDataStream: use qint64 to represent size while reading and writing
Do that to avoid narrowing at the call site on 32-bit platforms.

Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef

Found in 6.7 API review

Pick-to: 6.7
Change-Id: I31142399385521d973b2ed3789745569e44d5d63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-07 15:02:19 +01:00
Marc Mutz
d4bb448cdd QTest: allow passing chrono literal as QTRY_ timeout
By wrapping the use of the timeout value in QTRY_IMPL in a lambda that
feeds the user input through the std::chrono::milliseconds constructor
with std::chrono_literals in-scope, the macros continue to work with
raw integral values as well as chrono literals not finer than
millisecond granularity.

Port all higher-level macros to pass a chrono literal and port some
uses in tst_selftests.

[ChangeLog][QtTest] The QTRY_*_WITH_TIMEOUT macros now also accept
chrono literals (was: int milliseconds).

Fixes: QTBUG-121746
Change-Id: Ib38406fc005a0a2c4ae3fd009760f73ad8bed355
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-02-07 12:15:09 +00:00
Lucie Gérard
fb226262e8 Change license for tools files
According to QUIP-18 [1], all tools file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I89e08859871d29a9cf8c7a56b30b07b2c2f34b42
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-07 13:15:09 +01:00
Lucie Gérard
f45dffa8b4 Change license for examples files
According to QUIP-18 [1], all examples file should be
LicenseRef-Qt-Commercial OR BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I185ebdff2faa5e4af6ac0ee77c3ae33faae06e7d
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-07 13:15:09 +01:00
Lucie Gérard
20f7c54fdc Change license of configure.bat file
According to QUIP-18 [1], all build system files should be
BSD-3-Clause

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I58689f832ed3a5c8475c9bd7e0205e2128fb7cc2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-02-07 12:15:09 +00:00
Piotr Wierciński
d2862a8f02 wasm: Refractor Selenium manual test into auto test
Using Selenium for WebAssembly testing enables us
to test user interactions, which is very valuable.
Turning this test into automated allows us to run
it in CI pipeline. This will help with detecting
regressions.
Two of these tests are currently failing on CI
machine and they have been temporarily disabled.

Change-Id: I754dd05955e55eb031070f5328ef715b7826c2b5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-07 13:15:09 +01:00
Eirik Aavitsland
a046bc19e4 Update bundled libpng to version 1.6.42
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.42

Pick-to: 6.7 6.6 6.6.2 6.5 6.2 5.15
Change-Id: Ie41c2df610fcd456af2bc4dee05dde90c426602b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-02-07 09:04:18 +01:00
Christian Ehrlicher
c6af5b9c12 Q(Plain)TextEdit: don't crash when using a style sheet
When using a style sheet, Q(Plain)TextEdit::isReadOnly() might get
called during the initialization before d->control is properly
initialized which lead to a crash.
This amends 43ce457cbd093fc06d99b5ac833c789ef7c893d5.

Fixes: QTBUG-121697
Fixes: QTBUG-121790
Task-number: QTBUG-1857
Pick-to: 6.7 6.6.2 6.6 6.5 6.2
Change-Id: I15c357c9eef7f6559bcc2ad89033a3d8e7fcbfef
Reviewed-by: David Faure <david.faure@kdab.com>
2024-02-07 02:17:37 +01:00
Alexey Edelev
4370532500 Add sanity check for QT_NAMESPACE validness
It looks like we don't even support nested namespace(RCC namespace
mangling fails). Assuming that QT_NAMESPACE should be
the valid C/C++ indentifier.

Change-Id: I5c2073c21964eb96abb3e894d83e1df65f7730b4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-07 00:31:38 +01:00
Alexey Edelev
1fb225db13 Improve the QT_NAMESPACE definition in Qt6CoreExtras
The perivous version generated weird condition, and seems changing
the QT_NAMESPACE after qtbase configuration is noop, we may replace
the generated condition with the conditional generation.

Change-Id: Ifa09dba4db00099a07da2cff5505e6fd0b008289
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-07 00:31:38 +01:00
Alexey Edelev
75d83d5a65 Add plugins of imported QtModules to the _qt_plugins property
This covers the following use case:
QtModuleX is pre-built and installed, it's imported. The plugin has
a PLUGIN_TYPE that is associated with QtModuleX and is built with
application that links QtModuleX. When deploying the application
it's expected that the plugin is deployed, as the one that belongs
to the linked QtModuleX.

This ensures that we udpate the internal _qt_plugins property that
is used in the __qt_internal_collect_plugin_targets_from_dependencies
function.

Pick-to: 6.5 6.6 6.7
Change-Id: I9824351ebab5a24509800da4db69f1e282a35884
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-02-06 20:23:18 +01:00
Juha Vuolle
cdfeca26cf Remove HTTP 1XX status test from tst_qrestaccessmanager
1XX statuses are not final statuses, and testing 'error' on it is not
necessarily very meaningful. Furthermore the internal handling of
these statuses changes in Qt 6.8.

Fixes: QTBUG-108068
Pick-to: 6.7
Change-Id: I9c18c579cd310266273eccd2aee2e032f60538e0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-02-06 19:10:45 +02:00
Mate Barany
bb34c6fa6b Make QNAM handle all informational HTTP replies
Make QNetworkAccessManager to discard all informational (1xx) replies
from HTTP servers with the exception of 101.

According to RFC 9110:

"A client MUST be able to parse one or more 1xx responses received
prior to a final response, even if the client does not expect one.
A user agent MAY ignore unexpected 1xx responses."

Status code 101 is an exception because we use it to upgrade to http2
cleartext when it is enabled.

Fixes: QTBUG-108068
Change-Id: I415ff053180a43f0c7ff1b4b2a60fd114ce08ac9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-02-06 19:10:45 +02:00
Assam Boudjelthia
7fa6d09ca2 Android: request POST_NOTIFICATIONS permission for Android Notifier
Android 13 and above requires the notification permission
"android.permission.POST_NOTIFICATIONS" to be requested at runtime.

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-121668
Change-Id: I38512ffc07c1a3ffe7cddffa937b98332f172d15
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2024-02-06 17:23:42 +02:00