Commit Graph

60322 Commits

Author SHA1 Message Date
Marc Mutz
05f913d57d qstrncpy: NUL-terminate even when src is nullptr
The goal of this function is to ensure that dst is _always_
NUL-terminated. The only exception is if there's no space to write
even one NUL byte, of course, but not when src is nullptr but dst
would have space.

Update the docs to the new behavior and make them more precise.

Fix a test that assumed qstrncpy() would not write to dst for
(dst, nullptr, 10).

[ChangeLog][QtCore][qstrncpy()] Now NUL-terminates the target
buffer even when the source pointer is nullptr, provided the
target buffer has space for at least one byte.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I7806d8c71e260f8f02b79af7b6ce94f23599dd69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-22 19:24:16 +01:00
Marc Mutz
4a9e918d4e QMessagePattern: don't use strncpy()
When Qt is configured to return nullptr from isNull() QStrings
(QT5_NULL_STRINGS != 1), then we'd be feeding a nullptr src into
strncpy(), which is UB. I couldn't rule the case of a null QString
lexeme out with local reasoning, seeing as the code is in the else
branch of an if (lexeme.startsWith(~~~) && lexeme.endsWith(~~~)), so
it might be null.

Instead of porting to qstrncpy(), which can deal with a nullptr src
(albeit up to recently, badly), note that the strncpy + the char[]
allocation is a qstrdup(), so use that instead. This also does away
with the queasiness of taking the size() of a UTF-16 string to limit
strncpy() for the L1-recoded version (which, in this instance is safe,
as toLatin1().constData() is NUL-terminated, but in some other
instances was not).

As a drive-by, make sure we don't leak the strdup()'ed string if the
emplace_back() fails.

Amends be98fa32c7.

Qt 5 is not affected, as constData() never returns nullptr there.

Pick-to: 6.5 6.4 6.2
Change-Id: I178d356e560d2749cd6ce0b9364c710a2d117304
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-22 18:24:16 +00:00
Marc Mutz
9f5a687ffe qt_inIsoNametoLCID: protect against a nullptr name
The only user of the function, QCollatorPrivate::init(), passes
QLocalePrivate::bcp47Name().constData(). bcp47Name() may return a
default-constructed QByteArray (e.g. for QLocale::AnyLanguage), so
constData() may be nullptr (QT5_NULL_STRINGS != 1). Passing nullptr to
strncmp() or strncpy() is UB, though.

Instead of using the nullptr-hardened q... versions of these
functions, check name for nullptr once, at the top of the function,
and avoid all the lookup code that follows and is known to fail
(because windows_to_iso_list does not contain empty entries).

This way, we take advantage of the std functions' UB for performance
reasons (fewer repeated nullptr checks), instead of being taken
advantage of.

Qt 5 is not affected, as constData() never returns nullptr there.

Pick-to: 6.5 6.4 6.2
Change-Id: I980dace2bca1e983ac526e89fadeb92239ab5f11
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-22 19:24:16 +01:00
Mikolaj Boc
a596ea0fe2 Support always on top/bottom window flags on WASM
The window stack will now upkeep three groups of windows, always
on bottom (1), regular (2), always on top (3). Windows belonging to
(3) will always appear on top of (2) and (1), and windows from (2) will
always appear on top of (1).

The first window created in the application gets the (1) status, which
is in line with the root window mechanism used before.

Activation has now been decoupled from the top position on the window
stack as a window in (1) or (2) may be active, in spite of the top
window belonging to a higher group.

Fixes: QTBUG-110098
Change-Id: I51f4d2d47163fab26ce5ef28f7a4f23a522c7f91
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-02-22 18:07:35 +01:00
Ahmad Samir
96e031edd7 QDateTimeParser: add more unittests for the unquote() static helper
Test documented behavior and serv as a baseline for future changes.

Change-Id: I36a914694d5244c89f28f3e403e11d65492a5eef
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-02-22 17:41:20 +02:00
Thiago Macieira
85c69f023f qmath: add qNextPowerOfTwo(unsigned long) - for size_t
This completes the triad uint/ulong/qulonglong, ensuring that one of
them will be size_t and one of them will be uintptr_t (size_t and
uintptr_t don't have to be the same type). The signeds ensure one of
them will be ptrdiff_t too.

Pick-to: 6.5
Change-Id: I9671dee8ceb64aa9b9cafffd17415a0bfcbd68b7
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2023-02-22 14:27:35 +00:00
Yuhang Zhao
f7fd5eaf95 Fix qtbase build when all deprecated code are disabled
Adjust the callers to use the non-deprecated APIs.

Pick-to: 6.5
Change-Id: I8e96f25684a2d613bc400a8626dc9e3af2bb8dcf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-22 22:27:35 +08:00
Volker Hilsheimer
b4b4c81401 Revert "Rename {from,to}DOMRect() → {from,to}DomRect()"
This reverts commit 81ce878f55.

Reason for revert: The native type is DOMRect, and in Qt, converters
to/from native types stick to the native capitalisation (e.g. fromCGRect
or fromNSString).

Change-Id: Ic44ec79849fc6accdce1153471dd1ad9117e57ce
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-22 14:27:35 +00:00
Mikolaj Boc
a85b658469 Polish the qwasmwindow manual test
Change-Id: I9d21404bcf6da7650ec63ef41d5134bb89485a84
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-02-22 13:47:14 +01:00
Ahmad Samir
7941d3ab3e QTestTable: quote tag name in duplicate tag warning message
Easier to see what the duplicate tag name is.

Change-Id: Iee156aa7d6766628ec60e712811a83a2ff66dbb1
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-02-22 14:47:14 +02:00
Jarek Kobus
0627ab1727 QThreadPool: Protect the access to internal data with mutex
The class claims to be thread safe, however, when e.g.
one thread is calling setMaxThreadCount() and the second
is calling maxThreadCount() at the same time for the same thread pool
instance, the latter may receive rubbish data.
Protect all public setters/getters with a mutex.

Pick-to: 6.5 6.4
Change-Id: Ief29d017d4f80443fa1ae06f6b20872f07588768
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-22 12:27:29 +01:00
Ulf Hermann
3ad9f94ff2 QVariant: Move some inline methods into a private header
We want to be able to use those from qtdeclarative. Clearly, they are
intended to be inline.

Task-number: QTBUG-108789
Change-Id: I3560e9b58213c4f41dbf6553021f3d6187960e8b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-22 12:27:29 +01:00
Vladimir Belyavsky
0fe6f818d2 Text: fix Soft hyphen rendering in QTextLayout::glyphRuns()
When calculating the position offset of QGlyphRuns, either
when fetching substrings or when applying fallback fonts,
we would include the advances of non-printable glyphs,
such as the soft hyphen. This was an oversight, and the
other code which calculates the advance (like in
QFontEngine::getGlyphPositions()) does this correctly. We
apply the same logic as there and only include the advance
if the dontPrint flag is unset.

[ChangeLog][QtGui][Text] Fixed an issue where spaces would
sometimes be shown in soft hyphen positions in a string.

Fixes: QTBUG-46990
Fixes: QTBUG-62620
Fixes: QTBUG-67038
Fixes: QTBUG-102483
Pick-to: 5.15 6.2 6.4 6.5
Change-Id: I4e583fb74f7a51424f14917d7cc0894beefec48b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-02-22 10:49:07 +00:00
Laszlo Agocs
1ca1fb86ac rhi: Make some op== and qHash hidden friends
Change-Id: I0ba829b5b3df7ebff2fe7da81424e2623a895325
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-02-22 08:32:52 +01:00
Assam Boudjelthia
30014ed850 Android: avoid duplicate paths from QStandardPaths::standardLocations()
Don't return duplicate path entries from calling
QStandardPaths::standardLocations() and as a pass by no empty entries
either.

Pick-to: 6.5
Task-number: QTBUG-104892
Change-Id: If05b20d2c07d75428cb572d9549a39cf21bdef99
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-02-22 04:03:10 +02:00
Alexey Edelev
d51d7d4d5c Add support for evaluating genexes when exporting custom target props
Properties specified in EXPORT_PROPERTIES have their values exported
verbatim, without evaluating generator expression they might contain.
This limitation is removed by the introduced functions. They collect
properties that needs to be exported and evaluate generator
expressions inside the properties using file(GENERATE) before
exporting them. The functions generate the ExtraProperties.cmake
file that contains set_property calls with exported properties
and corresponding values.

Change-Id: If32c30a82a62e8bd48bb91f3df21ff2ad8d07243
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-21 22:42:01 +01:00
Alexey Edelev
0a27f4030e Revert "Avoid mapping BUILD_TESTING to QT_BUILD_TESTS"
This reverts commit e3ecabad22.

Reason for revert: This breaks the CTest internal switches. So it's better to disable testing directly in submodule.

Change-Id: Ia93dc3bb0a3a34021c8e2d6c3d292e3a4909bef5
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-21 21:41:41 +00:00
Alexey Edelev
d1d80d7be5 Add the QT_INTERNAL_CONFIGURE_FROM_IDE option
This switch should help switch off some time consuming operations
that make sense only whe configuring Qt project from IDE.

The switch is INTERNAL and depends on environment variables defined
by IDE application when running cmake:
- Qt Creator, detected by QTC_RUN environment variable
- CLion, detected by CLION_IDE environment variable
- Visual Studio Code, detected by VSCODE_CLI environment variable

Pick-to: 6.5
Change-Id: I44086376109a8af8ebb7ecd8bf64dc34f0631527
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-21 22:41:08 +01:00
Marc Mutz
7db28fb4bd Rename QBA::{to,from}Uint8Array() → {to,from}EcmaUint8Array()
Found in API review: from/toUintArray() is too generic a name, make
sure its name gives enough context.

Pick-to: 6.5
Change-Id: Ie10ff06ae11a5e168c4c91b60a9698a41d0429fc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-21 21:34:07 +01:00
Marc Mutz
81ce878f55 Rename {from,to}DOMRect() → {from,to}DomRect()
Because it's QDomNode, not QDOMNode, either (abbreviations aren't
supposed to be all-caps in Qt).

Found in API review.

Pick-to: 6.5
Change-Id: I37bcd8c38d396709d11c4eab035cdfd2145eb245
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-21 21:34:07 +01:00
Marc Mutz
fed5f24454 QVarLengthArray: fix UBs in insert(it, n, v) ([basic.life], invariants)
In the same vein as e24df8bc72 for
emplace(it, v) and insert(it, rv), this patch addresses the identical
issues in insert(it, n, v). The solution is unsurprisingly the same:
q_rotate() after a resize(size() + n, v).

The 6.2- code will need to look different, because resize(n, v) didn't
exist there.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I1ce91969abc20f2a1e5d05a8545b009a2e0994f6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-21 19:56:07 +01:00
Marc Mutz
147dd6e82f QVarLengthArray: Extract Method QtPrivate::q_rotate()
It seems like we'll need this in lots of other places, too.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I767495c2eb02a2fc85b6f835ad9003fa89315c7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-21 19:56:07 +01:00
Friedemann Kleint
bb2ff8a69f qdoc: Add *.webp as an default image suffix
qdoc does ignore image directories if no file with 'known' suffix
is found.

[ChangeLog][qdoc] *.webp has been added to the list of default image
suffixes.

Pick-to: 6.5
Change-Id: I49524ea13d14dd7e246401dec7deb2ba4e66cb07
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-02-21 18:56:07 +00:00
Friedemann Kleint
71c2c03477 Windows QPA plugin: Remove some duplicated declarations
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ic132495da4bfc12ecf303d018fb4d9ba1c8a1128
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-21 16:59:02 +01:00
Amir Masoud Abdol
ec082fdea6 Fix for a duplicate macro definition
ALIGN was conflicting with a system macro,
/SDKs/MacOSX13.1.sdk/usr/include/arm/param.h.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ia460ee781f8bd1a1cdcff0371efab784c9eebb57
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-21 16:59:02 +01:00
Friedemann Kleint
269f44aebc Direct2d QPA plugin: Add exclusions for Unity builds
Similar to the Windows QPA plugin.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I8e094e4ec49574441d3fd73e7ac2cc6fe3b5fd5f
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-02-21 16:59:02 +01:00
Antti Määttä
ce4a7d607c CTF: Create directory ust if it doesn't exist
Pick-to: 6.5
Change-Id: I046c045a21a30eb0b6f0e883aa5b49e953f0a586
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2023-02-21 14:51:29 +02:00
Mårten Nordheim
32098963f2 Torrent example: Fix use-after-free crash
The crash would sometimes happen shortly after removing a torrent
since the RateController would still try to use it even though
it had been deallocated.

Pick-to: 6.5
Task-number: QTBUG-110622
Change-Id: Icad1531ea58560a3a3157a3ed8c0e6b283573196
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-02-21 13:04:44 +01:00
Mårten Nordheim
f3de92cdad Torrent example: Fix some stack overflow issues
Because of the .size() used as part of the expression it
ends up copying sizeof(qsizetype) bytes to the array,
instead of the (rationally) expected 4 bytes.

Amends 69c31f6f68

Pick-to: 6.5
Task-number: QTBUG-110622
Change-Id: I732e3f4bb5934ff3860087baa91f9bebbf044a7f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-02-21 13:04:44 +01:00
Mårten Nordheim
d3c1445419 Torrent: simplify QBitArray usage
There is specific API for counting number of 0-bits

Pick-to: 6.5
Task-number: QTBUG-110622
Change-Id: Ifa33862ff7b98a59f362bc52c492e8a037799835
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-21 13:04:44 +01:00
Amir Masoud Abdol
6d0c774c51 Set 32 as the default batch size for unity build
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I4497d1abc85578649f03fc8ae4916f56e4f1f351
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-02-21 13:04:44 +01:00
Laszlo Agocs
6afdf30af4 rhi: Do some internal doc fixes
Change-Id: Iefcf06ffc251d160e838ae12729314b29d4f36a1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-02-21 10:13:39 +01:00
Yuhang Zhao
016581e1ca Add missing deprecation guards
The deprecated implementation of QSharedMemory and QSystemSemaphore
are not correctly guarded by the deprecation macros, and thus it's
causing compilation errors when we disable deprecated code.

As a drive-by, change the deprecate version from 6.9 to 6.10
as requested.

Change-Id: Icfed181c27248b9e1381101a64523419097dd1da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-21 17:13:36 +08:00
Friedemann Kleint
3c1bea178c QtCore: Add more exclusions for Unity builds
Removed `_DEFAULT_SOURCE` as it was not consistent, and possible didn't
work in the first place, and was masked by the exclusion of
`io/qfilesystemengine_unix.cpp`.

Amends fc3a9ee601.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I8036e66d29d5ec88608d284436b4e8719144f06d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-21 09:36:58 +01:00
Friedemann Kleint
465438e1b1 QtDBus: Fix declaration of helper qDBusGenerateMetaObjectXml()
Add export to be consistent with the declaration in
qdbusxmlgenerator.cpp.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I08c915a7ee737617388db4c0d1a3d116cb8bc3a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-21 09:36:58 +01:00
Lorn Potter
f3951eb5d0 wasm: fix error in 'cut' synthesized key
Pick-to: 6.5
Change-Id: Idca32c8cedb60563f8f1054d6634ab0411c07d9b
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-02-21 14:41:47 +10:00
Tim Blechmann
c24f4d2c32 corelib: silence -Wcomma with clang-12
clang-12 warns with -Wcomma

warning: possible misuse of comma operator here [-Wcomma]
{ return Q_ASSERT(i >= 0), Q_ASSERT(i < size()), QLatin1Char(m_data[i]);
}

Pick-to: 6.4 6.5
Change-Id: Ice8a809c8ac9069e55aedefa71faf06385e97789
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-21 07:25:51 +08:00
Laszlo Agocs
3e1100f908 rhi: d3d12: Implement missing setNativeLayout function
Change-Id: I8281cf3cfadc2f7cb04017b05f05feb6c5047d9c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-02-20 21:59:46 +01:00
Thiago Macieira
3653ca72b1 IPC: don't check for the file's existence before ftok()
It's documented to return -1 when the file doesn't exist, so we gain
nothing by saying a file we ourselves must have created doesn't exist.

Change-Id: I12a088d1ae424825abd3fffd171dfa1de6705787
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-20 11:28:38 -08:00
Amir Masoud Abdol
950e9dad0e QReadWriteLock: Resolve a redefinition issue
This collides with a similarly name struct/object in qmutex.cpp.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I29404f092db523e21f310b4e5b3cd8cc35170e4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-20 19:28:38 +00:00
Ahmad Samir
dd82f39910 QtMiscUtils: add std::chrono::duration <-> timespec helpers
Change-Id: I91f36a3d651fd57443072fde4c3e8f811682328e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-20 21:28:38 +02:00
Christian Ehrlicher
37032b1590 SQL tests: remove unused tests
They were leftovers from QTDS driver removed with Qt6

Change-Id: I34863912bd41e0b4ca54bf443001f1cb3f20511a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-20 20:28:38 +01:00
Tasuku Suzuki
34a0f2251a Fix build with -no-feature-formlayout
Pick-to: 6.5
Change-Id: I9f552942c206f16ef5e8b96cbf7255a54ff83470
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-21 03:55:53 +09:00
Rami Potinkara
eb0d7b5dcf Android: SKIP cases failing on Android 12 CI with 16GB RAM
SKIP tst_QRhi::tessellation(Vulkan)
SKIP tst_QOpenGLWidget::reparentHidden()
SKIP tst_qvulkan cases

Task-number: QTBUG-108844
Task-number: QTBUG-111235
Task-number: QTBUG-111236
Task-number: QTQAINFRA-5391
Task-number: QTQAINFRA-4733
Pick-to: 6.5
Change-Id: Id227367477173b6ad4cf9433af8eab5976596e70
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-02-20 20:10:48 +02:00
Thiago Macieira
97890c9ab4 QLocale: modernize ascii_isspace() to C++17
And on 64-bit platforms, use a 64-bit integer, which removes a
subtraction from the matching code.

The loop in bytearrayToLongLong() looks like, on x86-64:

        movabsq $4294983168, %rsi
.L1217:
        movzbl  (%rdx), %ecx
        cmpl    $64, %ecx
        ja      .L1216
        btq     %rcx, %rsi
        jnc     .L1216
        incq    %rdx
        cmpq    %rbx, %rdx
        jne     .L1217

Change-Id: I3d74c753055744deb8acfffd1723d8b51e151432
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-02-20 17:30:44 +00:00
Edward Welbourne
daceee6a90 Update Valgrind to its 3.20.0
It now generates its valgrind.h from a valgrind.h.in, but there were
only two @...@ tokens to substitute, so that was easy enough.

From reading the diff, important changes:
* Added x86 support on FreeBSD (32- and 64-bit)
* Added nanoMIPS support on Linux
* Inline assembly fixes for S390
* Added VALGRIND_CLO_CHANGE request

Pick-to: 6.5
Task-number: QTBUG-110999
Change-Id: I66990c958cf40c34e7d58dd60b1e11984303fb64
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-20 18:30:44 +01:00
Edward Welbourne
b73dafbf86 Move access to tzname[] to under the env.var access log
Replace qlocaltime.cpp's qt_tzname() with qTzName() in
qtenvironmentvariables{_p.h,.cpp} so as to put the access to the
standard library global under the control of the same lock as controls
all Qt's calls to tzset() and functions that behave as if they called
it. This avoids UB on access to the global during a call to any of
these functions. Take care to use the lock only for the shortest time
needed.

This simplifies both callers and lets a QDTParser method escape to
qdatetimeparser.cpp to become a simple local static function instead
of a class method defined in a separate compilation unit.

Change-Id: I5ddee5641f2ed7b5676ece10375a1d5232eb7f22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-20 18:30:44 +01:00
Fabian Kosmale
b124171309 QObjectBindableProperty: Avoid use-after-free in notifyObservers
We so far refetched the first observer after evaluating bindings, as
binding evaluating might change the list of observers.
However, that approach did not take into account that the 'this' pointer
might no longer be valid after binding evaluation: In case of a
QObjectBindableProperty (or a QObjectCompatProperty), binding evaluation
might cause a reallocation of the binding storage, and consequently the
invalidation of the QPropertyBindingData.
Fix this by refetching the QPropertyBindingData from the storage (if a
storage has been provided, which is always the case for the affected
classes).

Fixes: QTBUG-111268
Pick-to: 6.5 6.4 6.2
Change-Id: Ie7e143a0bbb18f1c3f88a81dd9b31e6af463584f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-02-20 18:07:16 +01:00
hjk
7b1ba955a6 uic: Add a -no-qt-namespace option
To suppress the generation of the Ui class within QT_BEGIN_NAMESPACE
and QT_END_NAMESPACE.

Change-Id: I6552b41d8e9eccb0475618d7ed7f7cea7f826625
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-20 18:06:33 +01:00
Laszlo Agocs
b74db90be0 rhi: Make the mip size helpers static
Change-Id: Ibe480330290ccddeac0a62b52a8a33c3399cb5bc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-02-20 18:06:32 +01:00