Commit Graph

61824 Commits

Author SHA1 Message Date
Antti Määttä
fab8bbd79f CTF: Use qEnvironmentVariable
Pick-to: 6.5
Change-Id: I492da6862491cc476355a318652bd9901fffcd76
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
2023-06-02 13:10:28 +03:00
Antti Määttä
3c7bf8e189 CTF: Remove extraneaus include
Pick-to: 6.5
Change-Id: I6ebe1d6a492e8606762a78bae422fa86440d18be
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-06-02 13:10:27 +03:00
Marc Mutz
5862819918 QVariant: fix shadowing of QVariant::Type/List
QDoc mis-interprets the Type and List template arguments as referring
to the QVariant::Type enum and its List enumerator, resp.

To fix, rename the template parameters from Type to T and from List
to U.

Task-number: QTBUG-112187
Change-Id: Ib4093acdd84cc86a0f85dcc5046b6e7da7885a44
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-06-02 09:13:09 +02:00
Fabian Kosmale
f564e905c1 QVariant: Support emplace
[ChangeLog][QtCore][QVariant] Implemented in-place construction for
QVariant. The constructor taking std::in_place_type<Type> constructs
an object of type Type directly inside QVariant's storage, without any
further copy or move operations. QVariant::emplace() does the same
when replacing the content of an existing QVariant and tries to reuse
previously-allocated memory.

Fixes: QTBUG-112187
Change-Id: I16614ad701fa3bb583976ed2001bb312f119a51f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-06-02 09:13:08 +02:00
Dennis Oberst
18a2c62c07 QByteArray: add STL-style assign()
Implemented assign() methods for QByteArray to align with the
criteria of std::basic_string, addressing the previously missing
functionality. This is a subset of the overloads provided by the
standard.

Reference:
https://en.cppreference.com/w/cpp/string/basic_string/assign

[ChangeLog][QtCore][QByteArray] Added assign().

Fixes: QTBUG-106199
Change-Id: I899b14d74e8f774face8690303efb8610ead95b5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-02 06:43:31 +02:00
Ievgenii Meshcheriakov
1ee7aa741a qdbusxml2cpp: Fail if -c option is used with multiple interfaces
Exit with an error code when -c option is specified by the command
is not processing a single interface. Mention this in the option
description.

Fixes: QTBUG-36405
Change-Id: I7ea217c780d37332278c634f030d20040b7459e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-02 02:11:37 +02:00
Amir Masoud Abdol
6f6bd2c4dc Set QT_FORCE_FEATURE_neon to ON for x86_64h arch as well, on macOS
We were not accounting for `x86_64h` arch, and as a result
cross-compiling with `-DCMAKE_OSX_ARCHITECTURES="x86_64h;arm64`
was failing.

Pick-to: 6.5
Fixes: QTBUG-113694
Change-Id: Ieb50a7a62aabcca76b09f9c853b3faf915eab1a3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-01 22:27:06 +02:00
Marc Mutz
6f529c38ce QVariant::fromStdVariant(): protect against accidental fromValue() ADL pick-ups
The use of unqualified fromValue(arg) in the visitor implementation
invites non-QVariant fromValue(T) overloads to be found using ADL,
which just happen to compile because their return value implicitly
converts to QVariant (like most stuff does).

To rule this out, use FQN QVariant::fromValue() to switch off ADL.

[ChangeLog][QtCore][QVariant] The fromStdVariant() function used an
unqualifed fromValue() call to convert each alternative type in the
std::variant. It now uses qualified QVariant::fromValue() to avoid
picking up unrelated fromValue() overloads whose return value just
happens to implicitly convert to QVariant.

Amends 5927acaf65.

Pick-to: 6.5 6.2
Change-Id: Ica21b08c919459d0a740af03f451e4ffe224b641
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-01 18:39:26 +00:00
Dennis Oberst
60f739f51f tst_ContainerApiSymmetry: make assign_impl() more robust
Refactor the 'CHECK' macro to eliminate the capacity check and
explicitly verify that no reallocation occurred. The previous
implementation had to pass constants to suppress the issue arising
from differing growth rates between implementations.

Additionally, improve the 'std::stringstream' versions of the test
by incorporating the correct values. In the previous implementation,
the usage of:

    auto tData = V(9);
    ~~~
    std::stringstream ss("9 9 ");

had several issues. Firstly, it used the wrong test data since the
container's value_type of '(char) 9' resulted in a tab character '\t',
which was not accurately reflected in the stringstream assignment.
Secondly, this value caused problems in how stringstreams interprets it.

To address these issues, let's make the following improvements:

1. Use a default test value of 65 instead of (char) 9. This value, which
represents the character 'A', is less likely to cause errors and is more
intuitive.
2. Use the tData variable for the assignments in the stringstream. This
ensures that the correct data from the container is used.
3. Change the test value between the assign() calls to verify that the
container's contents are successfully overwritten.

These changes ensure, that the test cases are more accurate and
reliable.

Amends: 3b0536bbe8.

Change-Id: I9441c4818106bf93e93a1a5d2d2d54c89d80e7b0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-01 18:39:25 +00:00
Amir Masoud Abdol
63a0f4dc3b Set CMAKE_<LANG>_FLAGS in PARENT_SCOPE as well
Previously, we were not setting the CMAKE_<LANG>_FLAGS, instead we were
only processing the CMAKE_<LANG>_FLAGS_<CONFIG>. This patch amends that
so we also update the default flags list as well.

Pick-to: 6.5
Change-Id: I7ceb87850a806fe8ad4eac6f8147b312eba01bc6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-01 19:10:12 +02:00
Dennis Oberst
c06bdc316f tst_QByteArray: add Qt::StringLiterals to the namespace scope
... and remove all previous function-level occurrences.

Pick-to: 6.5
Change-Id: I90df40922e3aed15efc04e885d9f54c577a948b6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-01 19:10:11 +02:00
Mårten Nordheim
9a4da4569a QHash: reduce duplication between two lookups
findNode and findBucket are virtually the same

Change-Id: I9ba8534d66f0feaa2dea7c2b9beacf8d5faddb52
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-01 19:10:11 +02:00
Mårten Nordheim
288326eaf8 QWaitCondition/win: Enable actually waiting longer than u32::max
This is done, in part, by swapping the dependency between the wait() overloads.
Furthermore, since QDeadlineTimer is 64-bit and the Win32 API is 32-bit
we have to wait more than once to actually wait until the deadline
is reached.

The unsigned int overload has no documented concept of waiting
'forever'. Though, internally we turn u32::max into 'forever'.

Change-Id: I47d719c0c29bcd6fa0c0043d168a456f2c05774e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-01 17:10:10 +00:00
Orkun Tokdemir
443068dbba Add SKIP_LINTING for generated source files
Since the `SKIP_LINTING` source property was added to upstream cmake
here https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8467,
that source property should also be set for source files generated by
qt's cmake public api

Change-Id: Ic9d6c119abbc7c51b146176970c1d0bafb097abf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-01 19:10:09 +02:00
Tor Arne Vestbø
2f273f5dfd cmake: Copy template Info.plist for macOS manually, like we do for iOS
Unifies the approach between iOS and macOS. By copying the Info.plist
to the build directory, we also open up the possibility to modify it,
which we can't do when CMake does the copy during its generator step.

Change-Id: I59f9f69ac368166bb26d8a5c57bf4ea3f503d51b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-01 14:07:18 +02:00
Yuhang Zhao
d6ed400037 Platform theme: fill QPalette::AccentColor with OS value
The AccentColor role, added in Qt 6.6, is currently populated with a
default value.

This patch implements populating the brush with OS values for Windows
and macOS.

Change-Id: Ic243c3b8664d50db3a2096a034de6ba672d9e2d2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-01 10:02:29 +00:00
Amir Masoud Abdol
a33dd60e21 Add TRY_RUN option to qt_internal_add_tool
To make sure that Qt essential tools can be executed after a successful
build, we can now pass the TRY_RUN argument to `qt_internal_add_tool`.
On Windows, this option creates a custom command and a custom target
(${target}_try_run) for the tool, and tries to run the tool from a batch
script. If the program fails to run because of missing libraries, an
error will be shown, and build halts; otherwise,
`${target_name}_try_run_passed` file will be generated and the build
continues.

Pick-to: 6.5
Task-number: QTBUG-113273
Task-number: QTBUG-112747
Change-Id: I760588714bcf9db69505abe3df717733352a8284
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-06-01 12:02:28 +02:00
Antti Määttä
344bf51cfd CTF: Cleanup writing uuid to Ctf packet
Use QUuid::toBytes instead of manual conversion.

Pick-to: 6.5
Change-Id: Iba2c32eb258e21cd207b5bc19af0409b6b9e26b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-01 13:02:27 +03:00
Laszlo Agocs
8c0b657c9a Refine the rhi-based flush logic
Amends 244daf4cfc

Fixes: QTBUG-113557
Fixes: QTBUG-113652
Task-number: QTBUG-108277
Pick-to: 6.5
Change-Id: I9e369b0e1261ea37eb2dedd80083f82f5df97b30
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-01 12:02:26 +02:00
Laszlo Agocs
da4de6b6e3 Polish forward decl in vulkan and opengl examples
Pick-to: 6.5
Change-Id: I9f05aedc7649ab7e248b7332c04a6664e85182d8
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-06-01 09:09:49 +02:00
Vladimir Belyavsky
3c6c3eccd1 QStringBuilder: remove unneeded specializations
Remove legacy QStringBuilder's specializations:
template <> class QStringBuilder<QString, QString>
template <> class QStringBuilder<QByteArray, QByteArray>

Change-Id: I49238356620712009b32286ebc42e52fe43ede63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-01 06:44:15 +00:00
Thiago Macieira
77e89dcce4 Remove the mandatory x86-64 features from its feature list
The x86-64 architecture mandates support for MMX and SSE2, so we don't
need to tell that the compiler generates them. They're implied.

This could serve to determine that the user specified no -march= or -m
flags that affect the architecture on the CMAKE_CXX_FLAGS, but fails if
the compiler does that on its own for this particular target. For
example, both for Android and macOS, the minimum feature set is SSSE3
for 32-bit and SSE4.1 for 64-bit.

Change-Id: I76216ced393445a4ae2dfffd172a94b17e8a9a37
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-05-31 14:55:37 -07:00
Thiago Macieira
2e1318f691 QSemaphore: add a note to update to noexcept in Qt 7
The QSemaphore acquire & release functions, plus the constructor and
destructor, can be made noexcept on platforms that use futexes
(currently, Linux and Windows; likely macOS by the time we make 7.0). I
didn't make the change right now because the acquire and release
functions have narrow contracts on the int n values. I didn't make that
change now because it make a mess of the code, for little gain as this
class isn't used that often.

Plus, we may want to investigate whether we want to keep the multi-token
semaphore functionality around (something neither POSIX sem_t nor
std::counting_semaphore have), or split that off into a separate class
like QBasicMutex / QMutex / QRecursiveMutex was done.

Change-Id: Ieab617d69f3b4b54ab30fffd175b27813728f2ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2023-05-31 14:54:57 -07:00
Thiago Macieira
52fa66d087 QNativeSocketEngine: fix warning about uninitialized variables
In function ‘int qt_safe_connect(int, const sockaddr*, socklen_t)’,
    inlined from ‘bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress&, quint16)
qnet_unix_p.h:111:38: error: ‘sockAddrSize’ may be used uninitialized [-Werror=maybe-uninitialized]
qnativesocketengine_unix.cpp:396:18: note: ‘sockAddrSize’ was declared here
qnativesocketengine_unix.cpp:476:14: error: ‘aa.qt_sockaddr::a.sockaddr::sa_family’ may be used uninitialized [-Werror=maybe-uninitialized]
qnativesocketengine_unix.cpp:471:17: note: ‘aa’ declared here

Introduced by commit 45a03fc506.

Change-Id: I5f7f427ded124479baa6fffd175fbf006c098854
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-31 14:54:56 -07:00
Tor Arne Vestbø
ea1af6b7ed Only consider QScreen virtual siblings that have been added
If a platform builds up a list of QPlatformScreens, and then adds
them incrementally, while at the same time implementing virtualSiblings
in QPlatformScreen to return the full list of screens, the virtual
sibling QScreens will contain nullptrs for each non-added screen.

It could be argued that this is the fault of the platform plugin,
since it's reporting a virtual sibling that it hasn't added yet,
but we can easily work around it in QScreen as well.

Fixes: QTBUG-113977
Pick-to: 6.5
Change-Id: I4b9472646a5cc10b6fd35c606e3ae15941da1587
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-05-31 16:37:26 +02:00
Amir Masoud Abdol
672a1d022c Implement qt_internal_get_file_path_mode for changing the file path mode
In cases where we allow symlink, we need to use ABSOLUTE path, and don't
resolve the symlink. This function returns ABSOLUTE only if we are on
Apple platform, and have QT_ALLOW_SYMLINK_IN_PATHS enabled. While this
is mainly to resolve the issue report by Homebrew, it might be useful if
a user really want to build with symlink.

Pick-to: 6.5
Task-number: QTBUG-113463
Change-Id: Ided141ed8de66cc1d3717ec2719eb703fa7fc589
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-05-31 16:37:25 +02:00
Fabian Kosmale
7041d9dd75 QVariant: visually separate PrivateShared and Private nested classes
Add an empty line between the two.

Pick-to: 6.5
Change-Id: If1c50ebb0b825acc53364cce2e083332367e757c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-31 16:37:24 +02:00
Fabian Kosmale
1e0e16b5f3 QVariant: Extract Method PrivateShared::computeOffset()
Will be re-used in the upcoming emplace() function.

No attempt is made to re-write the expression to be more
readable. That's left for another commit.

Task-number: QTBUG-112187
Change-Id: Id391b78f1477c5225beda8a32c4f6c1393dd51bb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-05-31 16:37:23 +02:00
Amir Masoud Abdol
585dd9d8d5 Add NOMINMAX to PlatformCommonInternal
By not explicitly disabling min/max macros of `windows.h`, we may see
some unintended substitutions. This is especially important now that we
are moving toward enabling Unity Build, and some of the constructs for
manually dealing with this issue, eg., `#ifdef max`, `#undef max`, might
not make it to the pool, and as a result we get build failure.

Pick-to: 6.5
Change-Id: Ie3c31aebe00300126a2ac3a6044876ab92d5d99c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-05-31 16:37:22 +02:00
Fabian Kosmale
4e860a66d6 QVariant: Extract Method PrivateShared::computeAllocationSize()
Will be re-used in the upcoming emplace() function.

Task-number: QTBUG-112187
Change-Id: Ie2b4570b7ba6c9d0ce938203933758a0d0d59f5a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-31 16:37:21 +02:00
Marc Mutz
3a7ddd7274 QVariant: simplify condition guarding customClear() calls
Due to short-cut evaluation of the built-in op||, we can do the
following transformation:

    - (X && Y) || !X
    + !X || Y

Pick-to: 6.5
Change-Id: Ia5ae1dd60bdb663aa4648c09372be1598591110d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-05-31 14:37:20 +00:00
Marc Mutz
496bd9e975 QVariant: remove outdated docs about reimplementing clear()
QVariant::clear() hasn't been virtual since at least Qt 4...

Pick-to: 6.5 6.2 5.15
Change-Id: If6b5669d91f8d9c7ed2d152d18852a8d6f8e491a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-31 16:37:19 +02:00
Dennis Oberst
e07710007b QArrayDataPointer: fix optional projection in assign()
When a custom projection is used in the assign() function, there is a
problem with the optimization step at:

    dst = std::uninitialized_copy(first, last, dst);

The issue arises because this copy doesn't respect the custom
projection. To address this problem, we need to ensure that the
optimization is only applied when using the identity projection.

Amends: 7ca633d9a8.

Change-Id: I912525c716333ee2c22c419f2bf70201086c5635
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-05-31 14:37:19 +00:00
Edward Welbourne
9da9ca0ac7 Remove unused IS_RAW_DATA() macros from q{string,bytearray}.cpp
They were made redundant at Qt 6, so now they're just defined and undefined.
Don't even do that any more.

Change-Id: Ic4a4a4c39c50c9af417ea6c52be5f69a2d4856c6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-31 16:37:18 +02:00
Alexey Edelev
65c1ac1df6 Avoid adding the redundant install rules for module headers
If module doesn't contain headers we should skip adding install
rule of the geneated by syncqt module headers, since the staging
directory will not be created in this case.

Change-Id: I89db5f1447d60cae48cd6ae4b9ef080dcf50e34c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-05-31 13:01:35 +02:00
Alexey Edelev
5cf79c2b9b Fix Clang platform detecting mechanism
CMake not necessarly sets MSVC or MINGW when detecting Clang compiler.
We should rely on CMAKE_CXX_COMPILER_FRONTEND_VARIANT instead when
detecting Clang platform.

Fixes: QTBUG-113630
Pick-to: 6.5 6.2
Change-Id: I8c14939ddc0839ddf2b3419392aa843deeef4bb5
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-31 12:58:00 +02:00
Mårten Nordheim
0925a98ec3 Network chat: Update example meta info
Task-number: QTBUG-108873
Change-Id: I46a412beb406cf66daf552adbef165dc246dadc2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-05-31 12:56:01 +02:00
Mårten Nordheim
f3d2e2f555 Network chat: style fixes
The if statements were originally broken to fit 80-column width
but didn't have the braces we typically require.
It anyway fits inside our new 100-column width, so just do that.

Task-number: QTBUG-108873
Change-Id: Ib632f35607e6b716141c4c5d8211de7a0745c6ab
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-05-31 12:56:00 +02:00
Mårten Nordheim
e33bbdb0ea Network chat: simplify lookup function
Task-number: QTBUG-108873
Change-Id: I3ca0c976236003c708130ed120dba14cfbbf8185
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-05-31 12:55:59 +02:00
Mårten Nordheim
804b26b77d Network chat: when removing an entry in multihash, specify which one
Using only the key means all clients with that IP address are removed.
But there could be multiple clients running on the same multi-user
system.
So, use the value as well to remove just the specific one.

This also fixes a bug where, when a client disconnects, all of the
connections are removed from the client's map, but only _one_ is removed
from the GUI.

Task-number: QTBUG-108873
Change-Id: I87da862e8f337fd9c246ff5a2d243e514076fa5f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-05-31 12:55:58 +02:00
Mårten Nordheim
6eac22e2ca Network chat: avoid double lookups into hash
Task-number: QTBUG-108873
Change-Id: Iafa5a7a1ec99d2414f175f2d30fe03a90c6716f3
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-05-31 12:55:57 +02:00
Mårten Nordheim
9db22a63a9 Network chat: Use QStringBuilder
It is a best practice after all

Task-number: QTBUG-108873
Change-Id: I11c23c080f6fe7f124e461affa88279d5def93f9
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-05-31 12:55:56 +02:00
Mårten Nordheim
61afc6d109 Network chat: make ctors explicit
Task-number: QTBUG-108873
Change-Id: I08cd676aeb732d32b4d1e7d13a0aa1b37a46283f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-05-31 12:55:55 +02:00
Mårten Nordheim
3ece5e30b7 Network chat: default-initialize or direct-initialize members
Where possible

Task-number: QTBUG-108873
Change-Id: I8125ffd63cd0ad1970575fb1a6b85021c03c38d5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-05-31 12:55:54 +02:00
Mårten Nordheim
c437c33f29 Network chat: update includes
Prefer own headers, avoid full-module includes

Task-number: QTBUG-108873
Change-Id: I4282d4aab5fd66c64fc27cd130b223d33069d80f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-05-31 12:55:54 +02:00
Marc Mutz
39cdf431f0 QObject: add setProperty() overload taking rvalue QVariant
Instead of duplicating the long-ish implementation, simply pass the
variant as pointers to const and mutable, and implement a runtime
version of std::forward.

[ChangeLog][QtCore][QObject] Added setProperty() overload taking an
rvalue QVariant.

Fixes: QTBUG-113281
Task-number: QTBUG-112762
Change-Id: Ifdc8f626ad5db138073474c3bd95ec7308c4396b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-31 12:05:21 +02:00
Matthias Rauter
b8b34544d0 Add uniformCellWidths and uniformCellHeights to QGridLayoutEngine
Some users wish to make layouts with uniform column widths or
uniform row heights, ignoring the sizeHints of individual items.
This patch enables this mode in the QGridLayoutEngine, used
by the QuickLayout.

The sizeHints are aggregated and their average preferred size
and extreme minimum and maximum sizes are respected in the
layout.

Change-Id: Ibb9409eb0a11a1ce8bb305f44a4cb0071c871ec9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-05-31 11:04:22 +02:00
Antti Määttä
38c8eb8564 tracepointgen: Fix double comma in enums
Remove commas at the end of the lines.

Pick-to: 6.5
Change-Id: Idf731ac5de64787276c1fdf798eb429b8f73213b
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2023-05-31 08:18:58 +03:00
Antti Määttä
f1257b15cb Fix reading multiple ranges
Fix reading ranges from metadata when there are multiple RANGE
elements in the metadata.

Pick-to: 6.5
Change-Id: I1d176ded539c55ce72664c9c7c3f65d694be898c
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-05-31 08:18:51 +03:00
Antti Määttä
8a45faba36 Tracepointgen: Fix reading enums from multiple files
Don't stop searching enums if the enum partially matches.

Pick-to: 6.5
Change-Id: Idc2b45cee5a32994d55fe90c038938f0ad8b4a59
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-05-31 08:18:45 +03:00