Don't rely on transitive include from qobject.h, which will go away.
Change-Id: I99dd97ff4fb1d0632d040daab0bffa2d7b85d3ae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Hide output like
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.
when building the auto-generated .rc files.
Pick-to: 6.2
Fixes: QTBUG-97729
Change-Id: Id0c32c8015ec2ac0b47b3add52d5c0f8a7a1c203
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Clang aligns the object at 32-byte boundaries even though we
specifically asked for alignof(void*), so tell it not to sanitize the
address of the plugin object. Tested with Clang 12 and 13.
GCC seems not to be affected, even when ASan is enabled.
If this doesn't work, we may need to accept reading a note that is
improperly aligned. I don't think the output will be actually a correct
note because the intra-note alignment will be wrong (I carefully chose
the ELF note name so it would not require alignment, but that's only
valid up to 8-byte alignments).
Fixes: QTBUG-97941
Change-Id: Ice04365c72984d07a64dfffd16b422fe074d8a70
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Allows us to remove redundant information in the platform configs.
Pick-to: 6.2 5.15
Change-Id: Id0c09ce6f22f3bd52ef426c14a1b2806559b2321
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QBindingStorage doesn't depend in-size on much else in qproperty.h,
but is used in-size in qobject.h, thus requiring qobject.h to include
qproperty.h.
As a first step, move the class and the bits it actually depends on,
to a separate header file, qbindingstorage.h, and, for now, just
include that from qproperty.h. The end goal here is to make qobject.h
independent of qproperty.h.
Pick-to: 6.2
Change-Id: I44245a5e57473067e3106d1fd70bf2d744ce0a5f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The code is already in 'ifndef QT_NO_DATASTREAM'. Well, the condition
is a bit more complicated, which makes this nested guard even more
wrong.
Amends 55150f0f0b.
Change-Id: I1c8f35ebc0355185244c8bf098d000b7c5c543d5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
We forgot to adjust the interface and implementation of join() to the
int → qsizetype change in Qt 6.
This part of the two-part patch fixes things in a forwards-BC way, to
allow picking into released versions. The forwards-BC break is in the
second patch of the series.
[ChangeLog][QtCore][QByteArrayList] Fixed a bug when calling join() on
lists with more than INTMAX elements.
Pick-to: 6.2
Change-Id: I26976864e77169ff0db7c672d1d42d88dbfcc437
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Extract and reuse a lambda for initialization and slot object.
Pass a QDBusObjectPath parameter by const-ref.
Avoid implicit ascii-to-utf16 string conversion.
Change-Id: I591ae6e58e010ccabcf9012db866949492e0191d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
No need to capture anything by reference, it's a leftover from when
the MainWindow was changed from inside the lambda.
And no need to wrap the argument to QLatin1String.arg() with QStringView
explicitly. This change is made just for brevity and consistency.
Change-Id: Ib8c163bcf5932d35a9d43dd8ce124588c539d5a4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This may be a useful factor in deciding whether or not you should
perform communications over the network which are not purely essential.
For example, if you have a logging mechanism you can delay uploading
them until you are no longer on a metered network.
Task-number: QTBUG-91024
Change-Id: I19d32f031a3893512dc440914133678004987fb1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Some apps may need more initial memory when linking, emscripten will
fail with:
wasm-ld: error: initial memory too small
This increases the default initial memory form 16MB to 20MB.
Larger apps might still get this error, in which case
QT_WASM_INITIAL_MEMORY can be set.
Pick-to: 6.2
Fixes: QTBUG-97457
Change-Id: Icdc56c41fb3a3852a9a83f7a3dc15820e83e1148
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Add simple QtCore-based test case which spins
a nested event loop.
Change-Id: Ia3a4ef76d561d0554faffcac8d36ae5dda2c6c53
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Misc. fixes, including:
Fix a couple of typos in the JavaScript code. Also, macros-
within-macros don’t work, (without resorting to preprocessor
token pasting), so remove the debug output for now.
Limit the exec() “simulateInfiniteLoop” workaround to
top-level application exec() only. This way, asyncify
can be used for nested QEventLoop::exec() calls. (Emscripten
supports one level of suspend only, so we don’t want
to use that for the top-level exec(), but instead use it
for dialogs and such).
Use the new QEventLoop::ProcessEventsFlag::ApplicationExec
enum value to detect the exec() call type.
Change-Id: Ic702bfc31faf2e9f84ac5d3ccf43d067c5c61bf0
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Doing it the opposite way, by associating the new screen first, will
result in the external screen not going back to mirroring the main
display.
Pick-to: 6.2 5.15
Change-Id: I63970380fc4f0902af5032043809a9c1b1f9f95b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Associating the UIWindow with a different screen will trigger layout
of the child views of the window, including the view that we're in
the process of removing, which doesn't have a platform window anymore.
Instead of protecting every possible code path in the view code
with checks for a platform window we defer the restoring of
mirror mode until after the view has been removed.
Pick-to: 6.2 5.15
Task-number: QTBUG-94530
Change-Id: I8c66106cafa67e06721e621c019b2d10acf02326
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The window may have been destroyed, but the UIView may still be
be referenced and kept alive by the a11y subsystem.
Pick-to: 6.2 5.15
Task-number: QTBUG-94530
Change-Id: I24f1c9d45e80c1bb4c92536e7f91533a94fd077f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Windows 10 has many sub-versions such as 1809/1903/1909/etc,
currently Qt6 can only detect if the application is running
on Win10 or not, which I think is not accurate enough.
Different Win10 version may introduce different features
and bugs, the developers will have to know the exact version.
Only give a general Win10 as an answer is not ideal. I think
Qt should add variables for these sub-versions.
Change-Id: I772d25a528ee2f8a4afba314d701142a06c718f9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Although the QBackingStore constructor takes a QWindow* as a parameter,
it does not inherit QObject and doesn't become a QObject child of the
QWindow. Use QScopedPointer to avoid memory leaks.
Pick-to: 6.2
Change-Id: Ib065163a9149d002f8220a0257bd78549062c595
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Since QByteArray/QByteArrayView don't overload nicely, we need to make
the existing QByteArray overload a Q_WEAK_OVERLOAD (= a template) as a
tie breaker. This automatically prefers the QByteArrayView version
over the QByteArray overload, transparently optimizing existing users
passing char string literals to avoid the implicit creation of a
QByteArray just for passing the separator.
None of our modules exports a subclass of QByteArrayList, so turning
join(QByteArray) into a function template should be ok.
[ChangeLog][QtCore][QByteArrayList] Added join(QByteArrayView)
overload.
Change-Id: I090671d9b94c30b63a986f17e966d124c22b5c54
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It's somewhat difficult to reproduce, but having a mac with a trackpad
and a huge scrollview (meaning I have to scroll fast and a lot), I am
able from time to time to trigger an assert on the line:
Q_ASSERT(pixelDelta.isNull() && angleDelta.isNull())
In all such cases, I can see that deltas are not zero, but equal
to the ones that the next event (momentumPhase == Begin) has.
The code is based on Tor Arne's patch.
Pick-to: 6.2 5.15
Fixes: QTBUG-97945
Change-Id: I874c776b265d3950cc2b6c1d8054363b3d0d1fde
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
New upstream release.
[ChangeLog][Third-Party Code] PCRE2 has been updated to version 10.39.
Change-Id: Ic8db3035bad41a8cdb0d735e593e71124b5df9d2
Pick-to: 5.15 6.2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Beats a manual array with too wide strings. I thought even to simply
replace this with a switch (loc)... it's not like this is
performance-critical code, given it uses QString.
Change-Id: I2bbf422288924c198645fffd16a977778ff8d52d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Currently e.g. -debug-and-release builds are "broken" as it only
produces release binaries on Windows. There are other inconsistencies
also how the recipe deals with various release and debug related options
and how those map the Conan's 'build_type'.
Pick-to: 6.2 6.2.1
Change-Id: I47fa4c1592eefa1b5a1f144691ee33675753e5fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The qt_finalize_framework_headers_copy function uses the module
QT_COPIED_FRAMEWORK_HEADERS property to generate the dependency list
for the ${target}_framework_headers target. In a common case elements
can be added to the QT_COPIED_FRAMEWORK_HEADERS property after the
qt_internal_add_module command call, that's why we need to make sure
that qt_finalize_framework_headers_copy is called after collecting all
headers assigned to the module.
Pick-to: 6.2
Change-Id: I2878fa6b8d4b11677c3f48345bf6e239221074c2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Saying properties are not available depending on feature support
is misleading. It is available even if not supported, it's just not useful.
Pick-to: 6.2
Change-Id: I6325c50867bb873258c70280adb8d75125db2096
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
So that we can wrap it and expose that wrapper to QML.
Also, make the ThemeHints enum available with Q_ENUM.
Change-Id: I920e7cc29c45c81c3a381b14ddb077f259f66b6c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This allows Qt Quick Dialogs to accurately check how it should show
files and directories.
Change-Id: I0f5102553ff9a0484b3714ba176f7e5e668fd05c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Otherwise, the button state maintained by Qt when using the offscreen
plugin is not reset, breaking following tests.
Pick-to: 6.2
Task-number: QTBUG-97964
Change-Id: Ib37fd038e214863e1e316dc3d41e9d28c157b1f8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
To be consistent with prepare_qdoc_args.
Pick-to: 6.2
Change-Id: Ibd40d6c26f6f6fa49ea78b6476f396153b7c4ee5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The offline CSS already had some related rules, but at some point
QDoc lost the ability to produce the required markup. It has now
been reintroduced.
Pick-to: 6.2 5.15
Task-number: QTBUG-97448
Change-Id: I5165cd01f3653dfb35854ca6b8040e8daa434347
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Some users still prefer the fake bold look even if in some cases it does
not look good. So add an environment variable -
QT_NO_SYNTHESIZED_BOLD_LIMIT - to allow that fallback to stay in place.
Pick-to: 6.2 5.15
Change-Id: I8212c1fa36edb4730b187dc4a23ea45f94981154
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Remove at() and chmod() methods of MyEngine class. Those methods
are not used anywhere and look like remainder of old API to me.
Change-Id: I754a4281124cb8c9d74e79a9a2b99fb1b1f41e52
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Remove useless overrides of QAbstractFileEngine methods from the derived
classes. Also remove "This virtual function must be reimplemented by
all subclasses" passages from the QAbstractFileEngine's documentation.
There are pure virtual methods for such use cases. QAbstractFileEngine
already contains useful defaults for classes not supporting all the
functionality.
Change-Id: Ia25965854f3809b15d7502da3749cc2f3414bbc3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
After the split of QHash and QMultiHash this function was not documented
since it was previously inherited from QHash.
As a drive-by also update 'int' to 'qsizetype' in docs
Pick-to: 6.2
Change-Id: I5d168886f13c2cdd4482038e66d0cf218789c847
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The wasm event dispatcher needs to differentiate between
top-level QCoreApplication::exec() and QEventLoop::exec()
calls.
Add the “ApplicationExec” enum value. The value is
undocumented, like EventLoopExec and DialogExec.
Change-Id: I2924daee39ef85a3ea7e766e317b3071b5d7f541
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
targetSquare judges which square the position falls in. The point
scaling calculation method should not be used. The return value of
QPoint operator/ will be rounded up. Modified to separate the x and
y of position to calculate.
Fixes: QTBUG-81842
Change-Id: I70375185a78ba47efe01be3fd490e0fb0f456e17
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Remove the if-there-is-more-than-one-swapchain condition. Surely in a
(onscreen) 0, (onscreen) 1, (offscreen) 0 frame sequence the wait is
essential when starting the offscreen frame. Otherwise we may be
deferred-releasing resources from the still active onscreen #0 frame.
The problem is only apparent with certain frame slot change sequences.
For instance (onscreen) 0, (offscreen) 1, (onscreen) 0 would not show
any problems.
Pick-to: 6.2
Change-Id: I705a0a3ab0b4bc9e4dc2b1c6ff60025d04c739b3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The file needs to be copied into the top-level build config dir.
Amends 7531994379
Pick-to: 6.2
Fixes: QTBUG-97919
Change-Id: I8e0b525cfbd89ce5c7b07b62bfc023a7f8650cb9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The existing symLinkTarget() always resolves the symlink
target to an absolute path; It will be clearer to change
LinkName to AbsoluteLinkTarget. It is ready for the commit
about add symLinkPath() to read the raw link path.
Fixes: QTBUG-96761
Change-Id: I8da7e23b066c9ac1a16abb691aa1c4a5f1ff8361
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Wang Fei <wangfeia@uniontech.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>