Commit Graph

58368 Commits

Author SHA1 Message Date
Tor Arne Vestbø
ad751a0390 QOffscreenIntegration: Don't keep around removed screens
The implementation of QOffscreenScreen::virtualSiblings() uses the list
of screens maintained in QOffscreenIntegration as input, so we need to
remove screens from this list as we remove them, to avoid treating
removed screens as siblings of still remaining screens.

While we're at it, remove the screens in reverse order, so that the
primary screen is the one removed last. This avoids having to update
the primary screen and move windows for each screen removed during
shutdown.

Change-Id: I9ab09dd75dbe20f63b9154533613bc59da531fd1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-09 23:23:22 +02:00
Joerg Bornemann
4d044d20c5 CMake: Un-TP QT_NO_STANDARD_PROJECT_SETUP
qt_standard_project_setup() is not in technical preview anymore.
Move this variable out of TP as well.

This commit amends 85970834b5.

Task-number: QTBUG-100793
Change-Id: I46f57972b385ac033e106bd8cbdc1efe7c9777af
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-09-09 20:26:09 +02:00
Tor Arne Vestbø
210020412c testrunner: Generate JUnit result files
The JUnit format is easier to feed to tools that don't support
the native Qt Test XML format.

Change-Id: Ie9803cc0fb0577b3b7258b05faa78d8fb1aad1d1
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2022-09-09 19:46:29 +02:00
Mikolaj Boc
adebdd0f9a Propagate the copy event correctly to Qt widgets on WASM
The event should be propagated when the native clipboard is available.
A recent regression caused it to be suppressed, which resulted in lack
of copy/paste capabilities.

Pick-to: 6.4 6.4.0
Change-Id: I030a31aa0951c3813ce1d38da9a6526010b3bfc8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-09 19:06:40 +02:00
Joerg Bornemann
124522a0a5 CMake: Un-TP QT_HOST_PATH
Take QT_HOST_PATH out of technical preview.  It has proven worthy of
being documented as proper CMake variable.

Fixes: QTBUG-106463
Pick-to: 6.2 6.3 6.4
Change-Id: Ie1dd83eff526d5b803ea275dd3c6ecc3a7aa0e17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-09 18:04:14 +02:00
Alexey Edelev
1e9c97011a Use the correct way to include qsimd_x86_p.h
qsimd_x86_p.h is not synced and installed as part of macOS multi-arch
builds, because of TEST_architecture_arch. With new approach when we
supposed to deploy only header files that belong to a platform in Qt
builds and installation, this file is missing. Considering
CMAKE_OSX_ARCHITECTURES in qt_internal_extend_target CONDITION fixes
this behavior and the file is added to CMake source tree.

Include qsimd_x86_p.h using private module include path, but not by
the relative path. This helps to detect the issue if file doesn't
exists in build or install directory when building qtbase, but
not other repositories.

The current architecture_arch test returns the very first
architecture that pass the check. Since arm64 is located in very
beginning it's returned first and other architectures that might be
used for multi-arch builds are not taken into account by conditions
that checks architecture_arch test results.

Fixes: QTBUG-106462
Task-number: QTBUG-103196
Change-Id: I6a9f110007d7069222c7d63bcd3ea586efab3aae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-09 17:04:16 +02:00
Alexey Edelev
c7d1d56b09 Add <module>-config[-p].h files to the module sources
<module>-config[-p].h files need to be added to the CMake source tree

Amends 8539e641f6

Task-number: QTBUG-103196
Change-Id: I8baaa672ad869da8a030d890da8bdea5bd8c7794
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-09 17:04:16 +02:00
Alexey Edelev
da635dfced Pass QT_NO_PACKAGE_VERSION_CHECK to the Android multi-ABI external projects
The QT_NO_PACKAGE_VERSION_CHECK flag should be considered by multi-ABI
external projects when it's set in the main project.

Pick-to: 6.3 6.4
Fixes: QTBUG-106394
Change-Id: Ief4ca1272f08f074d6c93d923efabdc13acd3add
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-09 15:23:13 +02:00
Mikolaj Boc
ad200d4bc3 Don't browser-sniff to detect the permissions API
Instead, unconditionally attempt to query for the required permissions
and catch the exception if those are missing.
Also, removed some unused variables taking part in the browser-sniff
calculation.

Fixes: QTBUG-105129
Change-Id: I7b96d0ba78109ad59dffb23ec9e618836bf826fc
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-09-09 10:12:19 +02:00
Lorn Potter
497cd38c1a wasm: fix setting RUNTIME_OUTPUT_DIRECTORY
match does not work, as cmake uses a string for NOTFOUND

Change-Id: I160a1f7ed69592b85fcbf0d8b5773713121ee9a4
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-09 09:03:39 +10:00
Mårten Nordheim
fe486d0fb4 QSslServer: Document undocumented signal
Pick-to: 6.4
Change-Id: Ife21d43d682e9463d41a1dd8c377003fca6f120f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-09-08 21:57:26 +00:00
Marc Mutz
b84f4be6b7 qUncompress: use existing MaxByteArraySize
... instead of rolling your own.

Since MaxByteArraySize already adjusts for the trailing NUL byte in
QByteArray, the odd 'len >= max' now become a more natural 'len >
max'.

Rename the limit variable to MaxDecompressedSize, which is more
specific, and remove comments that now look out of place.

As a drive-by, re-arrange an else branch that, had it stayed, would
have required an adjusted if branch to require braces around a
single-line statement.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: I6805dab8391b7e51db30d99b1b8968434062d12d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-08 23:57:26 +02:00
Mårten Nordheim
95e315a66e JUnit: Don't turn seconds into kilo-seconds
Overlooked in the review where this changed, this value was already in
seconds and needs to be converted to millis before converting back.

Now printing output such as:

<testcase name="initTestCase" classname="tst_QHash" time="0.001"/>

Amends bb74e72aa9

Pick-to: 6.2 6.3 6.4 6.4.0
Fixes: QTBUG-106222
Change-Id: I1f8b774eea3dcbe2b4e822e2b0b2efb1ccc01abb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-08 21:01:54 +00:00
Mikolaj Boc
522a93e303 Lock the window's caption area vertically inside its screen
The current code that locks the window does not take into account
screens that don't start at non-zero y coordinate, nor does it cap the
bottom of the window.

Task-number: QTBUG-106031
Pick-to: 6.4
Change-Id: Ic22c016d32dca9d288a2a56c51ccde78144b436e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-08 21:12:52 +02:00
Mikolaj Boc
809ff675c9 Take into account that pointer event's location is already global
Therefore, no translation to screen coords is needed.

Task-number: QTBUG-106031
Pick-to: 6.4
Change-Id: I0dbbc5e4df79d85f9c6ef47f09ea54f19b67d2d7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-08 21:12:52 +02:00
Mikolaj Boc
06f5c9ca60 Leave exposition to invalidate() in QWasmWindow::raise&lower
The window may be in a temporary state where the window()->handle() is
not yet set up. This makes an expose event with isExposed == false being
issued, which makes the window not refresh, especially when a async expose
request follows shortly after.
invalidate() handles this case itself as it issues a request to the
compositor which exposes the window at the right moment.

Fixes: QTBUG-106159
Change-Id: Ibc84490c379774120ab65978472e35be25240164
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-08 21:12:52 +02:00
Timur Pocheptsov
17e8f322eb tst_QSslSocket::serverCipherPreferencies - fix for OpenSSL v3
Test was not really good to start with - it was assuming the presence of
particular ciphersuites. Furthermore, it was ignoring the fact that
TLS 1.2 and TLS 1.3 set ciphersuites differently in OpenSSL.

Pick-to: 6.4 6.3 6.2 5.15
Task-number: QTBUG-106018
Task-number: QTBUG-95123
Change-Id: I6c8ba20154cdeb9275878462ab945729d6c82ecc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-08 17:07:49 +02:00
Eskil Abrahamsen Blomfeldt
817f307a18 doc: Clarify the term advance width
The QFontMetrics documentation has been wrongly stating that the
the horizontalAdvance() gives the width of a string, dating back
to when the function was misnamed as width(). This can cause issues
e.g. when using the value as input to eliding or clipping, since the
advance may be smaller than what is actually drawn.

This tries to clarify the term a bit.

Task-number: QTBUG-90036
Change-Id: I8ed82fa14fe26c2a20cdbee9f2097a0aa4cc3925
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2022-09-08 15:38:06 +02:00
Liang Qi
2585fa7c09 xcb: fix the build of native painting
Fixes: QTBUG-106374
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I91871078a0e09cdda8db4afd236a9746c72007f7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
2022-09-08 14:15:24 +02:00
Morten Sørvig
8c959a3609 wasm: don't set GL_DEBUG
This spams the console with "writeStackCookie"/"checkStackCookie"
messages, which makes finding relevant debug output harder.

Pick-to: 6.4
Change-Id: I352b633f02f9ecc1333d1d91f5ffc21a4a937e53
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2022-09-08 12:15:24 +00:00
Tor Arne Vestbø
3f23080809 Don't emit logicalDotsPerInchChanged when updating screen geometry
The screen geometry can not affect the logical DPI of the screen,

Change-Id: Id71b72ed2f26d0371ea7c2d2951426d2616dafd1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-08 12:49:30 +02:00
Morten Johan Sørvig
5699a1f909 Rename QScreenPrivate::updateHighDpi()
The function updates the cached QScreen geometry; rename
it to updateGeometry().

Change-Id: I56077807baa6c515769017dbb842eed10b1d1357
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-08 12:49:30 +02:00
Tor Arne Vestbø
a0b34a86b6 Move QPlatformScreen::deviceIndependentGeometry() logic to QScreen
Having the logic in QPlatformScreen was inconsistent with how the
high-DPI scaling logic sits on top of the platform layer, and also
made the implementation of QScreenPrivate::updateHighDpi() a bit
inconsistent in how the geometry vs available geometry was resolved.

Change-Id: I683ab34dfc8579e2c887cb8fe3059c9c9fdb71a7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-08 12:49:30 +02:00
Marc Mutz
936d33849c qUncompress: mark invalidCompressedData() Q_DECL_COLD_FUNCTION
... and in turn remove the manual Q_UNLIKELY() leading to its callers.

Paths to Q_DECL_COLD_FUNCTIONs are implicitly [[unlikely]].

This is in preparation of changes where the extra Q_UNLIKELY markup
gets in the way.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: I2cba5103854bf356ed841e1957a5ef143f8d3823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-08 07:18:56 +02:00
Tor Arne Vestbø
1032bf9fdb De-inline QScreenPrivate::updateHighDpi()
Make it easier to reason about the flow of high-DPI scaling when the
implementation is not "hidden" away in a private header.

Change-Id: I6350798c43ead213323f8e01d9761f2d185c6b00
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-09-07 23:58:12 +02:00
Tor Arne Vestbø
778dcaa50d Use correct calling frame for QMacAutoReleasePool debug tracker
Using [NSAutoreleasePool showPools] to debug auto release pools
should now show the call site that allocated QMacAutoReleasePool,
instead of the QMacAutoReleasePool constructor, i.e.:

 ################  POOL 0x7f844c80c050
   0x600003644190    ^-- allocated in function: QCoreApplicationPrivate::init()
   0x600003a41080  __NSArrayM
   0x60000345cca0  __NSCFString
   0x600003a410e0  NSPathStore2
   0x600002141680  NSPathStore2
   0x6000036441b0  __NSSingleObjectArrayI

Change-Id: I52d22503c1d3de5a9dbae9939569d0836cc1a840
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-09-07 23:58:12 +02:00
Mikolaj Boc
fc78059934 Use popup() instead of exec() in examples
popup() is generally better but it has a certain advantage that it does
not require a run loop to work, therefore platforms (like WASM) can use
it without resorting to extra measures (like asyncify).

Task-id: QTBUG-106389
Backport-to: 6.4 6.4.0
Change-Id: I87bde677f84048af82cc9aadd982284bdba41e69
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-07 21:59:30 +02:00
Mikolaj Boc
5d4178ff47 Propagate the event acceptance correctly with context menu on RMB
The context menu event created in QWidgetWindow::handleMouseEvent
does not forward its acceptance flag on which a client may rely.

Task-number: QTBUG-106389
Backport-to: 6.4 6.4.0
Change-Id: I17a53ebd23b4ae0a2721c629f3ecc7aeec56233d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-09-07 21:59:30 +02:00
Alexey Edelev
5d38e1f295 Suppress the PUBLIC/PRIVATE_HEADER related warning
Avoid adding module header files to a PUBLIC/PRIVATE_HEADER for the
modules. All header files are installed using install(FILES call, but
not as a part of install(TARGET

Amends 8539e641f6

Task-number: QTBUG-103196
Change-Id: Ib95295112c74f74f237e3738d2532f9049d26ce6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-07 21:15:49 +02:00
Ivan Solovev
b83fc9f41a CMake: propagate deprecations definitions to tools and apps
If Qt itself is built without the deprecated APIs, so should be the
tools and apps.

This patch makes sure that the specified QT_DISABLE_DEPRECATED_UP_TO
and QT_WARN_DEPRECATED_UP_TO values are correctly used in the internal
tools and apps.

Fixes: QTBUG-105102
Change-Id: I7a51bddbd839c7b71efa0bff8ec959df64c53b82
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-07 19:51:38 +02:00
Friedemann Kleint
d1175e20cf uic: Remove trailing blanks generated into Python icon code
The indentation is only required for C++.

Pick-to: 6.4 6.3 6.2
Change-Id: Ie861b12ba262fd56995c11d883129bafd11eface
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-09-07 19:17:55 +02:00
Friedemann Kleint
2ac733832d uic: Add QPdfView
Generate the correct header and Python import for the class.

Pick-to: 6.4 6.4.0
Change-Id: I3682b1659e73e0ccd35b617632a56a5c14715cde
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-07 15:53:19 +02:00
Edward Welbourne
6c624c80fd Avoid recomputing DST-ness for time-zone when already known
When a QDateTime is constructed it determines whether daylight-saving
time is in effect and records it in its status field. So consult that
cached answer first, before asking the time-zone backend to work out
the answer the slow way.

Change-Id: I1d380d41f28a9b866216ac0f65425c30a8988cac
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-07 15:53:16 +02:00
Edward Welbourne
6616823fb7 Replace .at() with [] to dereference QStringView
Trivial readability tweak.

Change-Id: Ife9249a3b7c08cef4a6359f6cac43ea7bfcded23
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-07 15:53:16 +02:00
Edward Welbourne
21d4e3a69d Eliminate QSystemLocaleSingleton and QSystemLocale(bool)
They are no longer needed. The global static will only ever be
instantiated if and when the QSystemLocale stack is empty; it will
then survive to the end of run-time, serving as a bottom-of-stack
instance that will always be fallen back to after any other instances'
lifetimes. It can thus be a local static of the only function that
accesses it.

Change-Id: I21a1623728b25b46da6e25db9bb973c507a39ca3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-07 15:29:39 +02:00
Edward Welbourne
6a14ad4993 Perform uiLanguages() likely-adjusted processing purely on IDs
The collection of translations available to us need not have anything
to do with whether CLDR has matching data, so preserve the system UI
language list's entries as they are, rather than forcing them through
the QLocale constructor's exercise of likely sub-tag rules.

Instead, simply parse the given locale tags to QLocaleId instances and
use these in the likely-subtag processing to determine what other
entries to add to the list in addition to those supplied by the
operating system. Since going via QLocale did usually supply a
territory, that was included in the BCP 47 name, it's now possible for
the given entry to lack the language_territory name, so be sure to add
that if missing.

This incidentally reduces heap traffic and saves a fair deal of hidden
likely-subtag processing in calls to the constructor and bcp47Name().

Expand testing of QLocale::uiLanguages(), both plain and system.  In
the process, cross-link the two closely-related tests, move a comment
on one's _data() to the other's, where it really belongs, and add
reporting of the actual lists on failure. Enable MySystemLocale to
remember the requested locale's ID, before likely sub-tag processing,
so that we can make query() report results for language, script and
territory as requested, to ensure the fake system locale really does
match what was requested. The new german-britain test failed without
it, because there is no de-GB locale in CLDR.

Task-number: QTBUG-99531
Change-Id: Ide041577772c442a4413e3b9a590e11140c48f49
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-07 15:29:39 +02:00
Edward Welbourne
ebe9aca900 Simplify system locale management
Have QSystemLocale manage a stack, so that tests can install an
over-ride for the actual system-specific one reliably and restore the
system-specific one when finished. Leave the QSystemLocaleSingleton
out of the stack, all the same. In the process, mark the QDoc comments
for QSystemLocale all as \internal, since this is not public API.

Change-Id: I8faed49780215e42f32be10cf936c32bb46105bf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-07 15:29:39 +02:00
Edward Welbourne
753bfdf6a1 Work round macOS's omission of en_DE from its own uiLanguages()
When the system locale is en_DE, macOS seems to think we should use
en_GB as the right translation. While that probably is a sensible
choice in the absence of an en_DE translation, we should definitely
use the en_DE translation if available, especially if en_GB isn't
available (which lead to a fall-back to de_DE, given later entries in
macOS's list). So prepend the system locale's own pcp47Name() if it
(isn't the C locale and) is missing from what we would otherwise have
used for uiLanguages(), after likely sub-tag perturbations.

Add a test simulating (some approximation to) what macOS was doing
that would have caught this case; and add a scope-guard reporter to
the test to report what shows up when lists don't match.

Fixes: QTBUG-104930
Pick-to: 6.4 6.4.0 6.3 6.2 5.15
Change-Id: I116234708067e1717d9157aebc84da76e04a9f38
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-07 13:29:39 +00:00
Edward Welbourne
f94f165336 Document shell-friendly data tags as best practice
Also follow this best practice in testlib's own documentation and
examples.

Pick-to: 6.4
Change-Id: I8b57dfa8f88835adae8fceeb122a16635708e338
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-09-07 15:29:38 +02:00
Marc Mutz
8b514c9c58 QFileSystemEngine/Unix: fix unneeded casts from errno values to int
In the same file, errno and EACCES are passed unadorned to
qt_error_string(), proving the int casts on the other calls aren't
necessary.

Remove them; ints are a code smell these days.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: I7209a209141195090878944ae66da3c85bbe4135
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-07 15:15:28 +02:00
Marc Mutz
f020c4ba51 QIODevice: fix narrowing conversions in debugBinaryString
The debugBinaryString() function is a hexedit-like pretty-printer
which prints in increments of 16 octets, so it can go forever.

The old code had an overload set (QByteArray) and (ptr, qint64 size),
but made the (ptr, n) overload construct a QByteArray to call the QBA
overload. That's a narrowing conversion right there, except it can't
trigger because no machine can hold that much memory. But it may warn.

The code inside went on with further narrowing conversions to int,
this time, which does have an effect on 64-bit. Granted, you'd wait a
long time for this inefficient pretty-printer to write out more than
16Mi lines of hex dump, but it's wrong nonetheless, because narrowing
conversions work with modulo arithmetic and not saturation arithmetic,
so passing a buffer of INT_MAX + 1 size would print nothing, which
would probably cause some time lost hunting unrelated bugs.

So, fix the whole thing as follows:

- remove the QBA overload, it was never called

- loop over the full range of up to LLONG_MAX characters; if
  developers pass too much data, that's SEP

- remove the narrowing casts to qsizetype at the call sites (avoids
  modulo arithmetic)

As a drive-by, make the function static, and to get compilers to
actually see all this, make it [[maybe_unused]] instead of ifdef'ing
out.

Not picking back, as it's debug-only code.

Task-number: QTBUG-103525
Change-Id: I8b06466365d8c57b14535d8752428a614f244297
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-07 15:15:28 +02:00
Marc Mutz
66b633bbc1 Port QDir to qsizetype [3/3]: API
[ChangeLog][QtCore][QDir] The count() function now returns, and the
indexing operator now takes, qsizetype (was: uint and int,
respectively).

[ChangeLog][Potentially Source-Incompatible Changes][QDir] The count()
function now returns qsizetype (was: uint).

Task-number: QTBUG-103525
Change-Id: Ib84af36f6a95d9a0d1090a2d6fb973a4e363550c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-07 15:15:28 +02:00
Marc Mutz
cbae09fe42 QtCore: removed_api.cpp: fix ordering
BA sorts before BU...

Amends da12a40b8b.

Change-Id: I11ffc89e901b3ef0eab2c6a422125dc3a77dd66e
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-07 15:15:27 +02:00
Mårten Nordheim
070446d5eb tst_qlocale: only restore the fp control masks we change
Certain masks are not supported outside 32-bit x86, and will assert on
x64.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-106000
Change-Id: Ic9f58e5a19c1db3309edeb5ec529e7a78c929665
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-09-07 13:15:27 +00:00
Ievgenii Meshcheriakov
8bada697d6 QTlsBackendOpenSSL: Early return from ensureCiphersAndCertsLoaded()
Add an atomic state variable to perform early return without taking
a recursive lock after ensureCiphersAndCertsLoaded() is complete.

Make related mutex and state variable function-local static because
they are not used anywhere else.

Taks-number: QTBUG-103559
Change-Id: I1e4c9c4f73204885bce82ba7f2b5e64548c3aac3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-09-07 12:39:25 +00:00
Rafael Roquetto
42c1e3c334 Revert "Fix build with -trace lttng"
This reverts commit 756c65d367.

"justified_worry" is an incorrect workaround which attempted to silence
tracegen when invalid types were being used. This caused Qt to compile,
but with broken/invalid tracepoints.

The proper solution involves fixing the tracepoints in question.

Change-Id: I96de254944f0367808527d215e87a5d66bb442f4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-07 22:39:25 +10:00
Alexey Edelev
8539e641f6 Respect CMake source tree when installing header files
Use CMake source tree when installing header files instead installing
all header files that syncqt.pl produces. This avoid adding header
files which cannot be used because of platform or feature
incompatibility with Qt version. Since syncqt.pl doesn't respect CMake
build tree when generating master header and CaMeL case header files,
these header files still will be installed regardless platform or
feature limitations. This will not be the case once we switch to
syncqt.cpp, which will install only headers that are relevant to the
selected platform and enabled features.

Task-number: QTBUG-103196
Change-Id: I7d64754648747bee700d96f2fd6228fe7248512e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-07 14:39:25 +02:00
Alexey Edelev
33a12988e2 Guard windows-specific includes with Q_OS_WIN
Change-Id: I0a7c605c55c815c7220024f302f511e302005ab9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-07 14:39:25 +02:00
Marc Mutz
6bdde52957 [docs] qCompress/qUncompress: document size limits
Zlib uses ulong in the interface, which, at least on Windows, is a
32-bit type, so qCompress cannot consume input and qUncompress cannot
produce output greater than ULONG_MAX, even on 64-bit platforms.

Document this limitation.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104972
Change-Id: I56c926a67f8705ef773977a86e157e6eb26aa585
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-07 13:00:23 +02:00
Marc Mutz
c97bcaaa1a qUncompress: statically assert that arithmetic overflow cannot occur
... because the limit we check against, doubled, is still within the
range of size_t.

Took me a while to prove this to myself, so document the finding in a
static assertion.

Pick-to: 6.4 6.3 6.2
Change-Id: Ib2d1bb825c1693ccc4ffa1d8fc0bd455a170337f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-09-07 13:00:23 +02:00