A recent update [0] to the IANA timezone database has improved the
historical accuracy of transitions in Mexico. It turns out that the
transition at the start of 1970 was not a real event. The only actual
change then was that Mazatlan has followed the main Mexico zone rules
since then, having ignored some transitions of the main zone in
earlier decades.
[0] 812aff32b3
Fixes: QTQAINFRA-6757
Change-Id: I65d8ea1dfa76ce635bf11ffcc1ded8c9ceaf9fec
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 8a27c310b1e4ebc74999e09551ca5eab4570a68e)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Because the documentation for GetTempPath nows says apps should call
GetTempPath2.[0]
Starting with Windows 11[1], and recently Windows 10[2],
GetTempPath2 was added. The difference being that elevated
processes are returned a different directory. Usually
'C:\Windows\SystemTemp'.
Currently temporary files of an elevated process may be placed in a
world write-able location. GetTempPath2, by default, but can be
overridden, places it in a directory that's only accessible by SYSTEM
and administrators.
[0] https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw#remarks
[1] https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppath2w
(Minimum supported client - Windows 11 Build 22000)
[2] https://blogs.windows.com/windows-insider/2025/03/13/releasing-windows-10-build-19045-5674-to-the-release-preview-channel/
(This update enables system processes to store temporary files ...)
[ChangeLog][QtCore][Important Behavior Changes] On
Windows, generating temporary directories for processes with elevated
privileges may now return a different path with a stricter
set of permissions. Please consult Microsoft's documentation from when
they made the same change for the .NET framework:
https://support.microsoft.com/en-us/topic/gettemppath-changes-in-windows-february-cumulative-update-preview-4cc631fb-9d97-4118-ab6d-f643cd0a7259
Change-Id: I5caf11151fb2f711bbc5599231f140598b3c9d03
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 69633bcb58e681bac5bff3744e5a2352788dc36c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6a684a53b371ec483b27bf243af24819be63f85f)
(cherry picked from commit bbeccc0c22e520f46f0b33e281fa5ac85ac9c727)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
The widget might become nullptr, especially after delivering events to
it. So consistently test for nullptr before calling the event function.
Fixes: QTBUG-128478
Change-Id: Ieed4e8b68b41488fafd9946d718c1d77fad39a44
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 6b86d9d08b407a56bad2d37f65169e36356b0741)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 92005e34e8c20a89a27a4f8a7a0ad6bd46745b50)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
On some platforms, localhost resolves to both ipv4 and ipv6 addresses.
In that case we might get multiple emissions of the
socketStartedConnecting signal, for Happy Eyeballs.
Change-Id: Ib39a167bdde2089106c89a3e297cbb0ad2f357d9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 13a0f294b5ef2ec8a2057d72365f989ddf6290de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6e98673846b3a5e992f7220b4e0f1b4ecfb9cdaa)
(cherry picked from commit ff909d8b4cb1d423fd51412564d12b4e4d999794)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Do not try to access non the existent input element when there is no touchscreen,
as we do not use it in that instance.
Fixes: QTBUG-125120
Change-Id: Iedac1890d13b348ef12690947779347e3c2f8476
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 41cb01dc595c8de374ce58ae43afbb69db70c379)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f01a0e9ed90cd970d5b089648424ab4af1aed594)
The static QMessageBox APIs taking button texts instead of standard
buttons promises that the return value is 0, 1, or 2. After the change
in b30121041c07b1b8613eaf624c9aa55a51001aef the return value of exec
for custom buttons was changed (as the documentation says its an opaque
value), which unfortunately affected the deprecated functions.
To fix this, we use the index of the clicked button in the custom
button list, to restore the previous behavior of the deprecated
APIs.
Fixes: QTBUG-125858
Pick-to: dev 6.8 6.7
Change-Id: I96d39e42b64e2b55eab07e2f15df71b94cfe3e6d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
We were splitting the Unicode command-line using CommandLineToArgvW(),
then converting to 8-bit for argv. That was practically always the same
as what the runtime had already stored in __argv. But not always: it
looks like the runtime splits the 8-bit command-line (GetCommandLineA())
and there are certain Unicode characters that WideCharToMultiByte()
converts to a quote ("), which causes the command-line splitter to
differ from what Qt is doing.
__argv may not always be populated, if the user requested a wmain()
somehow, because that causes __wargv to be populated. Therefore, we need
to keep the old code.
[ChangeLog][QtGui] Fixed a bug that caused Qt applications to disregard
Unicode command-lines on Windows even when argc and argv were passed un-
modified to QGuiApplication or QApplication. This happened only for
builds with Visual Studio and in the "windows" subsystem (not
"console").
Pick-to: 6.5
Fixes: QTBUG-125380
Change-Id: If05cb740b64f42eba21efffd17d007799f99d8bf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 993b197d9c944060763fb46514c5c1d31abce205)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 34533705b27838d1507f1267cdf55ce6a399b225)
Based on the documentation, the numeric keypad key 5 is commonly mapped
to Qt::Key_Clear, when Num Lock is off. Previously the number 5 was
returned also when the Num Lock is off which caused an ui application
being unable to disable the numpad key number 5 when numlock is off.
Fixes: QTBUG-125958
Pick-to: 6.5
Change-Id: I62f7521376890a201cd11abf78847bcb0eb1752a
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit cc89c4c76567184b2887952dfe44375ff3ebd28d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8f50ece5fa3a5fe6751681e0a6530e51037b6acb)
Extending the fromCharacter() tests to check for the construction to
be noexcept and implicit turned up a few bugs:
The constructor from char32_t was simply not marked as noexcept, even
though all its operations were. So just mark it noexcept.
The constructor from QChar, otoh, was never called, (certainly not for
rvalues), because QString happens to be constructible from QChar (and
QLatin1Char and QChar::SpecialCharactor), so due to perfect
forwarding, the if_convertible_to<QString> ctor won, allocating a
QString.
This is a regression of Qt 6.5 compared to Qt 6.4.
To fix this, exclude arguments that convert to QChar from matching the
if_convertible_to<QString/QByteArray> ctors, taking care to not match
those arguments that are already compatible_char<>s.
This, in turn, creates a problem for implicit QASV construction from
QLatin1Char and QChar::SpecialCharacter, because now that we've
excluded them from the if_convertible_to<QString> ctor, calling the
existing QChar or QString non-template constructors for these types
would require two user-defined conversions (from said type to
QChar/QString and from QChar/QString to QAnyStringView). That works
for explicit construction, but we need implicit convertability.
So bring out the big guns once more and add a perfectly-forwarding
ctor for anything convertible to QChar. QChar itself is actually
already handled by compatible_char<>, so the old QChar non-template
ctor can go. The extra copy of the QChar argument will be optimized
away by the compiler.
[ChangeLog][QtCore][QAnyStringView] Fixed a regression where
constructing a QAnyStringView from a char-like type (QChar,
QLatin1Char, ...) would first construct a QString and only then
convert that to QAnyStringView.
Amends 812a0d3125cb89e340c59aa92cdc946862fb009d.
This change is forward and backward BC and SC, but not
behavior-compatible: certain operations detectably change
noexcept'ness, and some arguments may now cause the resulting
QAnyStringView to have a different encoding (though I really tried
hard to avoid that).
Since it's a regression, I proposed to pick this to the affected
branches, 6.7 and 6.5 (6.6 is already closed at this point).
Pick-to: 6.5
Fixes: QTBUG-125735
Change-Id: I86f37df5d80bee36db27e529c017cb73995a6831
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 88b1c9623903d54bd64cc92aa2dd61ee4ff4389b)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
It could appear in runtime, this allows applications to watch for it
themselves and re-create QSystemTrayIcon as needed.
Task-number: QTBUG-94871
Pick-to: 6.5
Change-Id: I10678cca4238ec0212c69155c9f22c07755ab1a8
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 3c93dedc063bf453bcda581b4e9ccab5a810c80f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We need it for the ioctl() to get the label and we already have it open.
Change-Id: If3345151ddf84c43a4f1fffd17d3f7f1312ca185
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 24b1e52a1a46e9c7801a1bfffb963e56610872a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Linux kernel version 5.8 added support for the stx_mnt_id field in the
struct statx because "Systemd is hacking around to get it and it's
trivial to add to statx, so...". This allows us to much more neatly
match the lines in /proc/self/mountinfo.
The same kernel version added STATX_ATTR_MOUNT_ROOT so we can tell if a
given path is the mount point of a filesystem. We don't have a need for
that information for now.
We need to retain fallback code for two reasons: first, the user may be
running with an old Linux kernel, in which case we won't get the
STATX_MNT_ID bit set in stx_mask. Second, we may have failed to open()
the path in question, because the user may not have the necessary
permissions.
There's still a race condition because the mount IDs can be reused
immediately after something is unmounted. There's a 64-bit unique mount
ID (available since v6.8) but it's not reported in /proc/self/mountinfo,
so we couldn't us it right now. We can with 6.8's statmount().
Task-number: QTBUG-125721
Change-Id: If3345151ddf84c43a4f1fffd17d3f7dbce4ff16b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 8836b677786ec4c967a9adfe5fc7a1febcb1a12e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit ddc39eb3a46d699c23d39f0e914978199eb98cc6 ("QStorageInfo/Linux:
fix mountedVolumes() for paths mounted over") added a clever check that
did stat() on the path to figure out if it was the device that we'd just
found on /proc/self/mountinfo. But if the same device was mounted on top
again, we may have got the wrong answer.
More importantly, since kernel 6.9, btrfs subvolume mounts no longer
report the subvolume's block ID in /proc/self/mountinfo, which would
lead us to conclude every single subvolume has been mounted-over.
So let's revert back to string-matching later lines to see if any is a
parent path.
https://lore.kernel.org/linux-btrfs/2548140.Uh0CODmnKu@tjmaciei-mobl5/T/
Fixes: QTBUG-125721
Change-Id: If3345151ddf84c43a4f1fffd17d3d59fef4446dd
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit ad968d3602eec2b1f34a9c80606e59c5a2c76a2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This allows to have system tray support on the fly on Wayland at least
where only QDBusTrayIcon is possible and no need to fallback to
QSystemTrayIconSys
Fixes: QTBUG-114439
Task-number: QTBUG-94871
Pick-to: 6.5
Change-Id: Ic927cde585ef02f9b9ef03f3b6338f35072bef70
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit f6cd286e6609cfbfda50bc74e96e115f3f8ec0ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The overload taking a Qt::TimeSpec is deprecated; we need to use
the one taking a QTimeZone instead. However I can't just use
QTimeZone because this is inline code in qdatetime.h, and QTimeZone
is only forward declared there. Moving the definition in qtimezone.h is
possible (like it's done for zoned_time), but that is a source break
(requires a new inclusion from users) and also weird (this function
doesn't deal with timezones, why do we need to include qtimezone.h?).
Instead, just add another overload of fromStdTimePoint that takes
precisely sys_time<milliseconds>. As such, it can be always available
even in C++17, and implemented out-of-line.
Even if this is a new symbol, the new commit policy allows the
backport. I also don't think this qualifies as a new feature;
it's a cleanup that we forgot to do (if we had a C++20-enabled
configuration in the CI when we also did the fromMSecsSinceEpoch
deprecation, we would've caught this).
Pick-to: 6.5
Change-Id: Ica77da291be4bcda2ffc7c164316a2977974c386
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit c4fc3a74b4525ad5d80e558707301a12e4d4cb19)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QOpenGLBuffers used by QOpenGL2PaintEngineEx are tied to a specific
share group on creation, via QOpenGLSharedResourceGuard.
If QOpenGL2PaintEngineEx is later used with a recreated QOpenGLContext,
that happens to live at the same address as the previous one, we will
fail to detect that the context has changed by using a naked pointer
comparison (ABA problem).
If the share group of the new context is different, this will cause
problems down the line in QOpenGLBuffers::bind(). This scenario has
been observed on Android, where the context created in
QOpenGLWidgetPrivate::initialize() ends up with the same address,
but then adopts a new share context from RHI, because the widget has
been moved to a different top level window.
To remedy this, we store the QOpenGL2PaintEngineEx's cached context
via a QPointer, so that we pick up the B state of ABA (null), and
correctly throw away the old buffers in QOpenGL2PaintEngineEx::begin.
Change-Id: I5c221a37fd95f846d96e72509bba54f3d10fee3a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 8f6b27fdeef4f45d70c7bc93f7393f58f5ddeb16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test data is provided as float, so we must obey [conv.fpint]/1 when
converting from float to integer types. There are values in the rows
that are outside of the range of short and shorter integers, so just
check the range.
Fixes: QTBUG-125889
Change-Id: If3345151ddf84c43a4f1fffd17d405ee0cd00d44
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3c9bb0daaf0cbff9135f88e55bae8243aa937faa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since 6.5, you can declare the Q_OBJECT macro in any class section, not
only in private. The docs are updated accordingly. The Q_OBJECT macro
specifies a private section on its own, thus making private all the
members declared after the macro. This is an important behavior change,
so the note about it was rewritten for clarity & moved a little bit up.
Fixes: QTBUG-125776
Pick-to: 6.6 6.5
Change-Id: Ifba063af7cf7fe7258b6183da5a4599784171052
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit ce26eaf1b9300a788f7c3caa18dd8a5eec23da23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Drag-dropping and image from for example photoshop didn't work in Qt6
due to a (probably?) copy paste error in the commit
8fa91c75ad0cb0b1905c6775b62f734bc610fb60
Pick-to: 6.5
Change-Id: I18dedc09596fe590e915e3aa526131f2d6957d8b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 5b7422f74d73822aeab76163811ea1fcaafabc12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Recent zstd versions provide the libstd target but not only libzstd_shared
or libzstd_static. Attempt to use it as the WrapZSTD::WrapZSTD counterpart
if the target exists.
Task-number: QTBUG-119469
Pick-to: 6.5
Change-Id: I47916bfa6f10883d099184a497800277c8026b14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7d9d1220f367d9275dfaa7ce12e89b0a9f4c1978)
Promote all internal zstd targets if they were found by WrapZSTD to
global using PROVIDED_TARGETS mechanism.
Amends 7d9d1220f367d9275dfaa7ce12e89b0a9f4c1978
Task-numer: QTBUG-119469
Pick-to: 6.5
Change-Id: I15ec484304f7bf2b3ee2a533d2badb3bb7797863
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3073b9c4dec5e5877363794bf81cbd4b84fdb9ee)
Because the configs passed to the ALL_CMAKE_CONFIGS option were quoted
cmake_parse_arguments(PARSE_ARGV) would escape the semicolon in
the set value, effectively doing
set(arg_ALL_CMAKE_CONFIGS "Release\;Debug")
Then the
list(GET arg_ALL_CMAKE_CONFIGS 0 first_config)
call would essentially do
set(first_config "Release;Debug")
and the
if(all_configs_count GREATER 1
AND NOT arg_CMAKE_CONFIG STREQUAL first_config)
condition would never trigger because a single config string can never
equal a double config string.
Remove the quotes to ensure correct behavior.
This won't really trigger any behavior change, because we exclude
installation of Debug executables in -debug-and-release builds,
but it will make --trace-expand logs less confusing.
Amends f240d94f140ba1614828804efafd2fc5e6d00099
Change-Id: I53179511c7698c90b33cb3ff2762cef680a99815
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a1445670f5860398b475ad8ed87ba0629275499e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With WinUI3 a new layout of the lineedit and buttons was introduced. The
buttons are now aligned horizontally instead of vertically. Trying to
mimic that layout in widgets results in too few space for the text in
the lineedit. This patch increases the minimum width when using the
QWindows11Style for QAbstractSpinBox elements and saves the original
width in a property in case the style is changed at runtime to restore
the original geometry.
Fixes: QTBUG-124235
Fixes: QTBUG-124150
Change-Id: I8067b338fa4a2c1efd0a1b0644fb8a563601385b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b457376c038acc0c1cb9a0966508b4999314ea86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This exercise found an inconsistency involving char16_t. Filed
QTBUG-125588 to keep track of this and decide how to deal with it.
Task-number: QTBUG-125588
Pick-to: 6.5
Change-Id: I259fecef34539e8841149570d7411d959b48d876
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4bb36a6e78ad6e5ca67af402bc17695d11282b60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These were not covered by the existing tests.
Pick-to: 6.5 6.2
Change-Id: I909ea3aa5b676904dc72ecf8ce32b73cca1b6af7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 39189190fee872d2e6fcaca0f5c10d0ba6a70ea6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were only handling the case where uri-list was a file.
This fixes a regression.
Also - add dragging url into the clipboard manual test
Pick-to: 6.7.1
Change-Id: Ifbd087ffd157463b6b903199e3ff22c2de1c4942
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit d67d49f45ec84aba4047305825f36bbc02d3d26c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A file specification in PDF is a string (§3.10.1 of the PDF 1.6 spec).
As such, it needs to be properly encoded. Right now the code was
doing a naive conversion to latin1 (which was lossy), and was not
considering things like round parenthesis which need to be properly
escaped. Just use printString instead.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: Icdcf8b553955d31fe2bc430dea54bb6e68221fc7
Pick-to: 6.5
Reviewed-by: Albert Astals Cid <aacid@kde.org>
(cherry picked from commit 0effdc98dcaaf4fab118f9834f67b4d5d3107d7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The constraint requires the input time_point's duration to be
convertible to milliseconds. That's inaccurate: we need to check the
duration of the time_point we get from the clock_cast, not the input.
In general, clock_cast is allowed to return arbitrary durations, so
it may not match the input. (It indeed doesn't match for some
standard clocks, like gps_clock.)
Task-number: QTBUG-125587
Change-Id: I5a93317c8cdc0a3cef4acab17c656e2e5dac5d8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e95812df85d98689d51bed92acce51e0e250f854)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QMimeData::retrieveData() checks whether the returned QVariant value is
valid, i.e. the variant contains some data. If the variant contains an
empty QByteArray, it will be considered valid.
So retrieveData_sys() should return QVariant() in case data with the
specified mime type cannot be retrieved.
Fixes: QTBUG-125531
Pick-to: 6.5 6.2 5.15
Change-Id: I0a668ca7ad5b2c5430335e8554cc597747287173
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 59b7e143a98c1a91587f8cc87e92c0bc0650f55d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
You could get the idea that the underlying int value is indicative
of the severity. Make it more explicit that the order in the text
is the correct one, and reorder for Qt 7.
While at it, remove mentioning of Qt 5.5.
Fixes: QTBUG-102347
Change-Id: I5d1b46afb37e50baa209a06c192a943980ca774b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 469367dc08654e02dae39162750fce7fa39d906d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add missing checks for integral overloads uint, short and ushort and
character overloads char and char16_t (the latter being a reproducer
for QTBUG-125588).
Pick-to: 6.5 6.2
Task-number: QTBUG-125588
Change-Id: I479e4c8c3cd86c3f85ab3c9d44b79158b0a48476
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit a6d2e45d5765c0c05e408c6c74a05c9d70fe1bdb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found by ubsan: if rhs is nullptr, then we fed a nullptr as the second
argument of memcmp(), which is UB.
Fix by catching an empty rhs before we reach that line.
Amends e52d50a03da29e2dddaee551e4409f28c7ed56f2 (which, despite
pick-to's to the contrary, never made it into 6.2 or 5.15).
Change b977ae371a753a82e1d0bb32c5b62099da663721 fixed this for
UTF-8/UTF-8 comparison from 6.5 on, but 6.4 ad 6.3 remain vulnerable
there, but they're closed, so can't be fixed anymore.
Pick-to: 6.5
Change-Id: I12fa986aa82a7440a9d53fad19a15e9420233e0b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 89f184b4034ce54b8a3439069e57b0f35798fec3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
setFloating() called on the 2nd last dock widget in a floating tab
didn't cause reparenting to the main window. The dock widget remained
parented to a QDockWidgetGroupWindow, while no longer being part of
floating tabs. The QDockWidgetGroupWindow would therefore have only
one tab, which is an inconsistent state and causes crashes.
Factor out the implementation of setFloating() to a new
QDockWidgetPrivate::setFloating(). Reparent to the main window, if
the dock widget is part of floating tabs.
Add test functionality in tst_QDockWidget::setFloating().
Turn createFloatingTabs() into a macro, in order to QSKIP() in the test
function's scope.
Fixes: QTBUG-122394
Pick-to: 6.5
Change-Id: I3719785f310b131446cdea908f09b7195c992b3e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a910daf52678469b7e595da5fe54aa09ba2373c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This tests assumes existence of `PATH` environment variable. This
variable is not a special variable on VxWorks (it's neither set nor
evaluated by command line), causing this test to fail.
Skip this test as it's not applicable on VxWorks.
Task-number: QTBUG-115777
Change-Id: I431b3f0a0ff9efefffc356bb5c7e11fdfac78690
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 480d9bb67dd7232a9cdd462d0bcdcc932c0b0f6b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They're content-equivalent, except that the latter doesn't have to
allocate a return value on the heap.
Change-Id: Ifcae47b487c80c2bac02900f08393b386cfe806c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit e0d87f70d87a63aa55a11ecb91f8d355767d61bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coin is currently missing support for arm64 signing. Drop the signing
on arm64 for time being to allow packaging flag to be added to export
arm64 builds.
Change-Id: If684fa4d787fccb99ac9a0ebad56ec723faba354
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit 8d5e7d50d8dbf1ad79bd8ff9f6ef6028eba481c9)
As part of d8bbb5ee0e60d44a70d29306e607a59caf7fe5bc the order of
QDialog::accepted/rejected and QDialog::finished was changed so
that the latter came last. This has been the behavior now for
the entire Qt 6 series.
QPrintDialog didn't pick up on this new behavior, and was emitting
the QPrintDialog::accepted(QPrinter*) signal after calling the
dialog's done() method, which resulted in emitting finished before
the QPrintDialog printer-specific accepted signal. Clients such as
the textedit example, who would "clean up" in finished() would then
crash when processing the accepted signal.
We now emit QPrintDialog::accepted(QPrinter*) at the same time as
the dialog's accepted signal. The natural place to do this would be
the QPrintDialog constructor, but that's spread out and duplicated
between all the platform specific print dialog implementations, so
we do it via a single shot connect instead in QPrintDialog::done.
[ChangeLog[Print support] QPrintDialog::accepted(QPrinter*) is now
emitted before QDialog::finished, in line with QDialog::accepted.
Pick-to: 6.5
Change-Id: Idade32b667bdf7b81845025b8d83f08a551d32bb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 73a11c9d6a684e25cf4feca402ff3a1d7141af9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When we use GetWindowPlacement, the showCmd parameter will NOT be
SW_HIDE, even if the window is hidden. To prevent showing a hidden window
with SetWindowPlacement, change showCmd if the window is currently hidden.
Amends 21e411687428d05655b8db2634466384fa35cc03
Fixes: QTBUG-120415
Change-Id: Ib7de369a6d1a530fdeb5ff930097ae06e25761f3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Zhao Yuhang <yuhangzhao@deepin.org>
(cherry picked from commit 8a5fed6da41bcc29506d5b4e166a6e87e8fe9eb7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As the classes do not use the common naming pattern, qdoc suggested
some weird non-existend includes when generating the docs for these
classes.
Explicitly use the \inheaderfile qdoc command to point to a proper
include.
Amends bdd41f491c0f85ae0897a1c7372c5ecda62a5aab.
Change-Id: Ia721658df38f1006fdc2fa1de1fab7eb381ceb0b
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 72b8c7d59c1b485383f4311310bc17ea2c8beb84)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit c4f7dba81e43c11c1e71c19ef7f0b5acad119e60 reworked the C++20
QDate constructors and introduced a helper stdSysDaysToJulianDay()
method. However, the QT_POST_CXX17_API_IN_EXPORTED_CLASS was not used
on this new helper function.
As a result, an application which is built with C++20 but uses a
pre-built QtCore that is built with C++17 cannot call QDate constructors
with the new std::chorono types.
An obvious fix is to add the missing macro to the function.
However, we cannot do it directly, because the function is exported
in C++20 builds, and adding the macro will unexport it.
Use QT6_{DECL,CALL}_NEW_OVERLOAD_TAIL macros to add a new overload of
the stdSysDaysToJulianDay() function and mark it as
QT_POST_CXX17_API_IN_EXPORTED_CLASS.
Keep the old function under the QT_VERSION < Qt 7 check to keep BC.
Amends c4f7dba81e43c11c1e71c19ef7f0b5acad119e60.
Fixes: QTBUG-125610
Change-Id: I999354da51ee58c3691dbc1c0351be15a18a268b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 88702cc87cf830b145c8bff5174748e3719364f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
clang's fallthrough detection is a little stricter than gcc.
Change-Id: If1052275f035a8e8a496cc5a40a21137d18712e3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4656fabd8a6ff46f786cb48c220511ebe43ea300)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is available in POSIX.1-2008 but is not worth it. The Linux man page
says it only works up to PATH_MAX anyway and the POSIX documentation
says it's UB if PATH_MAX isn't defined.
This cleans up the source code out of these messy #if and should be
faster, because we avoid a heap allocation (stack is always faster).
Instead, we only relegate the heap version to the case where PATH_MAX
isn't defined (i.e., GNU HURD), because in that case the realpath()
function can't be used with a stack allocation.
Change-Id: Ie30a3caf09ef4176bb36fffd17cde1ed5c5dad59
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit e32009fc0d48411b835d81b36993828277b5042e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This prevents e.g. gtk3 platformtheme from hanging.
Change-Id: I68593ad54fa5530366d590309c10621e5a48bd22
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 297cdf16d06023ad626d798e3529a3cd98af0050)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since the change to use compose render-to-texture widgets through QRhi,
the RasterGLSurface is not existing anymore and it was used in QNX QPA
to check the support for using backingstore with non-raster windows.
With the use of QRhiBackingstore the QNX QPA now supports
render-to-texture widgets for non-raster surface windows.
Fixes: QTBUG-114938
Task-number: QTBUG-114938
Pick-to: 6.5 6.6
Change-Id: I01d4a34efe4902a527051776b0460ccf22e5d232
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Marianne Yrjänä <marianne.yrjana@qt.io>
(cherry picked from commit c9ddc4b8e17fac10d2f25fe21c09bdd734513ac6)
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Explain where the colors come from for unset roles, and add a see-also
for isBrushSet.
Pick-to: 6.5
Change-Id: I35e58e6b0f3ff9e57d9df95879859dd10424dc92
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit f9cf13d23e8777aa88e8dd9bb631afed5f4f9acc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QFrame::frameRect property is implemented in terms of the QWidget's
contentsMargins, and when the QFrame is resized it recalculates the new
frame rect by reading the contents rect and then setting the widget's
content margins based on the new value.
This conflicts with the implicit inclusion of safe area margins in the
widget's contents rect, as those implicit margins are then persisted as
user-set contents margins. If the safe area margins later change (to 0),
the frame will still reflect the old safe area margins.
We may find a way to untangle this for QFrame, but in the meantime let's
set Qt::WA_ContentsMarginsRespectsSafeArea to false. This avoids the
issue above, and also informs child widgets of the QFrame that they
themselves need to potentially take the safe area margins into account.
Disabling Qt::WA_ContentsMarginsRespectsSafeArea in this manner should
not cause any major behavior changes, as a QFrame is typically part of
a parent widget that does respect the contents margins, and so the frame
will not need to apply any margins of its own once the layout settles
down.
Task-number: QTBUG-125345
Change-Id: I936ff5ec9056d05676560cc7659ba31105fdc224
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 668914649c03d502935c79001baf95ac017ba061)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were reusing the QRhiMetalInitParams when falling back to OpenGL,
which caused crashes at runtime.
We remove the fallback altogether, as tests or clients that rely on
a specific RHI backingstore backend should do feature-testing before
requesting the specific backend.
Change-Id: Iee38348ae06ea118aafcada33a8956ae07bb2228
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit bc1f9837815b3a3058be6a51fd032ba10adf472e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current docs describes the function name, when, in fact, it should
refer to the argument.
Fixes: QTBUG-123838
Change-Id: I36e3bdff66712b8f35ac19859acb65e6fdcdf355
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 71bc951870906abbe656d9c2f08c42c3bf35c554)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We weren't handling it at all, emscripten already supports it.
Fixes: QTBUG-125222
Change-Id: I761eed2c8c034604cd02ba436db68cec4fdeb784
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit aae5c89d5f49136a83e25f1ade00ca5d84b55d5f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move the constexpr fromArray() check from fromArray() to constExpr()
and there add the protection necessary to work around
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962, copied from
tst_QByteArrayView.
As a drive-by, add the test for constexpr construction from a char16_t
array, which was missing here (probably because of the GCC bug) while
the corresponding test was already in tst_QByteArrayView.
Amends 107ff4c1d6b5da2cb11c65b2bd9106817f7fdb02(!).
(iow: 6.0, and no, I don't know why it became a problem only now)
Pick-to: 6.5 6.2
Change-Id: Id9d2a08175709f8bf85b3b192e7aa49783b9e715
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 3f3be9d7745dc6a6b16efdd940ccd12f6622c467)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move the constexpr fromArray() check from fromArray() to constExpr()
where there is already the protection necessary to work around
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962.
Amends bbe7570ddcc6fcce707a355b76d2d0024c44ea38(!).
(iow: 6.0, and no, I don't know why it became a problem only now)
Pick-to: 6.5 6.2
Change-Id: Id9d2a08175709f8bf85b3b192e7aa49783b9e714
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6d28744e43c113b0f94b2132d5904d85a18d81a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962, and
because marking constExpr() as __attribute__((no_sanitize_undefined))
doesn't fix a thing, we opted to disable the triggering parts of
constExpr() from all GCC builds.
This is, of course, unfortunate, since it meaningfully reduces
compile-time coverage in the general case for a rather obscure build
type most won't ever use.
While GCC doesn't give us a predefined macro to check for in the .cpp
file, the cmake build system knows whether we use ubsan, so just
define a macro of our own.
As a drive-by, simplify GCC detection by using Q_CC_GCC_ONLY.
Amends de6a004bc5a5b9cd3ecfbb14818bb42fb1ecfd68.
Pick-to: 6.5 6.2
Task-number: QTBUG-101307
Change-Id: I4be5bd103b9d2386b2ac9fd22e0c34f9c63fee04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 564be117fece258f661a20e5c81166fa658f5e84)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There was refactoring in 8c41125118768ce037698e0605755128b2da705d to
handle custom postfixes, which caused a regression in the postfix not
being set for macOS frameworks.
Specifically we set CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_DEBUG to
the value of ${${postfix_var}} but that variable was empty, because we
only set it in the PARENT_SCOPE.
Set the variable also in the current scope.
Amends 8c41125118768ce037698e0605755128b2da705d
Pick-to: 6.5
Change-Id: Iae3f1050bb11805b4cce01ec491a13a3d6c0a9fc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 6328aaadf9683089aaa3904ea1cec56012d6212e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've already tested fixed-size-0 spans for default-constructibility
two lines before. We need to check dynamically-sized spans here.
This doesn't extend test coverage: in the course of the function we've
already default-constructed the correct type.
Amends f82cf6333e4e21c96d8b6bb272392f8142ead2b7.
Change-Id: Ibb192b1661f12babb449752bf107eca404a95ad2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6ea123ca4cdc7e33f6c21d29398823fe8afaea63)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Overload set to be used in QUuid soon.
Pick-to: 6.5
Change-Id: I6f2c180bb7bb884d40f1691409e816405c3e5d47
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit ede58f3670a95243fa800b445b3edfba7534ac39)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a KDE theme name doesn't contain the keywords "dark" or "light",
QKdeThemePrivate::updateColorScheme() falls back to heuristics. It
compares text and base color. It sets the color scheme to dark, if
text is lighter than base and otherwise to light.
When the theme name can't be read from KDE settings, because it is
stored on a different location or not yet set, the heuristics fallback
doesn't happen. The color scheme always becomes "Unknown".
Remove this limitation to the benefit of currently unsupported Linuxes.
Fixes: QTBUG-125285
Change-Id: I120dd23eee71b14ea8ce3735c3f53bda2caa403e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 71d0de98359decfcc9be01a0ed5823a9595ef5d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
KDE settings locations and keys were hardcoded in QKdeThemePrivate.
readKdeSetting() was implemented as a static method, because it was
called from the static readKdeSystemPalette().
It expects a QStringList argument with the KDE settings directories,
an int representing the KDE version, as well as a QHash with settings
passed as a reference.
Class members exist for settings directories and version. They have to
be passed for each call. The hash containing settings objects will be
created on the stack of each function making calles to
readKdeSetting(). The settings key, including subsections, was passed
as a QString.
Implement enumerations for all KDE setting types and settings.
Derive subsection from the settings type.
Change the signature of readKdeSetting() from a string to the new
enumeration.
Implement a non static override of readKdeSetting, to avoid passing
data memebers on each call.
Implement a mutable has for KDE settings, to enable caching across
functions in the future.
This patch does not change any behavior.
Task-number: QTBUG-125285
Change-Id: Ic0320853e08e82dd83bdba1e7765a1e5c6ffb384
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit b0b34c56a99130bfc9c82cb006653ce6b8f0516e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The method's documentation mentions appearance, instead of color scheme.
Update it.
Task-number: QTBUG-125285
Pick-to: 6.5
Change-Id: Iceb2b7d0a51d0ba34f98dd942d7988feb685a4f6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 802cd973f2e90f4fa947a8ae19158568e7e265b1)
Some standard button icons do not have the correct quadratic extent
which leads to rendering artifacts. Even though the real fix might be to
actually let QIcon::actualSize() return the correct pixmap size instead
the size given by the construction of the QIcon via QIcon::addFile()
this fix does not hurt anyone.
Pick-to: 6.5
Fixes: QTBUG-73655
Change-Id: I43edb38b0146e7d0a698f7a6239da5dbfbc65aa4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e771e5e2d7ae77f46d01f087242e0f777fdc02ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Issue introduced by a68e4f3b96a82a93898f381e8ddc7f50f9c89d40 ("Use the
new QMetaType API in QVariant") in 6.0, which removed the d.is_null
reset at the same time as it replaced the std::destroy_at /
std::construct_at pair with an assignment operation.
[ChangeLog][QtCore][QVariant] Fixed a bug that would allow the class to
keep returning isNull() = true even after calling setValue().
Fixes: QTBUG-125472
Pick-to: 6.5
Change-Id: If05cb740b64f42eba21efffd17d13f6b1e8113c2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 26a81bd4fb1f382b2b1652566652301cfe1270a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
to keep the same format because \c is only used with two
tags which is unconsistent.
Change-Id: Ie49f6c22a0f0813d49ea69865a80133ad81011c5
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit 067f60f7927fa825b71eed9d94bc280dd70ccc5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When creating a QWindows11Style with QStyleFactory::create() the current
colorSchemeIndex and highContrastTheme usage is not set. Those values
are now queried and set also in the Constructor of QWindows11Style.
Fixes: QTBUG-124524
Change-Id: I42a3aa5bafb0ff4193b8644ac1895a78b8c82120
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b7874f1fabb6cd89962ebbb8ed09a00e1c1ad1ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation of QIcon::pixmap() taking a devicePixelRatio could be
read in the way that a QPixmap of the requested size and
devicePixelRatio is generated which is not true. The generation part is
only valid for the given mode and state.
Pick-to: 6.5
Change-Id: I5374cd7be17c32cd87d7b35552e60a4c07ebe6b2
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2422f8b18dd325e5ac7d0adff39b2c93a8f75466)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the version update to 3.0.3, the LicenseId and LicenseFiles items
were updated, but not the License item.
Pick-to: 6.5 6.2 5.15
Change-Id: I21870c78a247740ea8d67487a18511169607daba
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit a3e3e105ab10607cef4589f5c6d4c5770b44b9cf)
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QtGui module can be linked using both versioned and non versioned
targets. Consider this when adding the dependencies to the
qpa_default_plugins targets.
Change-Id: Iccbf3009ab8a4f9df4de1677f1b41445814c8c9e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1e8a36e360d7e86b86db7ba7a7cc258f65348929)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They didn't work due to qdoc bug QTBUG-118080, which has since been
marked as fixed (for 6.7FF).
Remove the protection.
Task-number: QTBUG-115022
Task-number: QTBUG-118080
Change-Id: I1b792676754074dd85611e647d4e2c372de3a647
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 725455ed3330b098effa7bfb7aa4a43f16be2a0d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test already exercised the function here and there, but it lacked
a central place to test the static hash() method, so add one.
Pick-to: 6.5
Change-Id: I229bc8a8ed07e0036f60de62ecc4d11ef88dd20e
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8586f9e1b9fa553b7fe450bbb45ef2cfbd3dd404)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We know NumAlgorithms is not supported, so don't print a skipped
warning, by not including that enumerator in the test data in the
first place.
Amends 96dc4acb235f13a72bef7c719d005846fe1d9726.
Change-Id: Ie19f7ebcceb855b9363017c8b2626dae99e23313
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 00099c057cb584713cb9327738393e1748fc14f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
GCC 11 doesn't understand that 'i' isn't ever read from (because all
spans created over it have size zero), but initialize it nonetheless
to suppress the warning.
Amends f82cf6333e4e21c96d8b6bb272392f8142ead2b7.
Change-Id: Ibfb3e9b7fdcbe93c43b7873986c74b4b5a0c9e54
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 6736fe3a0f33d2c37927a79203999acb8ef7b343)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On some xcb platforms the xcb_configure_notify_event_t is sent after the
window is fully exposed which leads to a wrong position for
QWidget::mapToGlobal(). In this case this results in a wrong position
for QCursor::setPos() which lets the test fail.
Fix it by waiting for a move event with a position != 0,0 before calling
mapToParent/Global().
Pick-to: 6.5 6.2
Fixes: QTBUG-123998
Change-Id: Ic5e989c4497ccf3ed720a521f9d7e73632b4b1fc
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f6fdd91941de1cefb021b837ece77fec7363f23c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
VxWorks doesn't have implementation of QStorageInfo and uses stub.
Remove tests of it from building and running, since these can't work.
Task-number: QTBUG-115777
Change-Id: Idd63d20c2dda1ae09838a7d371ae5b713180cb96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 062c538781be594821ae8b3c09eb3ae4f5adc6f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
VxWorks doesn't allow mapping file beyond EOF, adjust tests to encompass
that.
Additionally, for testing on VxWorks we use use builtin /tmp which is a
RAM disk (in case of VxWorks-supported imx.6 bord which have 1GB of
RAM), set max size of tested large file to 256MB, 28 bits.
Task-number: QTBUG-115777
Change-Id: I73cbe112331b7cb95d80bb44b792578a1eb88a07
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7678edebba7e93ce648714cd6849023e2880813f)
The QWindowsScreenManager's m_displayChangeObserver window would still
be alive at the time ~QWindowsContext would unregister window classes,
resulting in a warning that was hidden by the default verbosity of
QWindowsContext::verbose. The result was that we would get a warning
when then trying to re-register the already registered window class.
We now do what we do for m_powerNotification and m_powerDummyWindow,
which is to destroy them explicitly before unregistering their class.
Fixes: QTBUG-125058
Pick-to: 6.5
Change-Id: Id3b02237fdd81f734a58a2314a157cad1289a82c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 48cc43a1e00e564438227dc0c251c988cee22483)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This function is not available in VxWorks libraries and it is not
mandatory for proper qstorageinfo test execution.
Task-number: QTBUG-115777
Change-Id: Ic503c776002087d461c32f890795c27be4b1ca34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c0c66a42ced590cadfb55efc82f80af5f035020e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There are some systems that do not support millisecond resolution in
timestamps.
An example of such system is VxWorks.
POSIX2008 demands that `stat` contains an `st_mtim` field of type `timespec`.
That field holds modification time with a nanosecond resolution.
VxWorks reports _POSIX_VERSION as 200112.
The `stat` struct does not contain `st_mtim`, but rather an `st_mtime` which
holds a `time_t` which contains seconds.
This leads to setFileTimes failing, because the test tries to
save the current datetime as the modification time of a file, but the ms
part is cut off.
Fix the problem by checking if the timestamp read back from the
filesystem contains milliseconds and only check it if it's not zero.
Task-number: QTBUG-115777
Change-Id: I8c8a3b1c8e97955f13f059bcebf66d1b5af174fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 88cb405514270a320d2993e8fb1c7b7b62646112)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It cannot change at run-time once the platform
has been initialized.
Change-Id: Ib5ec049d799cbc54f184ebc8a6531f22c02b6b5b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c587eeef11a00866347e44ec4e701c7775558a07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Similar to what we did for androiddeployqt, port moc's output file
handling from raw FILE* to unique_ptr<FILE> with an fclose() "deleter".
Introduce a openFileForWrite() helper function to abstract away the
difference between Unixoid and Windows FILE handling.
Keep the actual type of the unique_ptr instantiation local to
openFileForWrite() function so that creation and destruction are
defined close together, notwithstanding the occasional need to spell
out the type of the return value in callers.
NB: The moc copy in qtscxml does not contain this code.
Pick-to: 6.5
Change-Id: I0c9bca0bf3e29c137c02cc563098c5f2e2708cf3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 785a5e6eb4745dc3219cc33dc5ea2e671a40b5f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since commit 91e70f23 introduced separator to uiLanguages(), the system
locale id still does not respect the separator parameter and hardcodes
dash as separator. Fixing this should make the format consistent.
Change-Id: I1ab8edfa49117bdc9c4353228e73c2d1e5becffc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Moody Liu <mooodyhunter@outlook.com>
(cherry picked from commit 4431ffa8b90f4d089f98544e8c2eeac6cfc7abb2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the code that was already commented out by
37a25fce94976ab2a0f94abe43f1ed6ad950672f for Qt versions ≥ 6.6.
Change-Id: I40a3e974430add17b52307781d092bd4f58c0c35
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit bf96c45f94d840f15c71e0630f9f9c3f8ef8bc6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Accept tags between 8 and 12 bytes long, and move the check for 12
bytes to where it is needed.
Pick-to: 6.5
Fixes: QTBUG-125241
Change-Id: I1a46852a9ab60e7c63f8d74de1809d731912ab5b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit f5cafb6f1ceeb907cc99baccf97d2da6299e5809)
The LDML spec includes a 'b' pattern character which is like the 'a'
pattern, for AM and PM, but would rather use noon and midnight
indicators for those specific times. We don't support those and using
am/pm will be right enough of the time to be better than simply
discarding this option, if it ever gets used (which it currently
isn't), so treat as an alias for 'a'. No locale in CLDR currently uses
this.
CLDR also has a 'B' specifiers for "flexible day periods", including
things like "at night" and "in the day". At present only zh_Hant uses
'B'. As a result, this change only affects zh_Hant's formats for time
and datetime, which only zh_Hant_TW uses - zh_Hant_HK overrides them
to use am/pm markers and zh_Hant_MO inherits that from
zh_Hant_HK. Based on this and user feed-back, I've opted to treat 'B'
as another synonym of 'a'.
This removes an entry from the time_format_data[] table (it happened
to occupy one whole twelve-character row), causing many other locales'
offsets into that table to be shifted by 12. Only zh_Hant_TW has an
actual change to which entry in the table it uses.
Added a test-case.
[ChangeLog][QtCore][QLocale] CLDR's 'B' (flexible day period, e.g. "at
night" &c.) field, not currently supported, is now handled as a
synonym for the AM/PM field 'a', instead of leaving the B as literal
text. Only affects zh_TW at present.
Fixes: QTBUG-123872
Change-Id: I6ba008c0a048190bf7af8c7df7629a885b05804f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d778d17b9f023e115dfbaa4bbd7255b52f41e67f)
Rework the somewhat ad-hoc handling of format blocks. Instead of
converting one character at a time, then coming back to map contiguous
chunks of various lengths to Qt's best match, use the first
non-separator character to select a function that looks ahead to see
what to consume with it. Quoted text can be handled the same way, with
a look-ahead. This potentially allows for more flexible parsing in
future.
In the process, matching qlocale_mac.mm, treat all unquoted letters as
reserved. The LDML spec says:
Currently, A..Z and a..z are reserved for use as pattern characters
(unless they are quoted, see next item).
and its description of literal text explcitly says these reserved
characters are not to be understood as literals. Document the letters
we do know about as unsupported pattern characters, but don't do
anything specific to handle them. This transiently changes zh_TW's
"Bh" hour fields to plain "h" but an imminent commit will change that
again and there is no other change to data, so the locale data is not
regenerated in this commit, to save churn.
This makes the parsing front-end function more straightforward and
makes it easier to document the quirks of the different format letters
and the impedance mismatches between CLDR's and Qt's. In the process,
recognize C, like j and J, as special magic to ignore and harmonize
with what qlocale_mac.cpp's macToQtFormat() does, where it's right and
dateconverter.py differed. Document the need to stay in sync with this
last.
Task-number: QTBUG-123872
Change-Id: I490d395b37751c9b8d6f3ee5ed4edbc0d405db5b
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit ea806fa3f15061d75d2c2c40144588053e2217b0)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Impose standard Qt indent.
Within each set of cases grouped together, impose alphabetic order.
Made formatting of ranges in comments terser, for two-value ranges.
Fix errors:
* the 'j' field should not arise and has a 'J' partner
* The 'c', 'e' and 'E' forms' numeric variants are still day of the
week, so should not be mapped to 'd' or 'dd', which are day of the
month. Qt date formats only actually support long and short, not
narrow, despite the QLocale::Format having a NarrowFormat.
Other errors and infelicities shall be addressed in later work, in
tandem with changes to dateconverter.py that are coming.
Task-number: QTBUG-123872
Change-Id: I61bf363d2598502f8bfc0d67245eae1b41858147
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e04f7d0d2779a7ee47f7cea2d3b6f6f93fd286c8)
AGP version 7.4 deprecated the use of "package" attribute in the
manifest to specify the unique package name, it's instead been
moved to build.gradle file and set using "namespace" property.
This patch adds support of that to androiddeployqt.
Removing the "package" attribute from the default manifest would
break Qt Creator 13 and below because Qt Creator would fail to
deploy apps without such attribute in the manifest. For that reason
we'll defer removing it until a later version, for example Qt 6.10,
to allow some buffer for a Qt Creator that can handle that to be
adopted by users to reduce breakage.
[ChangeLog][Android] Add support for namespace in build.gradle instead
of the package attribute in the manifest.
Task-number: QTBUG-106907
Change-Id: Ib0f0d6a6fbb3b38f605aadfdcc497067daf90297
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit b740cd1f38e8fa08e61cee1d7a19badaff2dd282)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QDirSortItem contains three implicitly-shared members (two QStrings
and one QFileInfo), so the mere default-initialization of the
QDirSortItem[n] array with which we initialize the QScopedArrayPointer
will take quite some time.
Using QVarLengthArray, OTOH, delays construction until we have the
data to initialize the sort items, saving n default constructor and n
move assignment operator calls, plus the memory allocation for the
case where we have less than 65 elements to sort.
This code precedes the start of the public history, but the
emplacement won't work before 905bc6293354a0d3ee832b6dd3f632a647f809f3
introduced the QDirSortItem ctor, so not picking back further than
that.
Change-Id: I262217eabaded2a6aef08b87fc6369812bc8958a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 81a0753299fb8cc3e6b4b5e41a0292024ccea9e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coverity found several FILE* leaks (since fixed) in the code, so make
sure that those can't happen anymore, by using unique_ptr to manage
the pclose() of the openProcess() FILE handles.
Keep the actual type of the unique_ptr instantiation local to
openProcess() so that creation and destruction are defined close
together, notwithstanding the occasional explicit pclose() calls to
capture the error code.
As a drive-by, port a naked popen() to openProcess(), make some
variables const and replace 0 with nullptr.
Pick-to: 6.5
Coverity-Id: 378357
Coverity-Id: 378442
Change-Id: I2b06b99cba1e4eb5b8963a9c5d2cb398eb25a8b3
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 0a48730d0821cf0d2f8ad25934d2498293c3648b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
`<future>` is explicitly excluded for VxWork, because enabling it causes
compilation error when building tests (and causes some serious issues
when trying to naively work-arond this compilation problem). When
forcing `QT_FEATURE_cxx11_future` on VxWorks, failure occurs:
```
qtbase/src/corelib/thread/qthread.h:125:19: error: no matching function for call to 'invoke'
125 | (void)std::invoke(std::move(f), std::forward<decltype(largs)>(largs)...);
| ^~~~~~~~~~~
[...]
qtbase/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp:32:45: note: in instantiation of function template specialization 'QThread::create<(lambda at qtbase/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp:32:52), QPromise<int>>' requested here
32 | QScopedPointer<QThread> thread(QThread::create([] (QPromise<int> promise) {
| ^
VSB/usr/h/public/type_traits:2720:7: note: candidate template ignored: substitution failure [with _Callable = remove_reference_t<(lambda at qtbase/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp:32:52) &>, _Types = <QPromise<int> &>]: no matching function for call to '_Call'
2720 | auto invoke(_Callable&& _Obj, _Types&&... _Args) noexcept(noexcept(_Invoker<_Callable, _Types...>::_Call(
| ^
2721 | _STD forward<_Callable>(_Obj), _STD forward<_Types>(_Args)...)))
2722 | -> decltype(_Invoker<_Callable, _Types...>::_Call(
| ~~~~~~~~
```
Instead of excluding cxx11_future on VxWorks explicitly, replace
condition with actual check which should pass in non-VxWorks 24.03 (or
older) standard libraries.
VxWorks in version 24.03 fails this test due to std::async improperly
forwards argument type to lambda, which causes compilation error when
argument type is a non-copiable value type. This is a problem in VxWorks
standard library, which could be fixed in future versions of this OS, so
keeping this as a test should unlock `<future>` header once it's fixed.
Task-number: QTBUG-115777
Change-Id: Ic67df9be2e95dce999689eaea146f113017ab4f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ced943e936e335a16e9b479a2010e5bbee1af4f1)
Windeployqt deployed all the non Qt libraries in their x64
versions as it was not aware of the host it was running on. This
check needs to be done before any deployment happens.
Current support is limited for MSVC. mingw/clang might be done in
followup commits.
Change-Id: I70fd6ad66c9cacfc6ff5b109f214a142b8b6d5f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 81984807b30b1865a98fbd928a29d5ab6d8f5375)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
After the zip bomb checks were added the benchmark was not
adjusted.
Also move the QByteArray creation outside the loop, to not include
the time it takes to make a heap allocation.
Pick-to: 6.5
Change-Id: Ia958d497dd27fc61e0084b6f5c11d76886bb24c4
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6f2ef2eacb927022e89b5e02edcbc8b06954639e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation says:
The mapping will have the same open mode as the file (read and/or
write), except when using MapPrivateOption, in which case it is always
possible to write to the mapped memory.
So obey it.
This may cause high memory use by copying data we already have. This may
be important because applications may want to memory-map resources which
they intentionally didn't compress because those resources are
large. Later commits will implement some workarounds.
Fixes: QTBUG-124608
Pick-to: 6.6 6.5
Change-Id: I6979d02a7395405cbf23fffd17c8f03baf0ec00d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 39e156e639ac4eadd7a0d4dac73d05db077e817b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can only call map() if we've already called open() and that will
decompress the data.
Pick-to: 6.6 6.5
Change-Id: I6979d02a7395405cbf23fffd17c8f1f77ca92b2b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit bc5cd4dba8dceed808a573c6201acd9d210dc315)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
WinUI3 changed the behavior of Sliders by not using steps anymore but
by absolute change.
Fixes: QTBUG-125154
Pick-to: 6.7.1
Change-Id: I708f2584432b277b0c1fc0b2587137ce71714e69
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 392c5fab815cbe41df9e25e50e4d296e7e1606f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When compiling removed_api.cpp, both the removed QDateTime(QDate,
QTime) constructor and the one taking a transition resolution with a
default are visible. The inline fromStdLocalTime() was thus ambiguous
as to which it was calling. So make the transition resolution overt.
Fixes: QTBUG-125079
Change-Id: I0c498bed2831afee0adc41c4575f3ed1bc244122
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 669f7e3b9723446732d31d48b653cd2bd9580f2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some of our FindWrap scripts try to call find_package() once or more
to find a system package, and then fallback to a different source in
case if not found.
The side effect of this is that find_package() will append not found
packages to the global PACKAGES_NOT_FOUND property.
FeatureSummary feature_summary() will then list these as not found,
creating confusion.
For example while FindWrapSystemPCRE2 might be found, PCRE2 found will
be shown as not found, because we found the package via PkgConfig
instead of cmake Config file.
Manually remove these packages from the PACKAGES_NOT_FOUND property
in some of our Find scripts, to avoid the confusion.
Fixes: QTBUG-96120
Task-number: QTBUG-96394
Task-number: QTBUG-111216
Change-Id: I4be825c810248202c34f446e3cebe66574d0531c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 70a2e7f32b9f9ce19d1538f14fbde7b0d1e77ffd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWindows11Style inherits from QWindowsVistaStyle for which StyleSheet
theming is deactivated. QWindows11Style draws most elements with
QPainter and should therefore be able to use overrides by StyleSheets.
This patch checks, whether QWindows11Style is used and enables the
theming by declaring it not to be a QPixmap based style. Further drawing
routines for QComboBox, QPushButton and QLineEdit are now drawing always
the base background and when they are hovered a alpha mask is used to
overdraw the elemens to create a highlight effect.
Fixes: QTBUG-124286
Pick-to: 6.7.1
Change-Id: I65436493bc2b1572c0d9423a066caea3ba9e1459
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit b733d31f275d09ca81b5e347ca1e9b6c9b216cd4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In <build-dir>/.qt/QtDeployTargets.cmake we recorded deployable targets
and their file path. We skipped static libraries, because we don't
consider these deployable.
However, we need information about static library targets too when
deploying QML plugins: we need to know that they are "built by us" in
order to properly skip them.
Now, we record STATIC_LIBRARY targets too and also record the type of
each target.
Task-number: QTBUG-124771
Change-Id: Ic1ef33a3295458c372c2bc9f24ecce43f17e7321
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 519a47e870dddc16879bad9a3f8398e0349fb76a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found this when the DNS server replied with no errors, no answers, and
no EDNS0 tail.
Amends eb51454b907b02aa67268c162896fc6778920e4c
Change-Id: Ie30a3caf09ef4176bb36fffd17cdf0916ac31545
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit e3f520e621a9ea631d8a1d2f9bfc7a5f20dc698a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QDBusSignature holds a D-Bus value of type SIGNATURE, which is zero or
more signatures, not one or more. This changes the default constructor
to create a valid signature, which we denote by not being a null
QString. That means we need to use something other than the default
constructor in our tests for attempting to pass invalid signatures.
[ChangeLog][QtDBus][QDBusSignature] Fixed a bug that caused the class
not to accept an empty string as a valid D-Bus SIGNATURE value.
Fixes: QTBUG-124919
Pick-to: 6.5
Change-Id: I262c3499666e4f4fbcfbfffd17cb3793dcf2eae3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ed6d1fa71a79a70b7e6a20fbbc737ed9f6c287b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is RFC2822 grammar (except that line folding is not
allowed).
RFC9110 doesn't allow it anymore, but it might make sense to accept it
nonetheless (Postel's Law).
Manual conflict resolutions:
- dropped constexpr on parse_comment(), which uses QByteArrayView's
startsWith(char), which is only constexpr in 6.8.
Task-number: QTBUG-123544
Change-Id: Ie990cd332c7603dbdae29c19b2804bd33a058ca0
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 834e7d60a9cb67a1d445151a4f7c34d4288db01b)
Despite realpath being available on VxWorks (when the INCLUDE_IO_REALPATH
component is used in the VIP), canonicalName doesn't use it, because
the system reports _POSIX_VERSION as 200112.
Fix the problem by adding an additional condition so that VxWorks
correctly uses realpath.
Task-number: QTBUG-115777
Change-Id: I734f525e870f93a7ec955d379dcc2137b591e171
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f097cbd9bf975439ed55dbe563d45948a0a43794)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Firebird can not handle 'DROP PROCEDURE IF EXISTS' - need to call it
unconditional without 'IF EXISTS'.
Pick-to: 6.5
Change-Id: I530bcc2c756eed680a6fdaf27b3e3a0715f96bd4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 1a4470a8eff39b96c13a5f9826b0366b5418c738)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rendering a widget to a paintdevice via QWidget::render() did not pass
the LayoutDirection mode of the widget to the paintdevice which lead to
wrong rendering of text.
This is especially visible with the windows 11 style which does not draw
some widgets directly on the screen but through a QGraphicsEffect on a
QImage.
Pick-to: 6.5 6.2
Fixes: QTBUG-124931
Change-Id: If2cfa326d2ca45c42e203a4ae91fd857afa5c69c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 5ea248155654b58fcb52ef326dc4d94de83d0409)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QT_NO_FOREACH didn't related to anything so the documentation
wasn't generated, and QT_NO_KEYWORDS wasn't documented but
referenced.
Conflict resolution: include relevant documentation that was
added in 3a6c8e02b6d1b0574da52b0087092d0c74aa92c1 as well.
Change-Id: I7b79e61519c186d10f8e8c674705adb3d10bd53a
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit fd6cfd22831c6ff7078bb97e62439375cfc849f6)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We need at least 7 bytes: three 16-bit numeric fields and the hostname,
for which we need at least one byte and expandHost() takes care of
checking size further.
Pick-to: 6.5
Change-Id: Ic5b1273bb0204c31afd8fffd17cd3c9ba3c9fec7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 55c6d6c86bf092401a4876faead603561cc54d50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We rely on setParent for parenting top level windows into our desktop
manager view, so we can't condition the call on having a parent window,
like we do on other platforms.
This was a regression from 988039729f55a5e62e32b82c6f29ff7457e91d9d.
Fixes: QTBUG-125142
Change-Id: I2884d77db09cba5371ccd77eabda7ce38c0292de
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 6c36e21bec1197e933ee1fbe14bd18936544d32a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
installNativeEventFilter() always installs on the main thread, so match
it.
[ChangeLog][QtCore][QCoreApplication] Fixed a mismatch on which event
dispatcher was modified between installNativeEventFilter() and
removeNativeEventFilter(). Now both functions in QCoreApplication access
the main thread's event dispatcher. To access the current thread's
dispatcher, use QAbstractEventDispatcher's functions.
Fixes: QTBUG-124783
Pick-to: 6.5
Change-Id: I6979d02a7395405cbf23fffd17ca09e1ac43f1f3
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit ed70faf87af42dea290853730093b3c2ecb90b0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's some confusion about minimum and maximum.
Fixes: QTBUG-109512
Change-Id: I262c3499666e4f4fbcfbfffd17cc1d592bc658b3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Philip Van Hoof <philip@codeminded.be>
(cherry picked from commit 3fc5ee5c2e4ed919b2939ca54a1958b8463eb404)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Change the way we collect dependencies in __qt_internal_walk_libs.
Prefer the versioned Qt targets over the namespaceless. This fixes the
generating of the pkg-config configs.
Pick-to: 6.6 6.5
Task-number: QTBUG-124135
Change-Id: I660376e122a99b5bc0874f2bc6ccd4d80c9ad453
Reviewed-by: Ionen Wolkens <ionen@gentoo.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit ac4920b5c0a537ede62dcef76a32311a497c68e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since Qt targets now are linked as versioned targets by default, we
should adjust the respective check in __qt_internal_walk_libs.
Change-Id: Idb896c1d9eda944a06d57b0491686cd78e010df0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 721cfbd1942f8148dd464c0542b0d4c1191b53f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Dependencies that alredy start with QT_CMAKE_EXPORT_NAMESPACE shouldn't
be skipped but collected as is when generating pkg-config files.
Pick-to: 6.6 6.5
Fixes: QTBUG-124135
Change-Id: I6875337c2e1d98f657e52a5fc2c37eebccf08b98
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 337cadbcb7900d78505b25e66555b853d2c2c707)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rework the painting code to not use floating point numbers and make sure
the tip of the arrow is painted with one or two points (depending on the
size is odd or even) so the arrow is always symmetric. Therefore also no
anti-aliasing is needed. Sadly the dpr scaling and also
QPainter::drawPolygon() screw things up a little bit with such small
sizes, therefore do the dpr handling by ourself to get nice results.
Fixes: QTBUG-124554
Task-number: QTBUG-114539
Change-Id: I8ab8c2ce3ceb90af5d7c3a0dfeec7f7445e92a4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bbff35a343f607fde64a71b651db9f35365e3c67)
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The overload carrying the new state as an integer is deprecated, but
still documented, so we need to document the parameter as well. Bring
the full documentation back to silence the warning.
Amends 5a96d13bb5abd5339cf21dd1de7a17152c71f0fc.
Change-Id: I5253e68e4ad7b42fc552feb958cc0ac40d685609
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 31de58990661f6fdc9f1145e16745916d1c6df59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Set object names for actions created by createStandardContextMenu() to
be able to access them from the outside. Use the same naming schema as
by QWidgetTextControl::createStandardContextMenu() (used by QTextEdit
and others).
Pick-to: 6.5
Fixes: QTBUG-112721
Change-Id: Id92f1ba13e7f7e8b1d531678895902374114d167
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 77c6b0c66f3191dd1b15ea052e98e6a16442f8cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It seems this was neglected in 5.14, when the methods were added.
The calendar setting is also not a Q_PROPERTY; and hadn't been tested
until recently.
This follows up on commit 2dee00621632ab8acd0b3d59bdba264afe2f32c1
Pick-to: 6.5
Task-number: QTBUG-115200
Change-Id: I9625bf54d05a55a40867847bd58130be90e78271
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 33cc65328819836374eb4823e571789b066003f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Retrofit the QT_TECH_PREVIEW_API macro into the JNI classes and
helper constructs that are not yet documented, and which can only
become publicly documented once the full JNI type system with the
type registration infrastructure is documented.
We can remove the tagging in dev once we have documentation and
are ready to move this functionality out of TP, presumably for Qt 6.8.
Change-Id: I235e57b8e57c2d04be72b4c842131d99a5f83d9e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 5b41046813d21d565904a6b37bef4b75268fc8f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The mouseDown() and mouseUp() methods in androidjniinput.cpp hardcoded
Qt::LeftButton to all mouse-press / release events.
If a mouse is connected to an android device, all three buttons are
mapped to the left button.
Extend both mehtods' signature by a mouse button state.
Add a converter method to map from Android button states to
Qt::MouseButtons. Add a sendMouseButtonEvents method, that iterates
through all buttons pressed/released and sends the respective events
to QWSI.
Adapt the mouse handler in java, to obtain and pass the button state
to C++.
The patch can't be verified in an autotest. Testlib's mouse emulation
injects into QWSI.
Fixes: QTBUG-99106
Pick-to: 6.6 6.5 6.2
Change-Id: I933f490901928db9761d2ef254ae1e5b4f473f28
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 8d8cbe87e21f05b7d611ed4be47299977288b267)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There used to be an examples page; this is no longer the case. Thus,
remove the \note that indicates you can access the source code.
Fixes: QTBUG-122166
Pick-to: 6.6 6.5
Change-Id: I1abe88000ae406e8d2cc9cc1deed42664607626b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit f8bc0e7c3b220dd19a2bb3ed7f868b6c1bcfde7d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Windows 11 style checks for QProgressBar type and gets the
respective orientation required for rendering. This creates an issue
when we use QStyleItemDelegate as it's not QProgressBar type. This patch
removes that condition and gets the orientation information through the
style option similar to Windows Vista style.
Fixes: QTBUG-124447
Change-Id: Ic2b36d79d7af017262e44dd2800ad45fbe63f8f2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 8f283aa2997975f94c9e214064855553b4a6ee48)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QMainWindow:.tabifiedDockWidgets() was refactored in Qt 6.6.3, because
it returned wrong values. It now loops from 0 to
QMainWindowTabBar::count() and uses QMainWindowTabBar::dockAt(), to
get the dock widget pointer for an index.
When a dock widget is removed from a floating tab, event processing is
necessary for the item_list and QMainWindowTabBar::count() to get in
sync. This case was overlooked in the refactoring. It can lead to
dockAt() being called with an out-of-bounds index, which it asserted.
The assertion triggered, when QMainWindow::removeDockWidget() and
QMainWindow::tabifiedDockWidgets() were called right after each other,
without processing events inbetween.
QMainWindowTabBar::dockWidgets() doesn't add nullptr to the list, it
returns.
Therefore, return nullptr, when dockAt() is called out-of-bounds.
Add test functionality in
tst_QDockWidget::updateTabBarOnVisibilityChanged().
Fixes: QTBUG-124262
Pick-to: 6.5
Change-Id: If66084b9f00b4e39f7a620da68df67c735029cf1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit f97e60a4f0602e1478c888ff1043276966c93387)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
When setting new buttons with setStandardButtons(), the old ones are
deleted by iterating over d->standardButtonHash. But this hash is
modified when a button is destroyed and therefore sometimes not all
buttons were deleted.
This amends df735d794fd2e545c18b9e345e833422bcd64329.
Fixes: QTBUG-123939
Pick-to: 6.5
Change-Id: I867086855cfde88a7b22a5579662f250b9db0042
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 0e5d5513279cff61673adc2ace5ed27202bbdc97)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's no reason for it to be there.
Pick-to: 6.5
Change-Id: I262c3499666e4f4fbcfbfffd17cbbcfcd798b100
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d44d19dd98e20cb4163dea8e0fafb8f03bdc7f5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So the compiler has more opportunities to inline and to not emit out-of-
line copies.
Change-Id: I6979d02a7395405cbf23fffd17c9101b2b52472a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit fe6dda9bb9310878b408b2421f60acb7135bd8ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The algorithm was leaking the previous buffer if the attempt to
allocate a new one failed with std::bad_alloc.
Wrap the buffer allocations into std::unique_ptr, so that we do
not leak the buffer in case of bad_alloc.
This patch is not changing the behavior of QDataStream, so it's
NOT handling the bad_alloc exception, and also does not change
the state of the buffer in case the exception occurs.
Pick-to: 6.5
Change-Id: I5558a6d03768094e4ee83ca47cacf4e09c36f1cf
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e176dd78fd2f253eb2625585b2bd90b5713e5984)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The step variable changes in the geometric progression, which means
that it may overflow at some point. Since it is a qsizetype (signed 64
or 32 bit integer), the overflow would be UB, so we need to avoid it.
Add an extra check that the step is lower than the safe threshold
before increasing it.
Amends a1bfac287ee5d3719646d68dc91dc8e8e4cec04e.
Change-Id: I6097986e614937fa88b31b3dd1e53ecff22533d7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 2352fa0040f133e30ccc3955031618f51214791d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This polymorphic class is not designed for copying or moving, so
statically assert that it isn't moved or copied.
Amends dfaca09e85a49d2983bb89893bfbe1ba4c19eab4.
Task-number: QTBUG-124909
Change-Id: I6a4fe460adf9bf903578601e500ccc697a3f7c96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e53df7a0218ff2d88668a33a0d9cf8bbe40e4933)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the widget the completer is attached to was hidden,
the popup stayed open. It would "hang around" with no
corresponding UI being around anymore, which is weird.
Fixes: QTBUG-124861
Change-Id: If9cb04e693c2663ef9da14164611f26becafc4b4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 24859d7deaf995e992f0d9439a1c476126d5f654)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If QApplication::focusWidget() returns null, which was the
case on Wayland under some circumstances, then the code collecting
the error output would crash when dereferencing the null pointer.
This fixes that crash and gets proper test failure output instead.
Pick-to: 6.5
Fixes: QTBUG-124475
Change-Id: Ic34228be953cf42dfe2ebf75957cd48791e6de7d
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 5711aaa0170bd97dab1479c0e6c884289e41da99)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code was based on QString::split and e.g. didn't handle
escapes in quoted-strings.
Write a modern recursive-descent parser to parse out type/subtype and
charset parameter. Since we don't, yet, support CFWS (see below),
recursion depth is strictly limited, so we're not susceptible to
recursion bombs here.
It currently handles only RFC9110-style grammar, but can be easily
extended to support CFWS (RFC2822-style comments and folding
white-space) or RFC2231-style continuuations, if needed.
It's a bit more general than strictly required, because I expect this
to be reused elsewhere ere long.
Manual conflict resolutions:
- dropped a few constexpr from functions which use QByteArrayView's
startsWith(), which is only constexpr since 6.8
Fixes: QTBUG-120307
Change-Id: I309928dc350a043672dffb4a259b457764c031be
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 98b034e53a7821018683c05d5dba776f0f2753f0)
As part of df359bcb703db5a8adbf14e88ba4ae0d54f0cfcd the semantics and
interaction between QEventLoopLocker and QGuiApplication was changed,
based on the assumption that these two mechanisms were independent
and should not affect each other.
This had a surprising regression where the use of QEventLoopLocker in
combination with the QCoreApplication::isQuitLockEnabled() automatic
quit would end up quitting the app, even if it had open windows, for
example when the last job of some internal job queue finished.
It could be argued that if the app has open windows that should not
be closed, they should ignore the Close event, and that an application
with running QEventLoopLocker jobs should maintain an active window
showing the progress of those jobs, but still, this is regression
that we want to fix.
We now bail out if !lastWindowClosed() in QGuiApplication's
canQuitAutomatically, which is triggered from QEventLoopLocker's
isQuitLockEnabled() behavior. And we do so regardless of whether
quitOnLastWindowClosed is set or not, as the latter property
determines the behavior when closing a window, not the behavior
when a QEventLoopLocker goes out of scope.
Similarly, we now block quitting of the application when triggered
by quitOnLastWindowClosed() if a QEventLoop is active, regardless of
the isQuitLockEnabled(), as the latter property is determining
whether we should trigger a quit, not whether we should block them.
[ChangeLog][Important behavior changes] Fixed a regression where
the last QEventLoopLocker going out of scope would quit the app,
even if there were open windows, if quitOnLastWindowClosed was
false.
[ChangeLog][Important behavior changes] Fixed a regression where
closing the last window would quit the app, even if there were
active QEventLoopLockers, if isQuitLockEnabled was false.
Fixes: QTBUG-124386
Pick-to: 6.5
Change-Id: I84fd0ddea78a2f417f3a17b326113c880079cf85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0b494c47d36a8234b1763518c9cddafe62f03715)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Q_DECLARE_PRIVATE already marks the Private as a friend of the Public
class. No need to do it manually.
Fixes GCC's -Wredundant-decls.
Amends 0875626e22ad4e709ddf505e701a8d699559f5b4.
Pick-to: 6.5
Task-number: QTBUG-115583
Change-Id: I26f8a42e375c1377c03fe60ccccadc5d0c3b02c5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f24a03a22a863eac18a3981973f6a19aef3116f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends a45a3b1ece490bcae5cccd858dbe11408a19bee0, which added the hidden
friend as an inline function, without removing the already existing
declaration. Since that declaration was exported, keep it in the ABI
via Q_REMOVED_API, and only remove it from the API.
Fixes: QTBUG-115583
Change-Id: I169b565ed02168248f96c1379f537b90b4ea481c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit c4086d7b7a3b5a06a2faaaf26e2a9f9d6b2918c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Sending an ObjectShow event, e.g. by setting QQuickItem::visible to
true, has to trigger a refresh of the screen reader hierarchy. If the
signal is ignored the source of the signal will be ignored by the
screen reader.
Fixes: QTBUG-122436
Pick-to: 6.5
Change-Id: I32ee2e8b2602cd0dd9b9a83ff1fe426d88d137a8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit efd00066b42d9cbd3a85336f4851213d94cdc28e)
... incl. some that fail.
This is in preparation of a patch that makes the parser more
compliant.
Manual conflict resolution:
- Rebased to before conflicting change
15b0bd69ff2a3ac967ddb98b5fc3c3ce8c3d5b4b
Task-number: QTBUG-120307
Change-Id: Ic47b23132f2a7ea81b6c480bfb036bc2daff05da
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 2822b226109bc2e537e810b7c885baa2cb369588)
SPDX nowadays has a dedicated license identifier for SQLite. Let's use
this.
[ChangeLog][Third-Party Code] Change identified license for SQLite from
'Public Domain' to more accurate 'SQLite Blessing':
https://spdx.org/licenses/blessing.html
Pick-to: 6.5 6.2 5.15
Change-Id: I6c3378c45bc5edf498673c1b060f8e8c14d96a62
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit f0633e823796775d2c019363ca4f1cb008851402)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When using QWindows11Style, the viewports background has to be set to
Qt::transparent to have the effect of rounded corners in ItemViews and
Combobox flyouts. Other Windows styles do not make use of transparent
windows, so this polishment needs to be reverted in case the style
changes. Other styles also do not manipulate the
QAbstractScrollArea::viewport palette and thus changing color schemes
results in not applying the new color scheme.
Fixes: QTBUG-123928
Pick-to: 6.7.1
Change-Id: Icb529124f63587e75bb56e40e8b1fcfe3c61c55d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 7d7d843a3eacf11d2e9e5c2dd596f6daa3ab46f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With the since syntax we can now mark since more standardized
Change-Id: I3c53010043a40e8887f1899cde2689ee80e530ae
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
(cherry picked from commit b7b0478405fb95ec44b286e0efb41256ef5170d6)
Consider the following QML code:
import QtQuick
import QtQuick.Controls
ApplicationWindow {
visible: true
Menu {
id: menu
MenuItem {
text: "Some action"
}
}
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: {
exitAppTimer.start()
menu.open()
}
}
Timer {
id: exitAppTimer
interval: 1000
onTriggered: Qt.quit()
}
}
With the new native Qt Quick Menu, this will create a native menu on
platforms like macOS. When the user right clicks on the window, a timer
is started and a native menu opened. After 1 second, Qt.quit() is
called while the menu is still open. As popUpContextMenu is blocking,
when the menu is finally closed (by user interaction), control returns
to QCocoaMenu::showPopup, but the QCocoaWindow has since been
destroyed.
Account for this by storing the window in a QPointer.
It's not possible to test this as native menus can't be auto-tested.
Fixes: QTBUG-124551
Pick-to: 6.5
Change-Id: I14a97073f350c38828b3e16bb157439aeeeb6529
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 468cb035efe4890c388069eb373a7ae8ef178146)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... which claim full C++20 conformance (__cplusplus >= 202002), but
still lack https://wg21.link/P0846.
Fix by extending the existing workaround for lack of P0846 support to
these compilers.
Known to fail: _MSC_VER 1936
Known to pass: _MSC_VER 1939
We might need to check 1938 and 1937, but the workaround should only
show up as an additional get/get_if overload and not disturb normal
operation, so it's not critical to get the boundary version exactly
right.
Amends eb9c8042cfa71f16cda27cdeb052d84a6cc117d7.
Task-number: QTQAINFRA-6204
Change-Id: Ia3e0072d606efb7efd6ce0f75239850c7cd925bb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit ab06d402dd833cefe9c0d929c13e93068aab96d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 74e8f673b827c57ebf2bf802840c19e4a1ac848b.
Reason for revert: the change as is makes the rendering of arrows in the
styles unpleasantly blurry.
Change-Id: I59ccd7373631a550276465caffb7d3074ff5893c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 35309856201dea2f14e53468a3c39a777c062729)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
By default we define QRHI_METAL_COMMAND_BUFFERS_WITH_UNRETAINED_REFERENCES,
which means we create MTLCommandBuffer via commandBufferWithUnretainedReferences.
In this case, if Metal API validation diagnostics is enabled in Xcode,
the texture is released before the command buffer is done with it, so
we manually ensure the lifetime of the texture extends until the command
buffer is complete.
Change-Id: I9b9efa96b4a004f43e0b72144aafc4b440c7fbb4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 94e83aa7d7d05cf0b6636bdfac5cdcb38706aa73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some of these would break if we changed the start(Priority) to say
start(QThread::Priority) instead.
Pick-to: 6.5 6.2
Task-number: QTBUG-124723
Change-Id: Id3ebe73718c8acbc54a2c88158f4062fd0dd5be1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cf19105e018314d1fb05bc91959f233d3d6747ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Print a warning when we encounter an unsupported data type.
Pick-to: 6.5
Change-Id: If35ac4dfdf29e555ec406f592c1001b5e16f8ff2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 463037d9bd5461218afe5fb5a5e4fe2d62923f20)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This function was forgotten when the Qt3 support was removed during
initial Qt5 porting (f306d18fe6555a9a5c60560745773b0bf5685ec3).
Change-Id: I83a0be0db7e81bd9d4f84683a013e1d4faab2dd8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
(cherry picked from commit 5a7d41667d08cd6062cee43ee871fae5663ed7e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Android QPA picks between two types of Views that can provide a
Surface for it, SurfaceView and TextureView. Normally, SurfaceView
is used if there's just one window in the app, and TextureView is
used for any additional windows, since it allows better control
over the z order between the windows. Add an environment variable
QT_ANDROID_SURFACE_CONTAINER_TYPE that can be used to
override the normal choosing strategy, and force the application
to use either one of the View classes for all the windows of the
app.
This helps with testing changes to the Android QPA windowing,
as you can use the same app to test both Surface Views easily.
Change-Id: Icc15fd9675175b854354a379b6ffa7ae5532408e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 88168fa85dae337410169bf54e6bdf5b20e3023e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The lengthHelperContainer() implementation for sizeof(Char) == 1 case
is using qstrnlen() for the non-constexpr case.
qstrnlen() is an inline function which is effectively a nullptr check
and a memchr() call.
For some reason, on MSVC this combination resulted in very slow
compilation for the user projects, where each call to
QObject::setObjectName() was hitting this codepath.
Fix it by replacing the qstrnlen() call with strnlen_s() for MSVC.
It seems that for now all versions of MSVC are affected. However,
introduce a new Q_COMPILER_SLOW_QSTRNLEN_COMPILATION definition,
which will allow us to check for the compiler version later on.
For now this definition is set for all MSVC versions unconditionally.
Fixes: QTBUG-124376
Pick-to: 6.7.1
Change-Id: Id769bef1e950ffa756acf7af39d362fd8b112019
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d849cb80a4ba468e2c6097ebfcab384ddaec8e67)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In some circumstances our application badge code seems to throw an
exception. The issue is hard to reproduce but just catching the
exception should be enough to fall back to the "non-winrt" version of
the code.
Fixes: QTBUG-117091
Pick-to: 6.5
Change-Id: I61f4e59f7309e2bb47b50a6ca6f3099ed9cd0af1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6f995b5e246bd9cc56710fa9cebc6dbb7cb2b72f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When deploying for a cross compiled target we should deploy the target
versions of directx and compiler runtime dlls. Thus a new platform was
added to utils to be able to reflect this distinction.
Fixes: QTBUG-124719
Change-Id: I4dd797804fa871d76d56f8775b188d4306b51e5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit ed191b6afa36aaf47478856fc44b9ebc300ff808)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QT_EDITION is not used anywhere in Qt6, stop
adding it to qconfig.pri.
Packaging currently unnecessarily patches
the edition when handling the first steps after
integration and again during install time.
Pick-to: 6.5 6.2
Change-Id: I0ad1933ec8fea741796fdf6d13f627a657aac401
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
(cherry picked from commit d04deafed932d955e2e94324ec5b1a261fdb3332)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
`QCoreApplicationPrivate::cleanupThreadData` calls
`~QGuiGLThreadContext`, which calls
`QOpenGLContextPrivate::setCurrentContext`, which creates a new
`QGuiGLThreadContext`, which is not destroyed anymore.
since `~QGuiGLThreadContext` sets a nullptr we exit early.
Fixes: QTBUG-124538
Change-Id: I51e40fcf8fd1169a4dfd336fac9c82f44d42f68e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit d139642aefde2d00683cf29f3875ccfae6c66779)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Neither atomic::load() nor store() are contstexpr in the standard. The
only reason this code compiled is because QASVR is a class template,
so contexpr tags that can't be fulfilled are silently dropped at
instantiation time by the compiler.
Remove the tag to avoid giving readers the wrong idea.
Reported-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I6f23ab9fb2e8ceecaa45ffaef1fadbc7de266803
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c1f1523047b2e005fb7442847c2aa000faa7d0ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use optional::emplace() instead of assignment from an rvalue.
Saves the move constructor and destructor calls, both of which are not
trivial (due to cleanFn).
Change-Id: Ief77626c77d0c8c2ce17e3b1a21496a7da969761
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 063e31209b1750b6cbd2c3f57c49ce372b13a91a)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The recent addition of support for multi-frame (non-animation) formats
had an unwanted side effect of sometimes calling
QImageReader::nextImageDelay() when the reader is at a different
frame than intended. Fix by effectively reverting to the previous call
pattern.
Fixes: QTBUG-124227
Pick-to: 6.5
Change-Id: I735f8d67afb17bd4c77f9b4507a71796b7d66958
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 5f0ed0ac0ddffd3779fae0db956df8d48d629f92)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some repos have licenseRule.json files. Adding them to the IDE projects.
Change-Id: I7fdc054d244d48e3343866775671d8f4f4c9390b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
(cherry picked from commit 7a62c962383b6a069c6955f57173a0f1001c4461)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When using writeDatagram(QNetworkDatagram), the sendmsg() call on
FreeBSD is failing. It works on Linux and on macOS, so my guess is that
IP_PKTINFO works to set the sender address but IP_SENDSRCADDR is not
allowed in this context for some reason.
Before:
recvmsg(5,{{ AF_INET 127.0.0.1:19530 },16,[{"H\M-p\^A\0\0\^A\0\0\0\0\0\^A\tso"...,49}],1,{{level=IPPROTO_IP,type=IP_RECVDSTADDR,data={0x7f,0x00,0x00,0x01}},{level=IPPROTO_IP,type=IP_RECVTTL,data={0x40}}},48,0},0) = 49 (0x31)
sendmsg(5,{{ AF_INET 127.0.0.1:19530 },16,[{"H\M-p\M^@\^C\0\^A\0\0\0\0\0\^A\t"...,49}],1,{{level=IPPROTO_IP,type=IP_RECVDSTADDR,data={0x7f,0x00,0x00,0x01}}},24,0},MSG_NOSIGNAL) ERR#22 'Invalid argument'
After:
recvmsg(5,{{ AF_INET 127.0.0.1:16018 },16,[{"\^U\M-X\^A\0\0\^A\0\0\0\0\0\^A\t"...,49}],1,{{level=IPPROTO_IP,type=IP_RECVDSTADDR,data={0x7f,0x00,0x00,0x01}},{level=IPPROTO_IP,type=IP_RECVTTL,data={0x40}}},48,0},0) = 49 (0x31)
sendmsg(5,{{ AF_INET 127.0.0.1:16018 },16,[{"\^U\M-X\M^@\^C\0\^A\0\0\0\0\0\^A"...,49}],1,{},0,0},MSG_NOSIGNAL) = 49 (0x31)
Change-Id: I455fe22ef4ad4b2f9b01fffd17c77565e230ce31
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 41675df695206d046d4786af142f163dfe9b18dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
0x80 is too big for a signed char (range is -0x80 to 0x7f).
Change-Id: I455fe22ef4ad4b2f9b01fffd17c7746f4ea3c536
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 2dfb7f3337f601e90532499acc763be1c339aa4d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It does set ECONNREFUSED explicitly. So let's reuse ServerRefusedError
for it too (it was so far only used when we got a REFUSED DNS answer),
which allows tst_QDnsLookup to handle this as an ignorable failure.
For almost everything else, it sets ETIMEDOUT to indicate "no answer",
which isn't useful. So let's inspect the reply to see if it has
something.
Change-Id: I455fe22ef4ad4b2f9b01fffd17c771ffa4a998be
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f19e9f2521ff7784223ec34fc6794583f4faa2a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This isn't a bug, it just removes dead code. The code to compare
US-ASCII to UTF-16 was never engaged because this conditional was wrong
and effectively catching everything. Fortunately, because that
comparison code is now wrong with the unit tests added to tst_QCborValue
in the past few commits.
Change-Id: If1bf59ecbe014b569ba1fffd17c4ce184948e646
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit af9f3c5da282a7eff9456b2133a91f06aa1c1a85)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This amends commit 394788c68efacdec2676988b4b4ff207b20557f2 (its
ChangeLog applies to this commit too). That fixed sorting of UTF8-to-
UTF16, but when adding more unit tests, I've discovered that some UTF-16
strings also sorted incorrectly. There were two problems:
First, we were assuming that we could rely on the UTF-16 length as a
proxy for the UTF-8 one, but that's not true for some cases:
* both 1-, 2- and 3-codepoint UTF-8 sequences are 1 codepoint
in UTF-16, so some strings would have identical UTF-16 length
* 4-codepoint UTF-8 sequences shrink to 2-codepoint UTF-16 ones
(2:1) but 3-codepoint UTF-8 sequences shrink to 1 (3:1), so
some strings would be longer in UTF-16 but shorter in UTF-8.
Second, QtPrivate::compareStrings performs UTF-16 codepoint comparisons
not Unicode character ones, so surrogate pairs were sorting before
U+E000 to U+FFFF.
To fix all of this, we need to decode the UTF-16 string into UTF-32 and
calculate the length of that in UTF-8 to be sure we have the sorting
order right.
Since this is a slight behavior change with a performance penalty, I am
choosing to backport only to 6.7. The penalty mostly does not apply to
6.8 due to commit 61556627f25e7c7acbfcc5e54127a392b5239977.
Change-Id: If1bf59ecbe014b569ba1fffd17c4c4ddcc874aac
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit d4c7da9a07dc1434692fe08a61ba22c794574c4f)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit 8d127c57376e48dd49afe62cfb8e714d26759a69 refactored this code
from QByteArray::split to manually iterate over the list (and
QStringTokenizer doesn't work for QByteArray), so we missed the last
element in the iteration.
Fixes: QTBUG-124580
Change-Id: I455fe22ef4ad4b2f9b01fffd17c867f6ed350af7
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 038c199d59ff5e9e16fe2a010f3f1f55764cf5ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some unix-like concepts are supported by VxWorks VSB layer - UTILS_UNIX.
One of such methods is getgrgid(). Include it in
`qfilesystemengine_unix.cpp`, so that we don't need to exclude VxWorks from code that uses it anymore.
Task-number: QTBUG-115777
Change-Id: I72b301647bfdb208cb6859bb0f9994e3537fc345
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 21196d26d84f0f9984308660714921aa17790bc4)
The high-dpi painting fix for the arrow painting was missing
QPainter::AntiAliasing flag so the rectangle had some artifacts with
certain (small) sizes.
Also there is no reason to move the center by 1 pixel to the top left
anymore now that we're using decimal values.
This amends 3936d254ca0e7259cd97238c31df8413d03fd475.
Fixes: QTBUG-124554
Task-number: QTBUG-114539
Change-Id: I8a34d7ed937db261ce652bd66234783fb3338cbb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 74e8f673b827c57ebf2bf802840c19e4a1ac848b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For security reason, Wayland doesn't provide global position for
top level windows, so topLevelAt is not supported.
Fixes: QTBUG-113404
Pick-to: 6.5 6.2 5.15
Change-Id: Id60b8b77a1843344db4d4e4c13382ad87adac806
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 10c3dd87d3bc2e84d4f477888622f5fc7ed5d502)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These reveal a roughly factor of six slow-down for two valid date
formats and a roughly factor of twelve slow-down for an invalid one.
Pick-to: 6.5 6.2
Task-number: QTBUG-124465
Change-Id: Ibd21e43d4c64aced33ba5b21e4602e0dc4fd7548
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 4467ebc837aded07b0b0cbc3b34ce67f2c0e96f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The existing data comes under Unicode-DFS-2016 but future updates
shall come under Unicode-3.0, so update the existing headers with the
former and the generator script with the latter. Leave a note in the
attribution file about this transitional state and how to resolve it.
Replaced UNICODE_LICENSE.txt from src/corelib/text/ with
LICENSES/Unicode-DFS-2016.txt, as fetched using reuse download.
This doesn't look like a rename but only actually adds some irrelevant
lines about where on the Unicode website the upstream files (to which
we do not apply this license) come from and changes some spacing.
Pick-to: 6.5
Fixes: QTBUG-121653
Change-Id: I50c9f4badc77a9aa402af946561aff58ae9e3e7a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit d5e40b5e58c187086d7c23af1860c1af28957ccc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation of `QStyle::drawControl()` states that
"The widget argument is optional" so it must not be used
unconditionally.
Change-Id: I8b5a8ed421c0ae2c667925e448c9a029b6deedfd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 30061e8960eb9d8abb8a98270e3e92beef60d7d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow-up from commit 299dfe which added a similar update
for expose events. This fixes missing DPR updates for
exposed windows.
Pick-to: 6.6
Change-Id: Ic1a9a41bd979270b97303abb71f1230bff001d19
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 041ca2a3a818955ebcbbc0acd164138ffd561a6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Location keys are meant to be used as regular expression.
The . need to be appear as `\.` in the regular expression.
The JSON parser interprets the `\`, hence the `\\.`.
Task-number: QTBUG-121039
Change-Id: Ie3b8fb9686d59db13e5522309adbf3877bd2a3f7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit eb87f7bcb98afccde315a10c5e26dc3485f5d92f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When adding/fixing parts earlier it was missed that it was not handling
the _unsupported_ case, when authentication is not handled and there is
no resend. But there _is_ a challenge header.
Pick-to: 6.5
Fixes: QTBUG-123891
Change-Id: I21470df0ce2528bad3babffc6e9f19b7afd29d20
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 4f9387f2aee19e38f05cab76a71f0d067b8d80dd)
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
There was a discrepancy that the multi-arg arg() overload would accept
any number of digits in the placeholder, resolving up to value 999
(e.g., %000001 was interpreted as placeholder #1), but the single-arg
arg() overload only supported exactly one or two digits. The single-arg
behavior was documented, so use it.
[ChangeLog][Important Behavior Changes] The QString::arg() overload
taking multiple QString-like arguments is now fixed to interpret
placeholders like the other arg() overloads: it will find at most two
digits after the '%' character. That is, the sequence "%123" is now
interpreted as placeholder #12 followed by character '3' (verbatim).
Fixes: QTBUG-118581
Change-Id: I455fe22ef4ad4b2f9b01fffd17c767a948d41138
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit f0f2a9ef2600288b16b69c135389dfe1fea89a8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There were two of it. The "year-match-*" tests have two year fields,
one four-digit the other two-digit, and deal with whether they match.
The second year-match-1999 had, however, only a "yy" year format; it
in fact belongs to the "just-yy-*" family that follows. So rename it.
Amends commit 5108192f67042656afdb3508f8cc2563167fae97 which landed in
6.7.
Task-number: QTBUG-107185
Change-Id: Ibfe0c33cb00dc068d0f670d27c43ec4dc4550c05
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit de5c507a55097c08602f38062bf5291c9cbb4e24)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow-up to commit ae6186c7e8cfdb9420b9119f5affbba7d069598d
* require the feature in headers that should only be seen when it's
enabled,
* expose the auto-test to being run even when the feature is disabled
(the parts of that depend on the feature have needed #if-ery) and
* fix the Darwin-specific test's misguided #if-ery.
Pick-to: 6.5
Task-number: QTBUG-108199
Change-Id: I398cf44c33ffdcb4bb04f54a9d8ccfef68741e4e
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 98581c54fe729f8d30341ebbc0576ad5430df268)
As of Qt 6.7 we no longer return jobjects from that API. The declared
QJniType::Context type (and similar types) is no longer jobject-like,
they are now QJniObject-like.
Task-number: QTBUG-123900
Change-Id: I215f84ac37907ae2b7950c40c7287590234e4e35
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 7d9cedec6aca825ea9b2280c4e3f3e30a0b51ccd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We'd end up trying to takeFirst() from an empty QStringList.
[ChangeLog][QtCore][QProcess] Fixed a bug that would cause
startCommand() to crash if passed a string that was empty or contained
only whitespace characters.
Fixes: QTBUG-124512
Pick-to: 6.6 6.5
Change-Id: I455fe22ef4ad4b2f9b01fffd17c7689095c39272
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 60bdf2b220151021e59baa372a050b9f72400b81)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We weren't doing the decoding from UTF-16 to UTF-32, so weren't catching
invalid code sequences
[ChangeLog][QtCore][QXmlStreamWriter] The class now rejects writing
UTF-8 and UTF-16 invalid input (improper code unit sequences).
Task-number: QTBUG-122241
Pick-to: 6.6 6.5
Change-Id: I83dda2d36c904517b3c0fffd17b42d17c637fdc4
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit c25541e9ac4c7021c69c600906e5ca8c80f18401)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were iterating over code *units* and that yielded wrong results. The
one from the bug report was simply caused by the fact that
QUtf8StringView::value_type is char, which is signed on x86, so the
expression:
*it <= u'\x1F'
was true for all non-Latin1 content.
But in attempting to fix this, I needed to do the proper UTF-8 decoding,
as otherwise we wouldn't catch non-Latin1 sequences and such.
[ChangeLog][QtCore][QXmlStreamWriter] Fixed a bug that caused the class
to fail to write UTF-8 strings with non-US-ASCII content when passed as
a QUtf8StringView.
Fixes: QTBUG-122241
Pick-to: 6.6 6.5
Change-Id: I83dda2d36c904517b3c0fffd17b42bbf09a493d0
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 94c62e322264e2e7d61193ae74ba8556a330385c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of repeating the full template expansion.
Task-number: QTBUG-124117
Change-Id: I40526efc4e93413794c3fffd17c4f9e200733660
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 11f242174b5b53a7052e9d6edc7b75aa8f8d91c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both sides of it were calling the same appendTo(), so we can avoid
repeating ourselves. This MAY fix a warning with VS2019.
Fixes: QTBUG-124117
Change-Id: I40526efc4e93413794c3fffd17c4f9c96ee187f9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 2e8c6d467fa245e8bcb81cff63d2d9628e1ee81e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When digesting CLDR v44.1's github form, some data (e.g. pt_BR's
language endonym) were None that had perfectly sensible values in the
zip-file form. Letting __find() yield INHERIT entries lead to find()
sometimes returning None, where __find() should have tried harder or
raised an Error.
This further amends commit bcdd51cfae24731a73d008add23d3c1e85bbd8d0
(after commit 0f770b0b34bcb5fa0a598b2ff76fe215fbc25f5c isolated its
magic value).
Pick-to: 6.5
Task-number: QTBUG-115158
Change-Id: I1af92a687cd50b8fd026c25f068c804a3516ef95
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit 43cb4136a92331d1137ddd7453e7bb4ca130ecff)
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
The existing caller returns early on finding a match, so never ran off
the end of the iteration unless there were no matches. I'll soon be
adding a new caller that wants to iterate all matches, so will run off
the end even when there are some. So only raise the Error if we found
nothing.
Pick-to: 6.5
Task-number: QTBUG-115158
Change-Id: I1cae4674eb5e83c433554c15ecc4441b756f20eb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit c8b70f4e511e26c73a9da453f4c2b5624e66a2c1)
Giving it a symbolic name is clearer (and saves me the need to
duplicate the comment when I add some more references to it).
This amends commit bcdd51cfae24731a73d008add23d3c1e85bbd8d0
Pick-to: 6.5
Task-number: QTBUG-115158
Change-Id: I7577e0cde783fcda840009c7aea46934964c6e4c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 0f770b0b34bcb5fa0a598b2ff76fe215fbc25f5c)
We used to set a private _q_foreignWinId property on QWindow when
creating foreign windows, and this was the mechanism which we then
passed the foreign winId to the platform plugin.
With c585802e946d97e7d177ea334a162dc7bc286b84 this was removed,
since we now were passing the winId through via explicit QPA
APIs, and since 0c6911e5cde24c45d6f2c08b6e71064bdd1eccfa removed
the ability to explicitly destroy() a foreign window.
But when closing a QWindow, we destroy both the window itself,
and all its children, including foreign windows. In this case
we still want to support recreating the foreign window, for
example when the parent window is shown again. To enable this
we restore the _q_foreignWinId private property, but keep
the limitation of not being able to explicitly destroy a
foreign window.
Pick-to: 6.5
Fixes: QTBUG-124160
Change-Id: Ia885ba9f043e64fb21eedd2b4c344679726f1b5c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 988039729f55a5e62e32b82c6f29ff7457e91d9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pass the pointer to the current state, not a pointer to a pointer to it.
[ChangeLog][QtCore][QStringConverter] Fixed a bug involving moved
QStringEncoder/QStringDecoder objects accessing invalid state.
Amends 122270d6bea164e6df4357f4d4d77aacfa430470.
Done-with: Marc Mutz <marc.mutz@qt.io>
Pick-to: 6.5
Change-Id: I70d4dc00e3e0db6cad964579662bcf6d185a4c34
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 39bbfce9b675c9085ef49c9b9c52c146eca55e4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The color editor factory example is removed and part of the codes are
used as snippets.
Fixes: QTBUG-119985
Pick-to: 6.6
Change-Id: I421e473e7db09a5af7543b80b87a338d8ff2ab7e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4e1a1f3697563124588d7d00089b15084220ca42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a date string contains day of the week, day of the month, month
and two-digit year, it was still possible to get a conflicting result
in the default century instead of a consistent result in the next (in
fact present) century.
The actual logic needed to get the right year has to take into account
all date fields. This is all worked out already in actualDate(), so
delegate to it instead of trying to make do with just the year info.
Pick-to: 6.6 6.5
Fixes: QTBUG-123579
Change-Id: Id057128d8a0af9f3a7708d0ee173f854bb1a2a8e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
(cherry picked from commit 3e426182e2e8122d96b208702faaf3177f3a3081)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the Windows 11 style, it's better to include the headers for specific
widget types at the expense of compile time, than to pay a regular
runtime cost from using expensive inherits().
Add const, fix style, and break excessively long lines related to this
change.
Change-Id: I2c8c6d98267d9ff3542decda71e08e462cf9807c
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
(cherry picked from commit 96fcb4ef84bb7486221f04e53be8ee7218385178)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Subscribe to SettingChanged signal from xdg-desktop-portal to get info
when color scheme changes and update it on runtime.
Fixes: QTBUG-116197
Pick-to: 6.6
Change-Id: I7803ea76bc1ac0749d60ee55c1c0d9051dad210a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit a833d5682ac44571e13568336f2bd3ec7deb1d6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When CSS has been used to customize the text color, render the bullet
with the same color. This is consistent with web browsers, and with
Qt Quick rendering.
In QTextDocumentLayoutPrivate::drawListItem(), the pen color is the
text color, so use it instead of brush color.
Add a baseline test for lancelot: the background and general text
are customized, then some list items are customized further, and
some of them have colored text spans. Repeat with different styles
of numbered and bullet lists and checklists.
Fixes: QTBUG-2188
Task-number: QTBUG-213
Task-number: QTBUG-57833
Pick-to: 6.5
Change-Id: I71e84d00172e4b37aef57c8badd2ec43c10113d9
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 7f48c79627663f0777df9c10d06202aea5bedac3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise the 20x20 margins will produce different layouts depending
on the DPR, which is not what we want.
Change-Id: I4153d0843ef51c8e0f60d7d5166b153d45201c95
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit a78938e0f686263540e06d923f2949169f3219e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The classic linker (triggered via -ld_classic) doesn't support this flag,
and we can't construct a genex that takes this into account, so add an
opt-out for Qt WebEngine.
Change-Id: I62418e0ff37fe8f5bdda2fa8d01b36a8fd44542a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit b74369c03325e49132dc77f2a83af8fd25c81a8a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Making it be carried more consistently.
Change-Id: I8d2da1264a59febbd44bbcff798b647ec2813bb0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 2d2fae48637d0aaa77cdd7dd413c40efec27a8a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QStyleSheetStyle::loadPixmap() might be called with an empty filename
but then it should not try to load a file with an empty filename.
Pick-to: 6.5
Fixes: QTBUG-123839
Change-Id: Ie01e9f75f025650b0802736bb589ebdc48e93696
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b773a4f5836b39e363899ad48a9f469e7f18db1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the Group Box Example from the repository, eliminating the
associated example codes, screenshot, and documentation file. The
only relevant portion used in the QGroupBox class has been relocated
to the existing snippet file. Additionally, all references to this
example across other files have been removed.
Fixes: QTBUG-119980
Pick-to: 6.6
Change-Id: I66f9dd9dab1fe64f2d20424af3acd135201827d2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f371f8a64dc76ec9ff07b666577b7ab47b69751d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Virtually all callers of this function (will) pass rvalues, so take
the std::function by value (reaping C++17 guaranteed copy elision) and
std::move() into the member variable ("perfect sink").
Like for many owning types, moves are much cheaper than copies for
std::function, because the external state is merely tranferred between
objects, and not copied.
Amends e560adef213301318dcc13d4db155624846e0420.
Change-Id: I269b54e51ba09ac595ac4e4f255209778819adad
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit a56461883830cecf281b1d6db5e7d6103154d3d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
HttpTestServer::Handler is declared to take the first argument by
reference to const, not by value, so use the same parameter passing
for the lambdas passed to setHandler().
Avoids copying the (rather large) argument when invoked through the
std::function wrapper, and silences clazy-function-args-by-ref.
Change-Id: I726d0b98a7fcb3b1b33c5bde203035f593c39bdd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 5b6c6dab632a32a09963453b08731e9e33334e9a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move some deleteLater() calls to before the first QCOMPARE/QVERIFY
macros, so they get executed even if the macros return on failure.
This isn't an all-encompassing solution, but I lack the time to port
all this to smart pointers, and this is some improvement.
As a drive-by, port QVERIFY(opt.has_value()) to QCOMPARE(opt, nullopt).
Task-number: QTBUG-120307
Change-Id: Ia5a2cabd273a779938b22badc91b109fcc545203
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit d4aaf61b3333b48b4e79ad60b63bb50dbea72617)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The accessibility implementations require the type to be fully
defined anyway in order to call type-specific APIs, so there's no
need to use inherits(). Use qobject_cast instead.
Change-Id: I5c013be57f48272a748451f4888911fe6aa6574e
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 3973d6c529605fbce8457d7663d244ebadbe7160)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QStringDecoder within std::optional needs QStringDecoder to be fully
defined ("in-size" (Lakos)).
QByteArray, used as a function parameter, can be forward-declard,
though ("in-name-only" (Lakos)).
This also makes the header comply with Qt's private symbol versioning,
which requires every private header to include some other private
header, or, eventually, qglobal_p.h.
Amends 4da14a67a6157c415f8228a8bae7d6b0f895df7c.
Change-Id: I35fed05955f1194299162b576834c1045672bcac
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 96f78cbdd9412e6043bb4eb0d0dd818c5d800151)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We supported CSS 'border-width', 'border-style' and 'border-color'
for HTML tables since 8a9bec35fb0c60a0e5990c1a12ffe6f39fdbf2d.
Now we also support the 'border' property, which is shorthand to
set all four borders' width, style and color.
Fixes: QTBUG-123167
Pick-to: 6.6
Change-Id: I5f29b94ab9facf412a9c230d554efb5c69368b6b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 26e75d452eeb2762fa3ece1c63e94d01587c6260)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Avoid the optimized fixed-point function for vertical gradients if the
parameters are out of range for that. Fall back to the general
gradient function in that case.
Fixes: QTBUG-120331
Pick-to: 6.5 6.2
Change-Id: Idf116f0077403531d9ea414e3043fdc92b6fe4a9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit ade33a91442f8085a7ddeb8e6fdf33463103b119)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The crash is due to absence of the helper class that manages the
selection in QtInputDelegate.
As a fix, updateInputDelegate() is introduced when setView(), where the
instantiation and clearance of EditPopupMenu is made. On the other hand,
the nullity of EditPopupMenu in QTEmbeddedDelegate is handled.
Fixes: QTBUG-122740
Change-Id: Iac5cded7be7530dde8c739265fc9402670714d39
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit a87764789feaa0575b9f4f0957bb7ec3e3b9a4d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Deleting QNetworkReply is a common way to cancel pending request.
Wasm implementation was not treating it properly.
Task-number: QTBUG-124111
Change-Id: I46d8624e323fca0932411c575922415d9f9d7986
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 655b98482e8339b287fb040fd25013dc1232a43d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Set focus on the test window so that the tested widget doesn't have it.
Remove the "PublicWidget" hack, we have public QWidget APIs to find the
next widget in the focus chain that we can use to transfer focus
reliably. Use TabFocusReason to maintain existing behavior, and to
test that widgets that handle that specifically appear correctly. Clear
the focus on the test widget by setting it back to the window after
taking the "focused" snapshot.
Add QCOMPARE and QVERIFY to assert that the test is in the right state
before taking screenshots.
Change-Id: Icef6ce1bb1c63c9f6cde7d0ddca82e693cace420
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bf2ed624091d0239bce91a84df59b7afc843298a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found by Coverity.
This code predates the move of androiddeployqt to qtbase.
Pick-to: 6.6 6.5 6.2 5.15
Coverity-Id: 378442
Change-Id: Icc24918159132c55a3817eaf19c96ea212dfa6dc
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit db240d99cffbc3af2eb39a5f7d48e68e57b85271)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's the gbm_bo_get_user_data() function that takes ownership of the
FrameBuffer object, not the caller of the function, so release() into
gbm_bo_set_user_data() not into the return. This threw Coverity off,
which complained about a leak of the return value in the caller.
Amends 2f0fa59d5903d4c9596ed42dcbaa9da0f77c78da, but not picking
through all the refactorings the code has since seen.
Pick-to: 6.6 6.5
Coverity-Id: 444117
Change-Id: I5f058e4a42942349193eecfd8c00ec9499ef4886
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1cfe42235c4496f68195385507dbaa553d04aee5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The lengths are only needed to check if one of the two strings is empty
and in the direct 8-bit comparisons with memcmp(). So we don't need this
division by 2, which was here since the initial commit.
Amends d4c7da9a07dc1434692fe08a61ba22c794574c4f.
Change-Id: Ie28eadac333c4bcd8c08fffd17c5ecbce564ccd1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit a7b9ec7f6f465ce0d90edfe7154a4837b1fb9c00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added in 1bd755465efa27294362925f55306f88f1800936
We already access oldtlw and oldtlw->d_func() in other places,
and the source of oldtlw is a call to QWidget::window(),
which returns the widget itself if it doesn't have a parent.
This should also fix a CodeChecker issue where it thinks
that the other unchecked accesses to oldtlw are suspicious.
Add assert just in case, so we catch it explicitly if for
some reason this assumption doesn't hold in the future.
Pick-to: 6.5
Change-Id: Iefa9b2df6b25a993afe87e4ee90fe9d2075ebbd0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 0533d1d5444c204c029ab8fbc2df1fb9f9fd6ec2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is the correct license for the data they contain. The types that
are used to package them can be made available under the same.
Pick-to: 6.5
Task-number: QTBUG-121653
Change-Id: I7fb5f332f9e7f4f6db0f1f0c3964a36ce03bccb2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 880d1aef99a6826c8dd690b13e1ca6ea5574f403)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
SetFileInformationByHandle only works when we have opened the file with
DELETE access. Since the code is shared with QTemporaryFile it is not
necessarily always a given. Since it was anyway falling back to the old
way of doing it it was not a problem, but it is cleaner to only use it
when we know it will work.
Change-Id: I3c744734d45272c41e49bb6971adf4f82213d97d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b26ec1f5dde6ee77fbf6b96d3ec54cf93d18197e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was missing for a long time
Pick-to: 6.5
Change-Id: I209838a3c7b45c8c2e8da21efea306fafddea891
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit fad8d7126260b30bd9437f2e19b5460dcf14b46a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
I accidentally copied const from another signature.
It's not changing any members so it's technically fine,
but it leaves a bad feeling and we will change members soon.
Change-Id: Ib0236d7e7dda84834ba35907d75c52cf77fb3843
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 171ac8aa4ef107a7c06163aaeba9a37abffccb09)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some tests are flaky on macOS because the background desktop shows
through the rounded corner of the test window. We cannot reliably
control this on each platform, so instead make the test window a
secondary window with a second, fullscreen and frameless window as the
transient parent. This way, we have full control over the background
pixels that might show through (semi-)transparent parts of the test
window.
Change-Id: I44b7e834797b46fa8b44d776f6b91c99536a6cc9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit a623293a13c9a0c80ae4a5111b92f00ba70d1edf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qinputcontrol refused to accept the character since
text part of key was empty
This caused the tabkey to always switch focus instead
Fixes: QTBUG-124232
Change-Id: I9ea7f02831cc88479b4e15d25eac278547f6f711
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit e794894ece0bcfc78fa4155cb01d825791ea102b)
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
When a slot is connected to the modelReset signal before the model is
set on the view, then such a slot might try to resize the columns or
rows to fit the contents before the view had a chance to perform layout
work.
In that case, the while-loop that calculated the size hint of a rows
(or column) by checking the size hint of each cell might not exit, as
cached information about visual indexes would be invalid.
To prevent this, don't loop over the cells if the actual last row/column
of the model (after the reset) is less than the first (cached) visible
row/column. Also, make sure we increase the counter for number of
rows/columns processed with each iteration.
Add a test (that loops infinitely without the fix, resulting in the
test being killed by the framework), and make the 'actual' variables
constant for clarity.
Fixes: QTBUG-124301
Change-Id: I0adb2f1e8a1e78760ef7c19e9686c9572eca8be6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 960867566a75931c338f67cfe429c0756f41ad89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While <DIGIT>+<Character> is not a valid identifier by itself in the C++
language, it might become one when using it with the token pasting
operator.
This risks confusing some number literals with suffix as Identifiers,
but those are currently not supported anyway, so this shouldn't break
anything that is currently working.
Fixes: QTBUG-87219
Fixes: QTBUG-124288
Change-Id: If73255cc0e6649bc90c52b1d177aac8ff975ae69
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 62d02c1d509780eca7d3a4c35ac64a0d475d0fe7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There are 9 functions in the 4.5 API that were initially specified
to use GLsizei, but later "magically" became GLsizeiptr (i.e.
64-bit or 32-bit depending on the arch).
The current gl.xml, unlike old ones, uses GLsizeiptr, as do the
extension headers and most of the online docs, except some that of the
reference pages are stuck with GLsizei.
Assuming that today's OpenGL implementations expect GLsizeiptr, fix
the the internal signatures, so that calling into the GL implementation
is done using the correct argument sizes.
In addition, add GLsizeiptr signatures in the public API guarded with
>= QT_VERSION(7, 0, 0).
Pick-to: 6.6 6.5
Fixes: QTBUG-67807
Change-Id: Ifc7e97b0479a186000a56709c37ba7f77b6f1ff2
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
(cherry picked from commit 7aaa6a60448f5be05373367abaa37a1fa56ab5c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 220afb358f6056a6fc091b48a38878fb98aba979.
The change caused segfault after menus or dialogs were closed.
The global raster compositing context is still being used by root
window and cannot be deleted from child window.
Fixes: QTBUG-123962
Change-Id: Ie88925052f0f424617382388c587ae47570d13a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit a030795bc956ce4274e3562e963d59e74f2e6fd7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QVariant::toUInt() cannot convert from those two, so we always ended up
with 0, producing lots of duplicated test rows.
Fixes: QTBUG-124349
Change-Id: Ie28eadac333c4bcd8c08fffd17c5a3e39a2cc3f6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 8381a4b44fbd9528035af5e6d7458a2d5b9b7e7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We wanted to test the (min,max) of each of the two types, but one of the
four combinations wasn't correctly done.
Task-number: QTBUG-124349
Change-Id: Ie28eadac333c4bcd8c08fffd17c5a3ccb4205139
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit d204ea98730baeeb55d2da229f2ce743df8c583e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because it causes issues in the CI
As a drive-by, also backport the NOT VXWORKS check.
Change-Id: I8cd232abf1c4ee1d9417a8bff9aa3bcf5f893e8f
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4f6600ee6554f04ac5dac0e547488432c13630a6)
JNI_OnLoad gets called automatically by the JVM when it loads a shared
library. A native library that is loaded by native code shouldn't have
it's JNI_OnLoad entry point function called, as that would indicate
that the plugin is loaded by the JVM, which it is not.
If framework or application code requires that function to be called
(and wants to perform error handling, such as closing the library again
if the function returns JNI_ERR), then that can and should be done
explicitly.
[ChangeLog][Android][QLibrary] Loading a shared library with QLibrary
no longer implicily calls a JNI_OnLoad implementation.
Fixes: QTBUG-92007
Change-Id: I9aa71ec73b950029e0ae1be7d54e1c8576f356ab
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 359df32300f5472f2fddbc83c3fe0851b5547ff6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 654f3c5634ac9efc2257177351c8dea7c8d8875a.
That commit enabled a work-around for CMake upstream issue #19005 for
Visual Studio project generators. It turns out that this is not actually
needed, and that the work-around causes unnecessary rebuilds.
Fixes: QTBUG-121046
Pick-to: 6.6 6.5
Change-Id: Ie502e2df999a204ab09d28322017be3c7ed8ebc5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit aeaaff1d5c3e3246d9cbf02499f1b952e9af8450)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is speculative fix for the crashes in QTextLine::layout_helper()
we're observing on users side.
The possible reason is in that fontEngine and previousGlyphFontEngine,
which are stored in LBH, became invalid during the layout cycle
(destroyed by trimming font cache?).
To prevent this we need to handle font engine's ref-counter
gracefully, so just wrap them into QExplicitlySharedDataPointer.
As a drive-by change, use in-class initialization for LBH members.
Task-number: QTBUG-117500
Pick-to: 6.5 6.2 5.15
Change-Id: I6987a2b5618bb4ba8762f2ef01b4ce0dd60cb232
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit d914c58c7ee07f0d7598cee3491b815bd8d8bc23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Not all tests have targets that we can attach the BLACKLIST files to.
Change-Id: Ie0a2d72859877a8803802a4f7dc996944f002656
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit edc2d414562ece8b139b1cd1fcf77df245d0573f)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Tests can be blacklisted via BLACKLIST files. This patch adds these
files to the generated IDE projects automatically when available.
Change-Id: Icef2c397ada823e7b1c380dbb224694f059891ff
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 191dbbdea7151ca7177174f2de74b8279a7b12d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This creates aliased glyphs using the DirectWrite engine when
requested.
Note: There was previously a fallback to GDI to support aliased
text, which ignored the hinting settings. This patch also removes
that fallback.
[ChangeLog][Windows] Support QFont::NoAntialias with the DirectWrite
font engine.
Pick-to: 6.6 6.5
Fixes: QTBUG-97645
Change-Id: I587f56ace468cfdd57debe7bc8492a96587a4e05
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 421e7621faa50bf9007076d6be4e0da9514edc59)
The struct members were not described. Add something for each in the
docs.
Change-Id: I75d0a5a6efee4d7b4a415b5282a9e44950ed3894
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit e12791b05759819708d2b466362dc4a1df75b686)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On vulkan implementation it was possible that when going background
destroySurface was queued and then run when coming back foreground
that caused vulkan not being able to draw.
Fixes: QTBUG-118985
Fixes: QTBUG-118840
Change-Id: I5957b74b89384ea84fc09d9b55afcccf5c82e390
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b2c648c57261550474308aee09bfc1054818fb60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Ctrl+(Shift/Option/Cmd)+Tab presses are not handled as a regular key
events, and are not seen by our NSView.keyDown implementation. But
they are delivered to a performKeyEquivalent implementation, so if we
see a Tab key being pressed with the Ctrl modifier down, then send
a shortcut event and stop processing if that event got accepted by Qt.
Fixes: QTBUG-113492
Task-number: QTBUG-8596
Change-Id: Id3aa7021a689b94d97eb881b19ddf7cb039e1bd2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 285294b684ac973efcf2c8ff92b427db3fb75948)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Separate config.tests, coin, cmake, licenses and changelogs into
independent targets to keep the IDE projects more organized.
Change-Id: Ie33d45799621c2d7ec6f022ffcfac132ac4c7b94
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit bd2dc0c3ed750eca9a3b87f1f99069a2d4e954f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Lots of files in the repos are not included into the generated IDE
projects. Therefore we add utility targets (custom targets), which are
populated by glob patterns, which should fit most files that are found
in qt's subprojects.
Change-Id: I1b731e65f8db319d3cec817eea5c23a1eeaefb22
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 003a19115279e44bf8af96e0f588f5cc34725353)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A click on the corner widget should select all items, not reset the
selection. This was accidentally added with
3e144bdc7484968dcccbda8f35ad802c7fd7a42e.
Fixes: QTBUG-124267
Change-Id: Ie20b7cf0ff730214dca80116ad888f42c2b7a670
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 56ec0f94b3f9db19d5fe78d78dc7597a92a5c52f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Wait 2x double click interval, to make sure a double click is safely
avoided.
Use QTRY_COMPARE at the end of the function, to cover cases where a
synchronously delivered mouse click causes posted events.
Wrap the test implementation in #ifndef QT_NO_STYLE_FUSION, as is the
declaration.
Skip the test on QNX.
Fixes: QTBUG-123798
Pick-to: 6.6 6.5
Change-Id: I73f4acb241a8c77a542152288c65f3d07582e075
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit f7a809ab73182ef25578eb8fd200c223fa3eb0f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We must compare the raw string length in UTF-8, not the UTF-16 one.
[ChangeLog][QtCore][QCborValue] Fixed a bug that caused certain
non-US-ASCII string comparisons to produce results not in line with the
CBOR specifications.
Pick-to: 6.6 6.5
Change-Id: I5f663c2f9f4149af84fefffd17c05d1c0f1bbc3a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 394788c68efacdec2676988b4b4ff207b20557f2)
Currently the icon used by document-properties is a gear icon, on
Windows, the actual icon used by explorer's context menu for the
properties menu option is the wrench icon. This patch change the icon to
the wrench icon.
Fixes: QTBUG-124085
Change-Id: Ife49ad64d23b73b7676bc39330887e2cb320dcf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5a775fc5f73ec3a39d17c261e4ea7e715eff44d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously when PPK_Orientation property was set, updateMetrics() was
called before doReinit() and updateMetrics() used physical dimensions
of the DC initialized with previous orientation, which resulted in
miscalculation of m_paintRectPixels, origin_x and origin_y variables.
This bug manifested itself as all sorts of weird behavior, such as
unexpected margins when changing paper size and printing beyond paper
margins.
Pick-to: 6.5
Change-Id: I2d0e104bee11165e3541e7f3119b29edd4b882c8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 223b92490edfd4e3e75e634831258c54d5b0a501)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With our previous setup we would CloseHandle the file handle and then
MoveFileEx the file to the final destination. This opens up the
opportunity for other processes to open the file in the meantime and
cause the MoveFileEx to fail.
With SetFileInformationByHandle we can, without closing the handle,
rename the file to the final destination.
Fixes: QTBUG-122208
Change-Id: Id3c8e0b5703da280c84e466ed88287e99788d077
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9d8e233284aa9cd0757e1181451f4220473c71fe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To avoid usage errors like fixed with
7e5a0b54f0737986b6716bfce0a43eba2e62aae0
Change-Id: I33af9721a04e80541c027fa6da8630070a5957ac
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c7c8b8f25d3d90c8197501d81f3947228cdbf441)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... instead three times in a row.
Change-Id: If08b4c092cfb5b7d224f9a94afb7d395ce2b2eca
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit efd6786e52639ef1ceab819265b0c33d7ef8294e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qOverload was used only for ambiguous signals and slots with no
arguments. Connections to ambiguous slots made in widget designer's
signal/slot editor, lead to an unresolved ambiguity when compiling
the generated code in ui_xxx.h. One example is QLabel::setNum(), which
can either take a double or an int.
Always using qOverload is not an alternative, because signatures are
normalised. E.g. const QString & / QString can't be distinguished.
Add a map with all ambiguous signals and slots to customwidgetsinfo.cpp.
Hardcode the map, because uic lives in QtCore and can't access meta
objects of gui/widget classes.
Use this map in isAmbiguousSignal() and add isAmbiguousSlot().
Change OverloadUse enum into an enum class in language.cpp. Change
enum values to reflect the new condition for slots to use qOverload.
Rename existing enum values and remove default argument in
language::formatMemberFnPtr() to improve code readability.
Apply const T& syntax for all types starting with Q, except QSize and
QPoint.
Revert 94c16517b3f8f01309a89598e698931ef77d60db, which was a hack
forcing for QLCDNumber::display() to a string based connection.
Add a new baseline to tst_uic, to test the above.
Fixes: QTBUG-93413
Task-number: QTBUG-124241
Pick-to: 6.6 6.5 6.2
Change-Id: I49ccc1688cfc08970cce3e56adf18e5ac49a77e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 2ec2c54e05656e04070ef1dc4b1e136a466c686c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is mentioned in the porting docs, and in the class description
of the _iterators_, but none of those are really natural places to
look for the behavior of the container.
So, let's add a general note/warning to the functions in question.
Fixes: QTBUG-124195
Change-Id: Ic95e56f166df2c8067232dfb6b9cb5b05d6a4361
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4c286d6f6c746d41ad7a95ef1f28d1cccf244649)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Axivion (SV61) points out based on Qt-RuleOfThree the lack of copy and
move constructors and operators.
We don't need them, so tell the compiler not to create them.
As a drive-by change mark the constructor as explicit and not
discardable.
Task-number: QTBUG-122619
Pick-to: 6.5
Change-Id: I466f5cedea427608b434b71fda0d1e50619b9b20
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7d44817fc06e2eb4f5ff1fbce8e1905652825c05)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The original change was introduced to fix performance regression due to
the increased value of QT_RASTER_COORD_LIMIT. The optimization was done
by clipping anything outside the device rect plus a small margin.
However, setting the margin to a small value caused a regression, where the
rasterization became slightly different from the previous implementation.
Fixes: QTBUG-123054
Pick-to: 6.5 6.2
Change-Id: Ic4fddea89cd5f6e5760dc4a91b1f2f59527e8e5c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit aabb133d07ff99157ae2070e16594eba035cca08)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fails on Android 8, and we want to get Android 8 bump into the CI.
Task-number: QTBUG-124291
Change-Id: I179880c38d155df82bcb772f546104d956326647
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 44072f43eda689fe1f60c57ff833d5b1dcb3b594)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On android documentation orientation changes are sent via
onConfigurationChanged callback. Previous implementation
based orientation detection to onSizeChanged callback.
That callback is not called when orientation turns 180 degrees.
i.e. between landscape and inverted landscape.
This fix adds detection to on onConfigurationChanged to catch
those cases.
Fixes: QTBUG-118887
Fixes: QTBUG-118236
Pick-to: 6.5
Change-Id: Ie2f81798de97e460de839f7ebfde9a9efa25909f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6209079c7a34c4656e6e110ae5194feb19f6134a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Axivion (SV403 and SV404) points out, based on rule of three,
the lack of destructors for ConstIterator and Iterator.
So add them.
Task-number: QTBUG-122619
Pick-to: 6.5
Change-Id: I4d4abf9be8be529492bf13069052ae4a8d8a90de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b9cb2f30f1568e6cbf8e13d61501babcb90d46b2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was overlooked in testing, but it would emit a signal for new
incoming stream even if the server was just replying with HEADERS on a
stream the client had initiated. Or vice-versa.
Change-Id: Ie7b3a45729a78106da1d8c058e15705cc7dcc53b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 1d03e1851bcaf80700f19c8c583e6b9abc2059a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If QToolButton::mouseReleaseEvent triggers its deletion then it
will crash when dereferencing its d pointer.
qabstractbutton.cpp already uses QPointer guards in many places but
qtoolbutton.cpp was missing this one.
While deleteLater() is still our recommendation, we shouldn't crash.
It's not always obvious what led to the button's destruction,
as the chain of indirections can be long.
Change-Id: I4a33447fa4e90953370277eb57a161398ded9a9c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 97d227acc74c6034615dc05d9d94ee5cad7c5f50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
.. by playing it safe and taking the QVariant by copy
Pick-to: 6.5
Change-Id: I24e0507a912388b7fb17e838a22e8d4c449bcf5b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d4f2a5aa401c14dd8dc122bbf25fce9cd7f41cba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In commit 9da8d67b3bca1d40ae221a9c6be218fe57759724 a recreation of the
ComboBox Container was introduced, since QWindows11Style depends on
WA_TranslucentBackground flag, whereas the other styles don't set this
flag. This leads to the destruction of user supplied views we don't own.
Fixes: QTBUG-124191
Change-Id: I4a693f612ddc299696b9de0d87c94d88c04d9b39
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 61b71ffb3b2b34aea67306c973ee751335733433)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use a solid fill with the "button" color of the palette also for active
title bars, which is then the same color as the frame, and gives the
window a consistent look in both dark and light mode.
Fixes: QTBUG-123162
Change-Id: Iac26fdb1518ffe4f8255e01bedf7329be40ac258
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 19b38ede7804e23a1abe7ddabb447c7f5a907a7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fill with the "window" color of the palette as passed in through
the style option, which takes care of active vs inactive color
selection.
The title bar of a docked dockwidget is a bit lighter than the
main window title and unified toolbar background, but identical
to the color of the title of an undocked dock widget. This is now
the case for both dark mode and light modes.
Also remove the gradient fill from the status bar, just fill it
with the window brush.
Remove the now unused helper functions for the title bar
gradient.
Fixes: QTBUG-92855
Change-Id: Ia04c630201b288c0107567d3f459f66129693c82
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 0d91cc866f2799d56911bcdadabebb137eafcea8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QCommonStyle sets the font for a selected header section to bold.
This overrides the font weight a calling style might already have set,
e.g. when a style sheet is applied to explicitly set a weight for a
checked header section:
QHeaderView::section:checked {
font-size: 20px
font-weight: normal
}
Since setting the weight on a font sets the respective resolve-mask
bit, we can avoid overwriting a weight that is already set explicitly.
Add baseline test coverage using a QTableWidget.
Fixes: QTBUG-122180
Pick-to: 6.5
Change-Id: I8c6279ad2fd8c5718ebea26e27c64ae823625748
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 74e0ed217fdec8e32227f9f845eccac7f1552297)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the dummy check if the variable is defined to suppress the warning.
Change-Id: If3bb0ef6a2587693c0ec898ceb3080ebfc1e82a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 6760bae2fa7a758ac8eb70c0009c80a715ea1c54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Qt CMake routines for generating pkg-config files don't
handle all sorts of generator expressions, see
qt_internal_set_pkg_config_cpp_flags in QtPkgConfigHelpers.cmake
which hardcodes handling of some specific expressions. In this
case, they don't handle the semicolon within the generator
expression expansion.
For the UNICODE and _UNICODE defines, this means that the pkg-config
file ends up containing "-D_UNICODE>" with the trailing ">". (The
pkg-config generator tries to parse out the generator expressions,
but the semicolon gets handled as a higher level separator, leaving
the closing bracket ">" behind.)
This issue only shows up for mingw targets, because pkg-config files
aren't generated in MSVC style builds.
Escape the semicolon as $<SEMICOLON> to make it not break the
surrounding generator expression, as parsed by the pkg-config file
generator.
The generator expressions aren't fully correctly evaluated for the
pkg-config files though; the UNICODE and _UNICODE defines don't
end up in the resulting pkg-config file even though they're used
during compilation (both before and after this change).
Fixes: QTBUG-103019
Co-authored-by: Martin Reboredo <yakoyoku@gmail.com>
Pick-to: 6.5 6.2
Change-Id: Icdb380e3b42be2a47372a8ee2b61378a33c685f7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Li Xinwei <1326710505@qq.com>
(cherry picked from commit f35b9530b9acf954f8741d0ee2b4b68fc90a4afc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
PACKAGE_PREFIX_PATH is not defined in cmake versions 3.29.x.
We should avoid referring the internal CMake variables.
Use the calculated reverse relative path to the prefix path
instead.
Fixes: QTBUG-124186
Pick-to: 6.6 6.5
Change-Id: Iefae132e61a3f8e8f5525c0abd6a2d41631c2fb0
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 2d19f09b577f72290328d90ba85145362676ea92)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the Addressbook example, any entry whose name doesn't start
with a letter will not appear in any of the categories,
but it will still exist. These entries would make the
"There are currently no contacts in your address book" page
disappear even when no entries could be found in the categories.
Check if a new entry has a name that doesn't start with a letter,
and if so, don't add it as a contact. Also, notify user that names
must start with a letter when this happens.
Fixes: QTBUG-124254
Pick-to: 6.6 6.5 6.2
Change-Id: I7f25711785ec7a82852a0f37d9f096cc3af41576
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c3fa43513e32c5bd8c0ee9d703119a545a5b8bc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If IM is enabled we send key events through the macOS text input system,
and we do this for all key pressed, including the ones with modifiers
pressed. The latter allows the input method to respond to shortcut
key combinations to switch its own mode or do more advanced operations
on the text.
We were relying on the IM to call doCommandBySelector with a noop
selector if the shortcut didn't match any of its own internal key
sequences, but this fails for key events with more than one modifier
pressed.
Instead of using [NSView interpretKeyEvents:] to pass the key event
to the system IM we now go directly to the NSInputContext, which the
former method is just a wrapper for. This allows us to use the result
of [NSInputContext handleEvent:] to determine if the system IM consumed
the event or not. For key events with multiple modifiers this will be
false, which we interpret to send the event as a regular QKeyEvent
instead.
Fixes: QTBUG-123848
Fixes: QTBUG-106516
Pick-to: 6.5 6.2
Change-Id: I14a43c2029149514515dd9ece881aed3f6500a4e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 085d5db90dd4c148fe5dea6a3435166f6bdeedac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This header uses std::forward_iterator_tag, which requires including
the <iterator> header.
This fixes building with libc++ with
_LIBCPP_REMOVE_TRANSITIVE_INCLUDES enabled.
Pick-to: 6.5 6.2
Change-Id: Id2ce97e158c87dab1efe30e54a93f0bc9351de5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit aa896ca9f51252b6d01766e19a03e41bd49857f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Split out some helpers to write the theme code with path fallback
checking for the enum case (identified by a fully qualified icon) or
the old XDG/filename case.
Task-number: QTBUG-121823
Change-Id: If2755483ab899f04e372cf95443f7e03970f6e7f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit b79cb3dd659c71560dd0324893cbdfe41a42f9dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QLayout::widgetEvent() returned early, when the layout was disabled.
That suppressed ChildRemoved events and lead to a crash, when the
layout was enabled again.
Don't return early on ChildRemoved events.
Add an autotest in tst_layout::removeWidget().
Fixes: QTBUG-124151
Pick-to: 6.5 6.2
Change-Id: Ib0a0bb73978d9fc2c9777d300cf38a8c4496b702
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Chris René Lerner <chris.lerner@qt.io>
(cherry picked from commit ef8e548cf1adf8032c030df04e69988f238c77fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends feff219aadd649c41e6ed349da3a740a0a21435f which didn't really
do the revert for some reason.
This reverts commit bba26d72207304e02098d1436232357dd452de2a.
Reason for revert: Latest emulator update fixed the issue.
Change-Id: I0bc4263eae36c3ff81f235dcfe3bad9b30afd5d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 5994def6aba46772b28650945ba7b5ea4b036cee)
forkfd_qt.cpp was originally created so we could use the Qt atomic
classes back when we couldn't rely on C11. We now can, so that primary
reason is gone. We only need it now to set NDEBUG, which the Qt build
doesn't set by default, and _GNU_SOURCE to match forkfd.c itself (GCC
and Clang define it by default in C++ mode because libstdc++ apparently
needs that).
Amends 993db5a12227b1e4067714ddc626d64a14474a54 and thus avoids a new
Clang 18 warning about using VLAs in C++ code:
forkfd_linux.c:160:50: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
Pick-to: 6.6
Change-Id: I5f663c2f9f4149af84fefffd17bed82d39be4d78
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 05408055d52f3fe014fef3c550820011fa8b89f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently the drawing of CE_ItemViewItem is propagated to QWindowsStyle,
which leads to ignoring alternating rows in ItemViews. Propagating the
drawing to baseStyle honors the set base style.
Fixes: QTBUG-123632
Pick-to: 6.6 6.5
Change-Id: I656ee1c44029abf7233551303d469d38b6c848e3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f39f2bfe0b216252980c082b1771540dd00e6bd6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
returning early if the object is null will not clear pending exceptions
from the previous failed JNI call, and that will crash the app on the
next jni call if an explicit exception clearing is not done, wish mostly
the case. Checking and clearing for exceptions has to always be done
under this call.
Fixes: QTBUG-122135
Change-Id: I0d42d012a4d1305fa07147fd22860d7c005f9b83
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 0a4599637657375517fcaf35177d8c7bac302556)
Amends 0786c17bbc556a0f494fc825af47c604a9dc0241, which added a number
of attempts to gracefully shut down the QFileInfoGatherer thread while
shutting down a QFileSystemModel. This introduced a 1-second wait upon
destruction of the model when the QFileInfoGatherer thread is waiting
for an unset wait condition.
Instead of QThread::requestInteruption() to make the thread exit, use
QFileInfoGatherer::requestAbort(), which calls requestInteruption() but
also sets the wait condition afterwards to make sure that the thread
wakes up and checks the abort condition.
Pick-to: 6.6
Fixes: QTBUG-124164
Change-Id: I560f2131f226e0bb59f72e558cbab55b89cfb144
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit a79ca35abef38f882a1ab574063eb9ed6ffe6846)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The LikelyPair and QLocaleId types are small enough to pass by value.
Pick-to: 6.5
Task-number: QTBUG-122619
Change-Id: I1502efcf69ac82d9c49b673975502882c59a4fd0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 738914e787c5a2de57f40753b665e2a49f9536d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
One constructor neglected to do so. Use NSDMI to make sure all
constructors do, if they don't override this with something else. Also
remove fatuous setting, by constructors, of member attributes to its
default.
Task-number: QTBUG-122619
Change-Id: I9b726898b85e21d841b9af5b4dc72ee322829d50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 35205ef1654f2ee0aca80010acdbb469cf1cf8e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QVariant is rather big for passing by value; and no caller has any
further use for the QVariant it's passing in.
Pick-to: 6.5
Task-number: QTBUG-122619
Change-Id: I2751745e715aacfa8982ac97b4ae777fde5e88de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b68f1009187fee473f4c6477ec64300650e29904)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Axivion (SV546) points out (based on a clazy "rule of three" that
might be rule of five by now) the lack of move and copy assignment and
construction. We don't want those anyway, so tell the compiler not to
create them.
Pick-to: 6.5
Task-number: QTBUG-122619
Change-Id: Ie951a2c3d60d76ad3448310d3f9bbda22190015b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 21ef6d930ad3eb2fb435cd601692cb5cc1726bd8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Probably makes no difference, since it's all in lambdas being passed
to a standard algorithm, but the static analyser noticed this would be
cleaner.
Pick-to: 6.5
Task-number: QTBUG-122619
Change-Id: I23093254e4857131b7be87aeff1e7ba79ea2b674
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e1da249be602322c3e4b84ba23748c1c1c8db888)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
I don't think we should document *exactly* how we autodetect
primitive/relocatable types: we've been changing the detection across
Qt versions because sometimes we realized that it was wrong.
Moreover, no one else but us should be using the traits in question (in
other words: QTypeInfo itself isn't public API).
Pick-to: 6.5 6.2
Change-Id: Ie6e763f152e7dc0f6ce58869dbbd529240d2a546
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ae361f00b3f4827e62a19cc451227c9892b51f2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit f2f2b6ef18907a76461b54e110618e7840971fa7.
Reason for revert: There are couple of issues introduced. Lets revert to base revision and go with fixes from there.
Pick-to: 6.6 6.5
Change-Id: I8341de42ef3e4a609bfbffdb763dd5c28794473c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
(cherry picked from commit 157c9eef48916c3e11f43ffb0fe8e8030bed8d06)
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
This partially reverts commit eb0d7b5dcf834c856d58637ada8745aee2b040ee.
Leaving tst_QRhi::tessellation() skipped because it still fails.
Reason for revert: The latest emulator fixed the issue.
Fixes: QTBUG-111235
Fixes: QTBUG-111236
Task-number: QTQAINFRA-5971
Pick-to: 6.5
Change-Id: I9a624be6ba219a4175c0e84ba68d882953422cba
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
(cherry picked from commit 772fd609c6eff09bdaa44cb2ac5f913e58788fa3)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The flags are not valid for e.g. Swift
Change-Id: Ie5b46dc9147d8c024e7e27712c7b8632abd727d9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ce23c9083f4d06054eb59781c3309b1fcc807a1f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Following up on 2 commits that fixed static linking for MSVC but left
out MINGW:
230c53ad9d7046e61b37ce63a6bc68449393bb7b
d9820b02072b27f830b389e503467c8220679cba
Pick-to: 6.6
Fixes: QTBUG-114243
Change-Id: I12853355ffa1a62acce15ff660478f618c42e0a6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 938bdccb897db85396e96215281d66f64cb2a9ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Seems to have been left out by 874f5c1f463cad61f49e0ff7007852a73fd93e7c
Fixes: QTBUG-123478
Change-Id: Ic028c3786203cbc1c3d7316c1ae22c12a928b170
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 7e5a0b54f0737986b6716bfce0a43eba2e62aae0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This header uses std::is_trivial_v, which requires including
the <type_traits> header.
When building with PCH enabled (which is the default), this
dependency does get satisfied via the PCH, so no issue is
visible.
This fixes building with recent version of libc++ when configured
with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES (which removes unnecessary
transitive dependencies between the libc++ headers, a configuration
which may become the default in the future), with PCH disabled.
Pick-to: 6.5 6.2
Change-Id: I5e3ae20e366ed3028b1156cee05bcf2908d6e845
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit adb49d65e0774fa6be0b0d9d490c6f1fc5066a1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since any window resize events originating from Qt side are ran in the
Qt thread, having the one originating from Android run in the Android
thread can lead to race conditions especially during orientation changes.
Change-Id: Iebebec2fffdaf9181b01fc1e8f539c7bc232996d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 02bab22fde5de84c62e3eb86fde03248851d11dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously, we have set the size of the QWindow to match the QtView.
Also set its x and y coordinate to match, just to keep the window and
the view in sync.
Change-Id: I0ea89a11e4526a0a996e7b62ac126808358b6bc7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d45ce587784427c4ff72d306811eb63baa53cb3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The parent window created from the QtView had an
empty size. Also set its size when creating the window,
and when resizing the QtView. Replace parent window show()
call with showNormal() to avoid switching it to a fullscreen
window.
As a drive-by, use setGeometry() instead of setting the width
and height separately to trigger only one geometry update
for the platform window.
Change-Id: I91e350c1748a9e76879faa8bfcab7575f6155f02
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e9edd3db524e0c9c77925ae5bea98017a6220ecf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtView should only have one child, the QtWindow, and that should always
match the QtView's size, so the handling for absolute layout is
unnecessary.
Task-number: QTBUG-121516
Task-number: QTBUG-123306
Change-Id: I77024ab9619e68ab98357518ad07535a2ff9614c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit c4a98a729898b7bf2244675f8ba91933f9ae8b93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtLayout did not properly handle resizing child views to the parent's
size when their layout params width or height were MATCH_PARENT. This
was mostly visible when embedding QML to a normal Android app, as
there the Android view hierarchy is responsible for setting the size,
instead of Qt setting it every time the QWindow size changes.
Task-number: QTBUG-123306
Change-Id: I08cbfa8e352d0cb2ca5b6e5aa40e891a62b82eb4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b3685743f31daef71021d9948deaf20ce34ce57a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We must not try to escape a driver string, the user has to make sure
that everything is correctly escaped when passing a complete driver
string. This fixes a regression from QTBUG-122642.
Fixes: QTBUG-123444
Change-Id: I43316c7a09060f5c8117fdc3c464d239e37d9cdf
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
(cherry picked from commit 9873f4b283dcabefc20b1720bef1958c2b1ccc02)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a QWidget with an associated RHI swapchain (via its QWindow) is
moved to a different top level window, that top level window has its
own backing store, and QBackingStoreRhiSupport, which doesn't know
anything about the fact that the window already has an associated
swap chain in the original top level window's QBackingStoreRhiSupport.
As having multiple swap chains for the same window is not supported
on all RHI backends (Vulkan and DX in particular), we need to throw
away the swap chain when detecting that the window is moved to a new
top level.
We do this by hooking into the existing WindowAboutToChangeInternal
event delivery to renderToTexture children, which now delivers the
event both to renderToTexture QWidget children as well as QWindows
in the hierarchy. The condition of when to deliver the event has
been updated to reflect whether the top level uses RHI for flushing,
instead of only including renderToTexture children, as the former
also includes setting QT_WIDGETS_RHI=1 explicitly.
The event is then caught by QBackingStoreRhiSupportWindowWatcher,
and handled the same way as for SurfaceAboutToBeDestroyed.
Renaming qSendWindowChangeToTextureChildrenRecursively would make
sense at this point, but to make cherry-picks easier we keep the
current name for now.
Fixes: QTBUG-120276
Pick-to: 6.5
Change-Id: Ic4c60e89be985f12a84e9f893c299e602b70851a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 1bd755465efa27294362925f55306f88f1800936)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The example breaks building 6.7 with examples on Android, due to
QObject::connect() to a lambda without context object.
Add context object.
Fixes: QTBUG-123989
Pick-to: 6.6 6.5 6.2
Change-Id: Id3994e577a8a676220ac8d9f95d01c054839c143
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f54953a0abfe7db796a294c9239b943ebec91a2f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Draw the glyph directly in the paint() override, and use that
from the scaledPixmap implementation. This avoids a pixmap
creation just for drawing an icon with an existing painter.
Change-Id: Iece0083a3a9f3625d843bc6e9d836baf9b5d84f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 1752405f44eb6d5cbd8f8147b78263461092e676)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of implementing scaledPixmap() to rasterize the
vector image we get from App/UIKit, and calling that from
paint, implement paint() to draw the vector image directly
through the painter, and use that in scaledPixmap.
Change-Id: I2c62826f29406543bc8d8c7fa71199e91586d83b
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 9d8c5bc7186b0553c47ddabc9ad6c9d509b35f81)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As part of eacd58d4e78e7238ba5fcca90ba960aaf3ebd263, a mechanism was
added to prevent posting redundant UpdateRequest events to the top
level widget, managed by QWidgetRepaintManager. The mechanism relied
on a boolean that was set when posting an update request event, and
reset when processing the event for the top level widget, as part
of QWidgetRepaintManager::sync().
However, for paint-on-screen widgets, we don't post an update request
to the top level, we post it to the paint-on-screen widget directly.
And when processing that event, we don't paint the widget though the
normal QWidgetRepaintManager machinery, but instead call the paint
event via QWidgetPrivate::paintOnScreen().
As a result, an update() on a paint-on-screen widget would result
in never receiving updates for non-paint-on-screen widgets, as
we assumed there was no reason to send further update requests.
We could fix this by clearing the updateRequestSent flag as part
of the paintOnScreen() code path, but that's incorrect as the flag
represents whether the top level QWidgetRepaintManager needs an
update request event or not, and would lead to missed updates
to normal widgets until the paint-on-screen widget finishes its
update.
Instead, we only set updateRequestSent if we're posting update
requests for non-paint-on-screen widgets, which in practice
means the top level widget.
The paint on screen logic in QWidgetRepaintManager::markDirty
still takes care of rate-limiting the update requests to the
paint-on-screen widget, by comparing the dirty area of the
widget.
There is definite room for improvement here, especially in the
direction of handling update requests via QWindow::requestUpdate
instead of manually posted events, but for now this will have to
do.
Fixes: QTBUG-80167
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ib5685de7ca2fd7cd7883a25bb7bc0255ea242d30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 697e1b0397259959e3f555296f87a0d9d923e4b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can't make the choice of whether to enable no_warn_duplicate_libraries
or not based on the Xcode version Qt was built with, as the target flags
will propagate to our cmake integration tests, which we run on platforms
where we don't have Xcode 15.
Change-Id: I241a950a3d2e70652a3a6386e5dd86c681d1c13f
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Orkun Tokdemir <orkun.tokdemir@qt.io>
(cherry picked from commit 2e97906593bca028e5a173264c05edb18427381f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On systems without the RTLD_NODELETE flag, simply don't call dlclose()
and leak the handle. Amends ef5ab6e00664caf0af23b21593f809d718c9dfc7.
Change-Id: I01ec3c774d9943adb903fffd17b76673562daa8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 60417a265a152aaa21081d8b4f2ad28c9730ca0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was introduced in December 2018, which is apparently too recent for
some Linux distributions. So remove the dependency that was there only
to give us MS_RDONLY and revert to the old statfs.h / sys/vfs.h flag.
We still don't include <sys/vfs.h> because it is absent on some old
Android versions.
Amends ea6abe583f8534495c3c43e2b6aab95742b102a3.
Fixes: QTBUG-123932
Change-Id: If1bf59ecbe014b569ba1fffd17c29cc448d16358
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 73003f3b41edb7f363a2492ad349899c54a2b890)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't use that in the XCB library or plugin anywhere.
Change-Id: I5f663c2f9f4149af84fefffd17be8c7f3bd7bd14
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 43cefd882e15f1b3b99d25a17db2057411ff465c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can't fix the underlying reported problem, but we can warn that the
user has made a mistake.
[ChangeLog][QtCore][QObject] The class template parameter passed to
QObject::findChild() or findChildren() is now required to have the
Q_OBJECT macro. Forgetting to add it could result in finding children of
the nearest ancestor class that has the macro.
Fixes: QTBUG-105023
Change-Id: I5f663c2f9f4149af84fefffd17c008f027241b56
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ce2585d0e950ff0d81adbcf5463ddfbcb1367900)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Calling data() for parameters of the type bigint
failed in combination with stored procedures with
output parameters. Cast the result to qlonglong to
fix it.
Pick-to: 6.6
Change-Id: I84ef04ed26821b92ef7c5bcdf12b778e91450e0b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit ad84754b5888971074a44ec698d20a32aebeec14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We're not guaranteed to get into any of the code paths that call
removePopupMonitor() before the app goes away. In a plugin-scenario,
this may cause crashes when our monitor then gets a callback and
we try to access QGuiApplicationPrivate::instance().
Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-123959
Change-Id: I287b91ff261a8aab74adbbad8c63a042daf944d5
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 8bb93bf8ee59b3e31e7353d6683dbb0aa890f7e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Like the other times it's used in this file
This is causing compilation errors in projects that use -Werror=undef
Fixes: QTBUG-123937
Change-Id: I0cdd2910755dc9079890011dd8dbc27a6e64793e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 699ddcb15b5e981d32ea65d1c1a12f8fa0b06e0d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QMessageBox contains an icon that can be set using icon type. Before
this commit, android.R.attr.alertDialogIcon was used regardless of the
expected icon type. Only if setting failed, the icon from
android.R.drawable was set (depending on the expected icon type).
Previously, usage of android.R.attr.alertDialogIcon was the way to
consider Theme in choosing icon view. Since
31a0d99fa565d39bf39f0c3ae5ed00859679a969 commit, getDrawable(id, theme)
is used with second parameter: Resources.Theme.
Because of that we can start to use only icons from android.R.drawable
and remove usage of android.R.attr.alertDialogIcon
Fixes: QTBUG-123334
Pick-to: 6.6 6.5
Change-Id: I6cfdaf30aea5d132e38ba5d78054089b51cf5f13
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 229cadb7a36694b7ab639047dceb73cf2dfce858)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Apparently it has trouble with multiple attributes between the
class keyword and the class name, looking only for the EXPORT
macros.
As a quick band-aid we can add the #pragma to tell syncqt
to generate the header explicitly.
Fixes: QTBUG-123875
Change-Id: If155a5b667b9e71d43dfac04ad19caee0ff23793
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit f2159d71313cca1d27a9c30da8e7709ea23320e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QVkPipelineCacheDataHeader::reserved field wasn't initializaed by
the code, but then memcpy()ed with the struct into the result
QByteArray. At best, this contains random data, at worst, it leaks
information.
Initialize it to zero.
Found by Coverity.
Amends df0e98d4080f50de7ecacdc4cae079ab31280481.
Pick-to: 6.6 6.5 6.2
Coverity-Id: 444147
Change-Id: I398c9a1e99483f2f9887d768319b20ecc11e2c86
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 2913e7de5186fc4fd3576167304c214d30f78d2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the note about the way the str size is determined when using
QByteArray::operator=(const char*).
Pick-to: 6.6 6.5
Change-Id: I39b2d0fc2967832622fbf0c11b3ff6c7ff99b8f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 32e2386b157effa5f253ffd669ed52471863823b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
8cd7a3d4723ca414f3fe544704a0ccb752da94b8 remembered the current screen
in QMenuPrivate::popupScreen. This QPointer member is not reset, after
QMenu:exec(), which makes a re-used menu remember the wrong screen, if
its next usage happens on another screen.
Reset the member variable at the end of QMenuPrivate::exec().
This amends 8cd7a3d4723ca414f3fe544704a0ccb752da94b8.
Fixes: QTBUG-118434
Pick-to: 6.6 6.5
Change-Id: I7457ca72166346f01cf71b2706ebc20ecd71173c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 7aedcdefb81004f57e664409c0fb9f9b371ff4f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A literal backslash needs to be doubled so that the parser doesn't treat
it as escaping the following character when the markdown is read back.
In ca4774131b9b8ee40b4d7f5c1ba296af4700207f we tried to limit it to
backslashes that were not already escaped. In case someone really needs
a longer series of backslashes, it's more correct to escape them all;
but this comes with the risk that if they do not get un-escaped by the
markdown parser in some scenario, repeated round-trip saving and loading
could multiply them excessively. So we also add a lot of tests to try
to verify that this is safe.
Task-number: QTBUG-96051
Fixes: QTBUG-122083
Change-Id: I64f610d24e99f67ebdc30d5ab5c6cf3985aec5ec
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 0281005a711c3635114ba92f778d0e9c8a89027d)
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The name says it's a warning, it's pretty unexpected that it should
lead to a critical message.
One case where this is a problem is QTBUG-48488
where merely printing with "Microsoft Print To PDF" and canceling
the file dialog leads to "QWin32PrintEngine::begin: StartDoc failed"
as a *critical* message. Some Windows applications have a message
handler that shows a msgbox in case of a critical message,
and getting such a msgbox after canceling the file dialog seems very
wrong.
Task-number: QTBUG-48488
Change-Id: I1c842340dd2faf2be6e64e0522f9e2b33547d3cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 30225da91f89f7c0356bbc930896ee3e14319aae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Like the QPolygon code. This fixes a mistake in failing to clear the
list before de-marshalling in operator>>.
Updated most of the QDataStream tests to have data in the objects
they're streaming into, to ensure that the stream overwrites everything.
Fixes: QTBUG-122684
Task-number: QTBUG-122704
Pick-to: 6.6 6.5 5.15
Change-Id: I01ec3c774d9943adb903fffd17b6920c72f5042b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 1ebee8980ba31514079a01989168914bfd1e9f4f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coverity complains that QToolBarAreaLayout's
addToolBarBreak(QInternal::DockPosition) could access
QToolBarAreaLayout::docks out of bounds if passed
QInternal::DockCount.
That is correct, but a valid pos seems to be a precondition for this
function, judging from its sister functions, e.g.
addToolBar(DockPosition, .) or insertItem(DockPosition, .), which also
don't validate `pos`. All in-module callers of addToolBarBreak() only
pass valid positions, and use validateToolBarArea() to ensure that. So
it seems that Coverity doesn't grok the pass-by-in/out -parameter used
by that function. That, or it doesn't track back far enough.
Before attempting more drastic measures, first try rewriting the
function to return-by-value instead, and see what Coverity has to say
afterwards.
As a drive-by, make validateToolBarArea() constexpr.
Pick-to: 6.6 6.5 6.2 5.15
Coverity-Id: 444141
Coverity-Id: 444135
Change-Id: I5fcc664c3cea608429036cad75c37f5c38059733
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 19aeb431cf1bd4e864356ff02db6337dc59b2835)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coverity complained about a use of the moved-from (in the first line
of the loop) `info` object in subsequent lines.
This specific instance is harmless, because the field being accesssed
is a scalar and the move SMFs are the default ones, so the field isn't
actually changed when the struct is moved from.
Still, to silence Coverity and to guide other attentive readers of the
code, take a copy of the field before moving from the struct, and use
the copy's value after the move.
Amends ddc39eb3a46d699c23d39f0e914978199eb98cc6.
Amends 3e330a79ec8d273630660eefae42995018421c0c.
Coverity-Id: 444199
Change-Id: I26ea8669f27124fb2567b16d803d47ab439f1e41
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit ae8031b5e72032f9e2884c18cd72639acfd0d1a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Projects were modified using the tool at:
https://git.qt.io/alcroito/cmake_refactor
A couple of examples had to be adapted manually, due to them including
more than one app per example subdirectory.
The INSTALL_EXAMPLESDIR and INSTALL_EXAMPLEDIR assignments were
removed.
The install(TARGETS) calls were modified according to our
documentation snippets for qt_generate_deploy_app_script.
A qt_generate_deploy_app_script call was added for each executable
target.
Note that the deployment step will be skipped in the CI for now,
because we enable QT_DEPLOY_MINIMAL_EXAMPLES and thus
QT_INTERNAL_SKIP_DEPLOYMENT, and also because standalone examples
are not enabled yet, and deployment is disabled for in-tree (so
no-standalone-example) prefix builds.
The install(TARGETS) calls for each example will still run,
installing the examples into an installed_examples directory, that
will not be archived by the CI.
Task-number: QTBUG-102056
Task-number: QTBUG-102057
Change-Id: Ida389bbad41710b2ae5da4d95e2d85be9e0cd9ce
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3b30b0fc2e1cda30b83bd2de1f70b3ee0c83ba46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So we have a single central location for all generated files.
[ChangeLog][Build System] Generated resource files (and supporting
files) will now be placed into the .qt/rcc subdirectory of a project
build dir. The location is an implementation detail that might still
change in the future, so it should not be relied upon.
Change-Id: Id21df22cac832b618e98c25e0e134f4cf70ed9bd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit b84e7a6bb094e931810627d40c46faf897795655)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Coverity correctly complains that we're copying the QDebug object when
calling print*Container() when we could have moved it into the helper.
So do move it.
Pick-to: 6.6 6.5
Coverity-Id: 406803
Coverity-Id: 407406
Coverity-Id: 408523
Coverity-Id: 408562
Coverity-Id: 418431
Coverity-Id: 424788
Coverity-Id: 425106
Coverity-Id: 426537
Coverity-Id: 427163
Coverity-Id: 428925
Coverity-Id: 444463
Change-Id: Ic80247f315a09fffe9363577dff1d1c781859304
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 7e8196510df88bc956492593c27da1af7b31b8ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Either the code in the try {} block
- doesn't throw, then the return within the try {} block exits the
function, or it
- throws fileystem_error, then we rethrow in the catch, or it
- throws any other exception, then we leave the function by exception
In no case can control reach the trailing 'return {}'.
Found by Coverity.
Amends 7aecb189d544613ad13c7e7d1207bd7767225a71.
Pick-to: 6.6 6.5
Coverity-Id: 444466
Change-Id: I1c1bf752453076724c2fa9367ea5309e741d84ac
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 73d00d05477fb6da25164b37135bb19a300bea8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The html element <acronym> is obsolete in favor of <abbr>.
Replace the use in Qt's documentation templates.
Task-number: QTBUG-81209
Pick-to: 6.6 6.5
Change-Id: I19817fb7f3ab3c23aefeae480f270123d2253569
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 34b15dcc8a34d356386e79a5f2a836271c7c8aaf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In case a custom TLS plugin is provided, the order can be unclear
(next after OpenSSL is either Schannel on Windows, or Secure Transport
on Darwin, then a custom plugin, if any, and the last one is 'cert-only').
Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-123092
Change-Id: I02bcc1fa5448f64846d561a72b2522af3286c66c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 128645d02338029858dd3e03defeff9f16d80172)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
And try to not call Q_ASSERT() to avoid crash.
Fixes: QTBUG-123554
Pick-to: 6.6 6.5
Change-Id: I9443c5f0ab4ca7a858df9b328f517b48ab8f122d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 2862cdb7ba22cc99d1db158888ba0bb32c47e8e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
src/gui/painting/qpaintengine_raster.cpp:3811:42: error: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
3811 | m_clipLines = (ClipLine *)calloc(sizeof(ClipLine), clipSpanHeight);
| ^~~~~~~~~~~~~~~~
src/gui/painting/qpaintengine_raster.cpp:3811:42: note: earlier argument should specify number of elements, later size of each element
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I41ec3dd5c439e5cd51dd917741125ce50659500e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 12a432c80feba60ced4c67b496ac0762bacb8777)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On macOS, entries that do not match the filter are shown in the
directory listing.
Do not accept the dialog when these entries are double-clicked
(activated).
Pick-to: 6.6 6.5
Fixes: QTBUG-120768
Change-Id: If8ff6c56f1d21861b4e30051c212c9497042ed0f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 0f77aff05fa6eb059d7f8517c94c88f889b44e6e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently if qt6_generate_deploy_app_script is called on an executable
target that does not have the MACOSX_BUNDLE property set, it will
error out with a message about not supporting non-bundle apps.
This error is shown even if NO_UNSUPPORTED_PLATFORM_ERROR is passed
as an option which looks like an oversight.
Change the code not to show the error if NO_UNSUPPORTED_PLATFORM_ERROR
is passed. This means user projects can call
qt6_generate_deploy_app_script for non-bundle apps without having to
wrap the code in a if(NOT APPLE) check, and deployment will simply not
run for that target on macOS.
[ChangeLog][Build System] The qt6_generate_deploy_app_script
NO_UNSUPPORTED_PLATFORM_ERROR option will now have an effect when
calling the API on non-bundle macOS executable targets.
Change-Id: I932d6bfa2d3c7e2aaf8be967fea1f682eacf0112
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit ecdbc40d4041590ae6d6ceef2e82ec25f522da01)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise the touched files will not be re-copied and re-installed
until an explicit rerun of cmake.
Change-Id: I5abb752b45d8b33885a59363fe987225a89e713a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 07e7340c0d82a33b7b112cb7c3a2a719ad2ec9c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So that they are moved.
Pick-to: 6.6 6.5
Change-Id: I3d1767944200962be90d3eb8695c92a766c4c744
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 08cb919aa5b4fcd950e9f3a6e41c00c01f0632ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is probably a remnant from when QAbstractFileEngine was public API
since it's been changed to private API, just use QFile::FileTime.
Change-Id: I60d3d4ff811f95434b81d5ca115f5d43cfff8b15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fd295f4bf6002b499f1f238efa5a7c8d9c90be39)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the QT_CMAKE_EXPORT_NAMESPACE prefixed INSTALL_LIBS variable when
resolving the cmake path of the ABI-specific cmake directory.
Pick-to: 6.6 6.5
Change-Id: Ibc4a1b152135d840de104c15a183b13fca0739ea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit df8c3d40c85465027de375f656684badc6247121)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code allocated QSignalSpies on the heap and stored them in a
non-owning container, so if one of the many check macros trigger,
those objects would be leaked. Ditto QNetworkReplies. The code also
used dynamically-sized containers for statically-sized data; a common
anti-pattern.
Hold the sample QUrls in a C array instead, QSignalSpies in C arrays
of std::optional (to delay initialization) and QNetworkReplies in a C
array of std::unique_ptr with the existing QScopedPointerDeleteLater
deleter.
Change-Id: I7305115af15c079abba6d45c5de8db2198ea7a6d
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 20eba275d836e071c1ad8a5e4d1ef88fc5b23fca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Using the rvalue overload of append() is more efficient, since we skip
the alias check and the appendee's atomic ref-count ping-pong inside
lvalue append().
Task-number: QTBUG-123544
Change-Id: Ia76fdf28cba13d524fbbe894658a86a45a1ebe79
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit d5d2688acb5b67b41149db3332fa9bad11b39808)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Due to https://gitlab.kitware.com/cmake/cmake/-/issues/25770, the
presence of the Q_OBJECT macro here triggers automoc rule generation,
followed by moc's "No relevant classes found. No output generated."
warning.
Comment the macro out until the issue is fixed, leaving a comment to
avoid a helpful soul commenting the macro back in again.
Amends 32a1151245034e4d5d3162df21518e38b6f81fcd.
Task-number: QTBUG-123229
Change-Id: I5387128f8fcd2793f0d4b9ff73a551999fea84b0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c07a47cbf0972578f066f0085eb857dba210aae1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The static keyword prevents the linker from reusing the executable
code of one TU's instantiation of this function in other TUs.
There's no reason for this restriction, so remove it.
Amends 292cb12e024e63f17c501611e021b6f8da7d6dcc.
Change-Id: Ide60ce0bf4b7118295fad98a25bd438fc1da2039
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 8e504bfeb7872e6d604cd19719f84a5794091386)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of using ~/Downloads, which we have no control over (OK for
the CI, but not locally), create a parent temp dir, then another temp
dir inside it.
Also rename it to nestedTempDirs, the issue from the bug report wasn't
tested because it relied on a dir being created, then failing to set
permissions on it. The code has changed a lot since then.
Pick-to: 6.6 6.5 6.2
Change-Id: I2b03d5d761117aaf436041c13c0dc394b106bf89
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 56ef55eda0b197e975de155815885f310dc2e661)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Turn the QSignalSpy deletions from deferred (via deleteLater()) into
immediate ones. This is ok: QSignalSpy is using itself as a context
object in QMetaObject::connect(), so the connection thus established
to the monitored signal will be atomically severed if either sender or
receiver are destroyed. There never was a need to defer deletion of
the signal spy, so don't.
Found by making QSignalSpy's inheritance from QObject private.
Pick-to: 6.6 6.5
Change-Id: I962d28c3a78f356d234324fed68716f2f1052100
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit eefd8ab1e8e4d6afa64e15c017e1e78fd30c7382)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While a signal with more than 2Gi arguments is only a theoretical
possibility, still use the correct index variable for the indexed loop
over this QList<int>.
Pick-to: 6.6 6.5
Change-Id: I2ed33238c2cd9d2d1c39cd29c988a2adfd821897
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a90c3cc3c7ed24c83b9ffa4020cb3652678b36bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A recent change in that area triggered Clang-SA to rescan the code and
complain about this pre-existing bug: If receiver == nullptr, then the
`previous` member was never initialized.
Fix by null'ing it using NSDMI. This is a trivial type, the compiler
will be able to avoid the redundant write.
Amends ab92b9e40025dcf08c14232de762a268201a78b4(!).
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ideed71f0f36d5f896fb6a4614f233757c1371ee3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 40714c1ddd886f6d0bde53e05f27d6b3e9e6649b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Drop the \c command when in front of \l commands as that doesn't work.
Pick-to: 6.6
Change-Id: I0aa092461807e068e9c2368f5d6f04e77b56c910
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: James DeLisle <james.delisle@qt.io>
(cherry picked from commit c8fb376de50683c81cbf64b4422058d4dd2e9f07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The atomic pointer "connections" is always populated under
mutex in QObjectPrivate::ensureConnectionData() but isn't necessarily
read under mutex protection (e.g. in maybeSignalConnected()).
This caused a data race, fixed by using storeRelease and loadAcquired.
Task-number: QTBUG-100336
Pick-to: 6.6 6.5
Change-Id: Ifd605e65122248eb08f49e036fdda6e6564226bc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 75d82afa0d3aad9b4f9857e439535fc49c4616bc)
When building examples as part of Qt in the CI, it's best to skip
running deployment for all examples to save resources
(space and time).
Add a QT_DEPLOY_MINIMAL_EXAMPLES option similar to our
QT_BUILD_MINIMAL_STATIC_TESTS option, which will set
QT_INTERNAL_SKIP_DEPLOYMENT at the root examples directory scope, to
skip deployment for all examples.
Each example can then opt into the minimal subset by unsetting the
QT_INTERNAL_SKIP_DEPLOYMENT variable before its
qt_internal_add_example call.
Add Coin instructions to enable this option when building our examples
in the CI.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Task-number: QTBUG-102057
Change-Id: I2efcda455b400c27fe1efd1bcf81b133137fa2d1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 224b7c6b6a2a425487df19643709d105e8f3cdd5)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
If a qt5.git configuration is marked with the StandaloneTests feature,
tell CMake not to build the examples in-tree, and instead use
qt-internal-configure-examples to build the examples out-of-tree.
This brings a couple of improvements:
- higher chance of building examples as ExternalProjects without
issues
- ability to use deployment api in examples, without installing the
examples into a main install prefix
The new coin instructions files use a copy of the standalone tests
instructions as a base.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: If89e6da0b327a38b9c2738f58aa1b5b5fb9fda37
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit d644f2e02ce36520b4d101ea03fbbcf1b72e7e6f)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
When building standalone tests of qtsvg targeting yocto, the
standalone parts config file was not found.
That's because it specifies a new CMAKE_STAGING_PREFIX for each built
repo, and the QtSvgTestsConfig.cmake file will be located there,
rather than in QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX, where
the QtBuildInternalsConfig.cmake file is.
So in this case, we always have to prefer looking into
CMAKE_STAGING_PREFIX for the file.
Amends 62905163bf887c2c2c9ba7edcd64c96d237a6e95
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I8902381afa4267e40dfb2ad47e44285a806a35e2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 270315e019a569bebf83e7c293b44f36c555fb3c)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Introduce a new libexec/qt-internal-configure-examples script that
allows to configure and build "standalone examples" just like
"standalone tests".
This is a prerequisite for using deployment api in examples for prefix
builds, otherwise deployment api gets confused not finding various
information that it expects from an installed qt.
Because the various conditions in the build system for standalone
examples are similar to standalone tests, introduce a new
QT_BUILD_STANDALONE_PARTS variable and use that in the conditions.
The variable should not be set by the user, and is instead set by the
build system whenever QT_BUILD_STANDALONE_TESTS/EXAMPLES is set.
Unfortunately due to no common file being available before the first
project() call, in qtbase builds, per-repo builds and top-level builds,
we need to duplicate the code for setting QT_BUILD_STANDALONE_PARTS for
all three cases.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ia40d03a0e8f5142abe5c7cd4ff3000df4a5f7a8a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 62905163bf887c2c2c9ba7edcd64c96d237a6e95)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Make sure to consider all qt_prefixes for adjusting
QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES with locations where qml plugin
config files might be present.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I5a7eec434635db1953871d735e2420c331ccee48
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 06fef6219e992489dae15e9851725e1675ff0bf6)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Currently we hard-code to look for qml plugin Config.cmake files
in the current list dir, whether the Qt6Qml directory is.
This is not sufficient for finding qml plugins in a prefix build of a
repo that has not been installed yet.
For example qtquick3d plugins will be in
qtquick3d_build_dir/lib/cmake/Qt6Qml/QmlPlugins, which
won't be picked up by the Qt6Qml Config file in the installed Qt
location.
Allow specifying extra qml plugin glob prefixes via a new
QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES variable.
This is similar to QT_ADDITIONAL_PACKAGES_PREFIX_PATH.
Any path specified via QT_ADDITIONAL_QML_PLUGIN_GLOB_PREFIXES
will have the
QmlPlugins/${INSTALL_CMAKE_NAMESPACE}*Config.cmake
glob appended to it, and then used for globbing files in that
location, after processing the main location wherever Qt6Qml is.
This will be used by ExternalProject example machinery.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I469863c965b8b13cf007c611976a64fbff6e9111
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 40fa36db22b67363a4a05a4d74b0fcfc2f4833b8)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Unfortunately when using CMake <= 3.27 together with
-debug-and-release, it's not possible to reliably build examples as
external projects due to clobbered files in the same build dir.
Disable building examples as EPs in such a case.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Icea9fdab47986c2608e1952a0bbae72365ac7a62
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c668dd4044283b6eac86f7ab8177595e207567d7)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
When building EP examples for a repo that defines a bundled library,
we need to make sure the relevant FindWrapBundledFooConfigExtra.cmake
file is found when looking up dependencies.
For a prefix build, that file is placed in the build dir of the repo.
Use the list of qt_prefixes that includes the build dir of the repo,
append lib/cmake/Qt6 to it and pass that as additional values to
the CMAKE_MODULE_PATH variable of the external project.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I85d5f360380856fcfb8be7235b8365dcf15aa0c0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 31c5d50e84b210843ccdec58a86c4fce3125b679)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
When building examples as ExternalProjects as part of a multi-config
qtbase build, syncqt can not be located with the following error:
CMake Error at Qt6CoreToolsAdditionalTargetInfo.cmake:10 (message):
Unable to add configure time executable Qt6::syncqt
qtbase/libexec/syncqt doesn't exist
Call Stack (most recent call first):
qtbase/lib/cmake/Qt6CoreTools/Qt6CoreToolsConfig.cmake:44 (include)
qtbase/cmake/QtPublicDependencyHelpers.cmake:65 (find_package)
qtbase/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:34
(_qt_internal_find_tool_dependencies)
qtbase/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:42 (include)
qtbase/lib/cmake/Qt6/Qt6Config.cmake:165 (find_package)
CMakeLists.txt:13 (find_package)
The Qt6CoreToolsAdditionalTargetInfo.cmake file is used both for
install(EXPORT) Config files as well as export(EXPORT) Config files,
and in the latter case, the path that syncqt is looked up in is not
correct because syncqt is not yet installed.
In addition to checking whether syncqt exists in the install path,
also check if it exists in the build dir.
Ideally the additional path would be stored in a separate file that
is not installed, but the current code infrastructure does not provide
such a feature. Because we store a relative path instead of an
absolute path, the build path does not leak, so the situation is
bearable.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I16ad5c280751e050bc9b039ebd38ec9a66a6554c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit cc537d927b23a34296767fec8d3885a95f714255)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Some examples depend on FindWrapFoo.cmake scripts that are part of
a repo. An example is qtgrpc with FindWrapProtoc.cmake.
These need to be available when building external project examples in
a prefix build where the repo is not installed yet, and thus the
source dir FindWrap scripts need to be used instead.
Make sure to pass the value of CMAKE_MODULE_PATH to the external
projects to ensure these scripts are found. CMAKE_MODULE_PATH is
populated by qt_set_up_build_internals_paths as part of the
qt repo build.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I3e977919bc137ed60e8eb9300625e5d8b87b373e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 20bd9fad1cf6d41c773056949e334c3ab75e8b1c)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
In some repos we need to be able to pass extra cache variables to find
3rd party packages when building examples as external projects.
Introduce QT_EXAMPLE_CMAKE_VARS_TO_PASS to allow passing vars like
OpenSSL_ROOT or Protobuf_ROOT if they are set in the repo project.
It should be noted that QT_EXAMPLE_CMAKE_VARS_TO_PASS expects a
special syntax for its values, of the from VAR_NAME:CMAKE_TYPE, due
to the pre-existing implementation on how we pass variables
to ExternalProject.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ie3e74d4fde106f947d12e51d27e41a310157aab6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 43d0c5ed6ef666b4ef9f33c018240f551fb6ebae)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
12203e94f5a34b59b6a7389402c854e823135a35 exposes the issue in xcb
qpa plugin.
We should not recreate xcb window via the call of focusWindow->winId().
Fixes: QTBUG-123032
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I6da4f3e64a9d7a92a2aab714591986c5d128fbd4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 23a906335e0d8a03388bbd73db43682c724d04a7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In modern iPad apps, windows can be moved between screens, just like
regular macOS apps, but we don't reflect this as changes to the QWindow's
screen, meaning the screen() is not reliable input when computing
a window's full screen or maximized geometry.
In addition, when running iOS apps on macOS as "Designed for iPad",
the system will scale the UI down by 77%, to better match metrics
(fonts, sizes) to the macOS environment. Classes like UIView and
UIWindow are oblivious to this scaling, and will think they are
larger than what they really are on the screen. However, UIScreen,
for some reason, reflects the actual screen size, instead of taking
part in the "inflated" view of the world.
As a result, even if screen() would reflect the correct screen the
window is on, we can't use the screen geometry for clamping the
window geometry, as the two have separate coordinate systems.
We could scale up the QScreen geometry accordingly to work around
this, but we don't know if the UIScreen behavior is a bug or not,
so instead we skip the screen() as input and use the UIWindow
bounds directly.
Task-number: QTBUG-121781
Fixes: QTBUG-106709
Pick-to: 6.6 6.5
Change-Id: Ie734fc477b37a7e39e6fb16d7738d3f69731a975
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 2da738f03589b2bb53e921b5fec347bdd6b68b16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It says:
/home/qt/qt6dev-src/qtbase/src/corelib/tools/qcontainertools_impl.h: In function ‘auto QtPrivate::sequential_erase_with_copy(Container&, const T&) [with Container = QList<void (*)()>; T = void (*)()]’:
/home/qt/qt6dev-src/qtbase/src/corelib/tools/qcontainertools_impl.h:383:14: error: ‘D.282000’ is used uninitialized [-Werror=uninitialized]
383 | const T &tCopy = CopyProxy(t);
| ^~~~~
cc1plus: all warnings being treated as errors
We can avoid storing the value into a const ref to silence this. Storing
a non-const pointer into a const reference is quite confusing anyway.
Fixes: QTBUG-123486
Pick-to: 6.6 6.5
Change-Id: I77fcd871724ce7f81b9567603dc5b4cb31f121c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4662e80755b3002585280cfe9076d2c6c14f1e5b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QTest::ignoreMessage() to prevent the runtime warnings being
printed, cleaning up the test log, and to document that they're
intended.
Pick-to: 6.6 6.5
Change-Id: Ia0ba888cce83529217642be0e7e321d9406ba386
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ce913bff5df668787dc904469fca09763acf0f27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The warning for the new-style signal constructor was copied from the
old-style signal constructor, but not adjusted to its new home. The
signal pointer passed here is not the signal "name", but a signal
"pointer" (-to-member-function, but no need to go into that much
detail).
Amends 6fc7d76e7309c01a364b0f72d253735366674f29, but not picking to
very strict LTS branches, just in case someone has a
QTest::ignoreMsg() installed on it.
Pick-to: 6.6 6.5
Change-Id: Ia1f6b7001f38202ac72f9945c4a822d81562cdbf
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7565034aadf955537be908a94e4cef16096a041f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current deployment api implementation sets the value of
QT_DEPLOY_PREFIX based on CMAKE_INSTALL_PREFIX, if no QT_DEPLOY_PREFIX
was previously specified.
This does not work properly when multiple examples are placed in the
same subdirectory and are using deployment api.
Make sure to unset the QT_DEPLOY_PREFIX for each
qt_internal_add_example call, so that a correct prefix is computed for
each example, based on the modified CMAKE_INSTALL_PREFIX value that we
set for each example.
Task-number: QTBUG-102057
Change-Id: I931e5f2d683ab94a940e20a2bdfeaa4ac5d8c5f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit c5d0e93199beea314e4e4607c8ef5f7c29162666)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We would like to add deployment api calls to all our examples.
Doing that in the CI, where we build all examples, would mean running
the deployment tools for each example. This takes time and space.
Add the option to skip running deployment code by setting the
QT_INTERNAL_SKIP_DEPLOYMENT variable.
This can be set per-directory or at the root directory.
In that case we will generate an install script that does nothing.
With this option, we can ensure we run deployment for a few examples,
but skip it for the rest.
Also skip running the deployment api for non-prefix builds, because it
only partially works. In such a case, show a warning. The warning
can be hidden by setting the QT_INTERNAL_HIDE_NO_OP_DEPLOYMENT_WARNING
variable. This might be revisited in the future.
The newly introduced helper functions are also meant to be used in
qtdeclarative.
qtbase only uses one of them, because currently it does not contain
POST_BUILD deployment logic.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Task-number: QTBUG-102057
Change-Id: If5a4102137e9dfc4a8bfde7b26d511ed1700340e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit c90964788cb1d6ffbfde6e9dc930bbb3e915fb98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since d08fa86e63448377dde4297bc94680a9d7daaaeb we add extra deploy
files with target file information.
The file paths contain a $<CONFIG> genex to handle multi-config
builds. These were not evaluated in the DeploySupport file content.
Add a TARGET_GENEX_EVAL genex around the TARGET_PROPERTY genex, to
ensure they do get evaluated.
This avoids an error like:
include could not find requested file:
C:/Users/qt/work/qt/qtbase_build/.qt/QtDeployTargets-$.cmake
Amends d08fa86e63448377dde4297bc94680a9d7daaaeb
Task-number: QTBUG-117948
Task-number: QTBUG-118153
Change-Id: Ia3898c31d80b82bdb25fe733fc73b45c6d689ed0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit a6965441d72a1e453d80d0083c1a3fd6803d96bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the sentence "Users connect and send message to each other",
change "message" to "messages".
Pick-to: 6.6 6.5 6.2
Change-Id: Ib4d0991d314cd300a56def8797cac604fa88ea35
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 379f23cfdc5f28557de516d837895b27364354df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a QWidget was reparented, we would take care to reparent its
backing QWidgetWindow as well, into the nearest QWindow of the
new QWidget parent.
However we would only do this for the reparented widget itself,
and not any of its child widgets. In the case where the widget
has native children with their own QWindows, the widget itself
may not (yet) be native, e.g. if it hasn't been shown yet, or
if the user has set Qt::WA_DontCreateNativeAncestors.
In these scenarios, we would be left with dangling QWindows,
still hanging off their original QWindow parents, which
would eventually lead to crashes.
We now reparent both the QWindow of the reparented widget (as
long as it's not about to be destroyed), and any QQWindow
children we can reach. For each child hierarchy we can stop
once we reach a QWindow, as the QWindow children of that
window will follow along once we reparent the QWindow.
QWindowContainer widgets don't usually have their own
windowHandle(), but still manage a QWindow inside their
parent widget hierarchy. These will not be reparented
during QWidgetPrivate::setParent_sys(), but instead
do their own reparenting later in QWidget::setParent
via QWindowContainer::parentWasChanged(). The only
exception to this is when the top level is about to
be destroyed, in which case we let the window container
know during QWidgetPrivate::setParent_sys().
Finally, although there should not be any leftover
QWindows in the reparented widget once we have done
the QWidgetWindow and QWindowContainer reparenting,
we still do a pass over any remaining QWindows and
reparent those too, since the original code included
this as a possibility.
We could make further improvements in this areas, such
as moving the QWindowContainer::parentWasChanged() call,
but the goal was to keep this change as minimal as possible
so we can back-port it.
Fixes: QTBUG-122747
Pick-to: 6.7.0 6.6 6.5
Change-Id: I4d1217fce4c3c48cf5f7bfbe9d561ab408ceebb2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c956eb8eddb1b3608d7e3d332fbe55df5ec41578)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
So we don't have to maintain the requirements in two places.
None of the variables removed from the qmake configs are
referenced before we do load(qt_config), so this should
be safe.
Change-Id: Iabd5884a2fd1c4b1cd7b44416bebb2624050229e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 640a3f24741dbd50cc5aff425c81d09f908054b4)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb6d68703b67e042e2a7254c2ca6a004a1441cc5 fixed warnings in the
Universal style by using a faster alternative. It's possible that users
will run into these warnings too, and they should be provided with
information to make a more informed choice about which approach they
can use.
Fixes: QTBUG-123360
Pick-to: 6.6 6.5
Change-Id: I4170e9ade40c4b54dbc2bd73d124b2ade4d8c939
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit ce9f06c1579efda7ae0d259bfaa565f99d89e4f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends a34e81ab8be6445877e040b1afb85deeaa725f86 .
The previous range comparison doesn't work since XKB_KEY_KP_9 is 0xffb9
while XKB_KEY_KP_Equal is 0xffbd. Change to an explicit switch.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I3a340bac61fb074eef505ef9b06300a6468877f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit daa5f7bd5f3951e459f10666a8001c8a0076e827)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The API is available on all iOS versions we support nowadays.
Pick-to: 6.6 6.5
Change-Id: Ia58c5ad1649e7e6b22f9c56a809e2455586a8e5a
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit a89a916377f774ea55b43afc56cb89070097883f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Detected by TSAN in tst_QThread::terminateAndPrematureDestruction()
but better have a dedicated unittest, with values emitted by the signal
and recorded in the spy.
Pick-to: 6.6 6.5
Change-Id: I141d47b0ea0b63188f8a4f9d056f72df3457bda5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c837cd75936cbeeb898dd5808edb9dfaf716a76e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For QMap on a std::pair, QMap::iterator{}.operator->() would result in a
type that has "first" and "second" members: std::pair itself. But it
would be wrong to marshall and demarshall the first and second elements
thereof as the key and value, so give preference to the .key() and
.value() selection, which would store the std::pair as the type.
Fixes: QTBUG-123401
Pick-to: 6.6 6.5
Change-Id: I6818d78a57394e37857bfffd17bd69bb692dd03b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5401a9a6cd3263eda15911c3fbfc81ebea2e798f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Send connection error type PROTOCOL_ERROR when receivng CONTINUATION
frames without any data received from previous HEADERS or PUSH_PROMISE
frames, instead of assert.
Task-number: QTBUG-122375
Change-Id: Ib14e4610692dc4832b1f3e99dca497d9baf3d9d3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 89467428f8173524083fd7d2cca9c2985141d567)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... moving it away from between a comment and the C++ code the comment
pertains to.
Change-Id: I56b3ded01d1800bae19121e4b9340d0c43f1da85
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c1d1437b4a8609f4b6e7eb5f39352d4951b4f507)
There's no reason to check whether the timer has expired after
rounding the timer's native nanoseconds up to milliseconds, so delay
the ceil<ms> operation to after the timer expiry check.
As a drive-by, protect the std::min call from Windows macros with the
parentheses trick and employ C++17 if-with-initializer.
Remove the break-if-expired, as it now obviously duplicates the while
exit condition.
Change-Id: If30421012143640c75a9a44fe711d0c1c7cd23b9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 59549657a3699b5ea963b7cdc0bd69f08ab6513a)
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
We were looking at all active streams, but that also includes promised
streams.
By the RFC the limitation that our peer specifies only applies to the
number of streams _we_ create, not the total amount of active streams.
More importantly, for the qhttp2protocolhandler it could mean that we
could end up having a few promised streams push the active stream count
over the limit, which could lead us to start more streams than intended
(then bounded by the number of queued requests).
The worst case in this scenario is that a **non-compliant** server
doesn't track how many connections we open and the user has queued
a ton of requests, so we open a ton of streams.
But on the upside: server-push is not widely used.
Change-Id: I2a533472eb9127fd176bb99e9db0518f05c3fffe
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5ed736b053eb9d04ecd1a6f2f375cce7fcefe4e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This has to be done from all places where we deref it. Otherwise we leak
memory.
Pick-to: 6.6 6.5
Fixes: QTBUG-116086
Change-Id: I57307ac746205578a920d2bb1e159b66ebd9b2cc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 717dc9450ffc13ef8209a10073552ac4574a4160)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The settings frame with the max streams might be received late
or be revised later, so we cannot assert something on the
relation with the max streams allowed.
Amends 22c99cf498103c86baa5a415ca34630396e5b6aa
Change-Id: I973dfcf91541becc8c3d6363f9065bb1b9183062
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit b0b2b7d39d9689dfdcb69394d2c1b3a3e20f9999)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is failing a bunch on macOS in CI, but not locally.
So just assuming the timings are too tight in CI and increasing
them.
Amends 8de1ed89797cabc883b5651673daa747f6ee9c0e
Change-Id: Icb44fdbd2aa117de7350c5df2e8351bb19c865c4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 88763730cc9bc5929e0ff2af0a78276636bc91ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When high-dpi scaling is enabled, we default to HintNone
currently, since otherwise text layouts (and widget layouts
and anything depending on text size) will have to be updated
when the window is dragged onto a screen with a different dpr.
The check for whether scaling is enabled was based on
QHighDpiScaling::isActive(), which is technically incorrect
since this does not return whether there is a scale on the
painting, rather whether the coordinate system in Qt matches
the one of the platform.
Now that we support agreeing on fractional scale factors with
the Wayland compositor, this issue has become visible, since
QHighDpiScaling::isActive() will now return false for these
compositors, even for fractional scales. For integer scales,
the issue existed before as well, but the kerning issues are
less noticeable in that case.
Pick-to: 6.6
Fixes: QTBUG-122910
Change-Id: Ic82b07d57a06a351255619f9227dd60396903ade
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
(cherry picked from commit e7ddd490cf44ecd1c59b3798294ed2812fc5a940)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Palette and font changes made by a style sheet are propagated to
existing widgets and their children at change time.
Palette and font changes made by setPalette() and setFont() are
inherited by all existing and future children of the widget to which the
call was made.
Clarify this in the documentation.
Fixes: QTBUG-122588
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ic40d96fc1e5e4507f84a33138303b7193948d3fe
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit f2b681dc590c7fd3cd19cbde20363339ceae15f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends commit 41f84f3ddb780ec751e3fc706dd242fc4a99de7a - QDate and
QDateTime declare fromString() methods only when feature datestring is
enabled. So their inline implementations should also be conditioned on
that feature.
Pick-to: 6.7.0
Change-Id: I84fc877001d3fc97c6ca149864e4ad5a2dbabe87
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1618ff825c2198705fedde9c284a0c52bcce5b89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is passing on my machine with Visual Studio 17.10 Preview 1.
But only with C++20 enabled.
Pick-to: 6.6 6.5
Task-number: QTBUG-101761
Change-Id: Ia5af3d75d35dda1df9b39bdc94f07dd746ff60af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6c0be8acc44df9eec2c64527696bb137650124ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CreateStream returns a new error code, StreamIdsExhausted, when next
stream id counter exceeds max stream id instead of assert.
Task-number: QTBUG-122375
Change-Id: I653b20c24c1429fe88d476beb1ca952aa1bbb320
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 9b386127a091ff12229709b4a60ad6d4e8b05512)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit fc33fea999365c36ed446eee0db0d59d94be306b.
The change caused issues with system-wide PUA fallbacks on
platforms where this is supported. It needs to be replaced by
an approach which still falls back, but only for fonts which
are explicitly categorized as PUA fallbacks.
Pick-to: 6.6 6.5
Task-number: QTBUG-110502
Change-Id: I985a1f8076645593c50e81759872b4227d0fcd0d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 4913511d3bf8ec7838f80fbfe92c0fe900b2f003)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
C++11 has been required for a long time.
Pick-to: 6.6 6.5
Change-Id: Ib6c1571b100dd4eb8194d515f2180ca26481b556
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 66dd00dcfd8a715ff6bc736e6beb5f2d3b2c69cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
At the time of bb1f616ff19586225cd712195ca78bfc64944103 the
Flickable.flickDeceleration property still applied to both touch
flicking and mouse wheel scrolling. In qtdeclarative
b1766d9d629f61d824146e69f1f3b319cbee3d11 we decoupled them. Switching
from the traditional 1500 logical pixels/sec² to 5000 was not enough to
satisfy those who complained about the mouse wheel "not being linear"
and at the same time made touch-flicking feel too sluggish. So let's
restore the traditional default deceleration value.
The flickDeceleration property is still adjustable, and the default
can still be overridden in any QPlatformTheme subclass.
[ChangeLog][QPA] The default value for the platform FlickDeceleration
hint is reverted to 1500 (rather than 5000 as in Qt 6.6). This sets
the default value for Flickable.flickDeceleration, which can be
overridden directly; and the default can also be overridden in any
QPlatformTheme subclass.
Task-number: QTBUG-35608
Task-number: QTBUG-35609
Task-number: QTBUG-52643
Task-number: QTBUG-97055
Fixes: QTBUG-121500
Change-Id: If52b61dfcd0c08a7c6e753f39dbe01f417e94bf4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit ed66cf8a045cc65e13d951b0ff41abff634935bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We link object files with the same names into the BundledLibjpeg
static archive.
This caused warnings when running dsymutil on shared libraries using
that archive:
skipping debug map object with duplicate name and timestamp
could not find object file symbol for symbol _jpeg_start_compress
Avoid that by creating copies of the source files with different
names, so that all object files are unique.
Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-123324
Change-Id: I1d4ebdd111b4172cde793671fbe059957f102871
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit b72158daf502e1f7f0d8c585df6923b4d958cb94)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A qt installation might not contain the non-versioned the qtpaths.exe
installed, but keep the versioned qtpaths6.exe.
Try to use the versioned version before the non-versioned one.
If none exists, show a warning at deployment time.
Amends 571201603acc731330c9af42a3aca9cda41d38fd
Pick-to: 6.6 6.5
Fixes: QTBUG-122664
Task-number: QTBUG-119619
Change-Id: I23caf9ed3c7928fbab9657b0c0c64517dfc7d68e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit bcdc9d7059b6ecd4e0bfb44cf5a42d87c49e3edc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Change 997fd3b88ede8078af286da6ecc197e83a8cbb46 fixed integer overflows
with huge texts. This was done by using qsizetype for size calculations
instead of int. However, that change introduced a serious regression
due to an itermediate imultiplication result being "promoted" to unsigned,
and therefore a negative value being converted to a large positive.
The solution is to make sure all values in the expression are signed.
Fixes: QTBUG-123339
Task-number: QTBUG-119611
Change-Id: I3f9189f77b383c6103cf5b35981cdb607b065f6f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 7a84c58f55ab56c5d77be80e43783d0b5302a749)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some outputs weren't guarded with the optVerboseLevel which caused them
to occur even with the --list option. Add a guard to prevent for that.
Fixes: QTBUG-122257
Pick-to: 6.6
Change-Id: Ide060cda4ac6f9b4470ca608120e2b8aa4819de5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit ad2da2080c8b99665cd32237ab365fee5461cf66)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When connecting a QFutureWatcher to the QFuture it will connect to the
output interface, which will queue up events to notify about the current
state. This happens in the thread of the QFutureWatcher.
Since 07d6d31a4c0c17d8c897d783a9b0841df6834b02 unfortunately the sending
of those events was done outside the lock, meaning the worker-thread
could _also_ send events at the same time, leading to a race on which
events would be sent first.
To fix this we move the emission of the events back into the lock
and because it is now inside the lock again anyway, we will revert
back to posting the callout events immediately, so this patch also
partially reverts 07d6d31a4c0c17d8c897d783a9b0841df6834b02
Fixes: QTBUG-119169
Pick-to: 6.6
Change-Id: If29ab6712a82e7948c0ea4866340b6fac5aba5ef
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 63b2cf8a457f0eea861fa060c610a74b35450ba6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Creating a QString from a QDate/QTime works even when
QT_CONFIG(datestring) is not defined, so no need to ifdef it out.
Change-Id: Ib3594036f309393b612d3fbf21f51be9c36a9391
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f813b76fb2b4189fc18d0b5a75faf1eea2bb1de2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
File is is part of the internal test infrastructure.
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: Ia5bc4e0abeea210ee501596330b2b63216e9e9c7
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 0886035bcdd7bb1c74d3119354d1311377ebc0dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
License is set to that of the other files in the directory
Task-number: QTBUG-121787
Change-Id: I9922feb2a520a549ab9cc1d82a85417202ad83c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit f9136fd0dbdbc4f5d61b50b7fcffece6faa2ac4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was the only place that called it. Makes the code slightly uglier,
but removes a function that returned a raw pointer. More importantly, it
gets the actual type from QVariant, without relying on it internally
converting from QDateTime to QDate and QTime, or failing to do so in
some cases. This is going to be needed for the next commit.
Pick-to: 6.6 6.5
Change-Id: I6818d78a57394e37857bfffd17bbcd3f5057eadc
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit b5d73636d27f1bba87980cf1bac6feb1ebd6360b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When declaring a constructor, you must use the injected name, not a
template.
qfutureinterface.h:472:37: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
Pick-to: 6.6
Change-Id: I6818d78a57394e37857bfffd17bbbf2313001cbf
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 111c08d0eaa134652f1f1e602ead1a539614258f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was not setting the value _back_ to 0 when the function ended
and this caused qtbug68821proxyError to fail fairly consistently
on Windows when it was running in the same run.
qtbug68821proxyError was always succeeding when ran by itself so
it was quite odd.
Change-Id: Ifa4982f1b10128674081136a30bdab4b0ce7004a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 5e102a792c4ee0db180defe480cb96c197871508)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That seems to be enough for me when trying to reverse-resolve host names
inside the corporate network.
Change-Id: I6818d78a57394e37857bfffd17bc6b0ebd39f51b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d18d8a7ad1f69b2e65de114d9a3edc23d56da30e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because QHostInfo is threaded, so if the look up times out and we exit a
given test, the results may still be delivered to the next test.
Especially if the next test is also about to time out -- in which case
it doesn't and prints a nonsensical output.
Before:
FAIL! : tst_QHostInfo::lookupIPv4(WithCache:literal_ip4) '!QTestEventLoop::instance().timeout()' returned FALSE. ()
Loc: [tst_qhostinfo.cpp(220)]
FAIL! : tst_QHostInfo::lookupIPv6(WithCache:aaaa-single) Compared values are not the same
Actual (tmp.join(' ').toLower()) : "192.0.2.1"
Expected (expected.join(' ').toLower()): "2001:db8::1"
Loc: [tst_qhostinfo.cpp(281)]
Now:
FAIL! : tst_QHostInfo::lookupIPv4(WithCache:literal_ip4) 'helper.waitForResults()' returned FALSE. ()
Loc: [tst_qhostinfo.cpp(278)]
PASS : tst_QHostInfo::lookupIPv6(WithCache:aaaa-single)
Change-Id: I6818d78a57394e37857bfffd17bc66e241cab24d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 78cf5740a95d2dbf985cc137240a11f0c4ebfde0)
...and adjust it to its presence in the new QDeadlineTimer overload,
which sports nanoseconds granularity.
Change-Id: Ifa9658ca32c5dc4bef5cf36dec2e452174eebe1c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dd5925fedb19c8fdb2601ec9eab6fb916341ff47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a QDeadLineTimer::isForever() then its remainingTime() is
chrono::nanoseconds::max(), which is exactly representable as
chrono::milliseconds, and greater than 10ms, so the following code
would have done the right thing already.
Let it.
This also removes the duplicate mentioning of the 10ms sleeping
timeslice.
Amends fa296ee1dcf4c16fb6f242cf08949485e499fec3.
Change-Id: Ibc32d6069b78cd4583df07d0707d98645440b36c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e102edfbf8db3a0a541de2a8a3e3782b7e5b234b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current approach doesn't work correctly because external project
steps that we run on per-ABI build directories look as
'cmake --build <abi/build/dir> --target <target_name>'. When the
project has a single APK this works perfectly fine. But when building
more than one apk this leads to the simultanous build in the same
'abi/build/dir' which causes undefined behavior and concurrent access
to the build artifacts. This is especially sensible when APK targets
have the common dependencies.
The solution is split for two usecases:
- Ninja-like generators, that support job pools.
- Other generator.
For Ninja-like generators we now create job pools per-ABI with job number 1,
this convinces ninja to run only one 'cmake --build' command in single ABI
scope.
For other generators the solution is not that good. We create the dependency
chain between all APK targets and this leads to the build of the unwanted
dependencies. For example if project has apkA and apkB targets, then
apkB_x86 will depend on apkA_x86(assuming x86 is not the main ABI). This is
the only way we may ensure that 'cmake --build' commands won't be running
simultanously.
Fixes: QTBUG-122838
Change-Id: I6f48fae57047a29129836168c28e14cde4eaa958
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 31a91d2e932a123836b5862bf43a8e79c3071245)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a custom application delegate is installed prior to creating the
Qt application delegate we will forward callbacks to the delegate,
but this has to be done manually for any callback we implement.
Fixes: QTBUG-122996
Pick-to: 6.6 6.5
Change-Id: Ia25e2c4b8cac37130d604c772c875c5d76c66764
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit d8371ebbd2b405bb1361836523a2b15a54780607)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the dialog is closed by pressing a button, the button will be
reflected via clickedButton(), and the result() will reflect either
the QMessageBox::StandardButton value, or an opaque value for custom
buttons.
Depending on the role if the buttons, the accepted or rejected
signals are emitted.
If the user called accept() or rejecct() on a dialog that had
already been closed by a button, we would as a result of
1f70c073d4325bc0eb9b0cec5156c3b89ce1b4df emit a signal based
on the original button that was clicked, instead of respecting
the newly triggered function.
It's a questionable use-case, as the clickedButton() is still
the original button e.g., but we should still avoid regressing
this, so we now emit the signals based on the newly stored
result code instead of using the clicked button as the source
of truth.
To allow this we had to change the opaque result() value for
custom buttons to stay out of the QDialog::DialogCode enum,
but this should be fine as the documentation explicitly says
that this is an opaque value.
Fixes: QTBUG-118226
Pick-to: 6.6 6.5
Change-Id: Ia2966cecc6694efce66493c401854402658332b4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b30121041c07b1b8613eaf624c9aa55a51001aef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QRestReply is no longer a QObject, so remove the includemocs line from
the .cpp file.
Amends 9ba5c7ff6aa42c5701cf950d2137467a2d178833.
Change-Id: I6c0ba6b9e3b82f84f3b509755e7da5b33e607776
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 2ff93ea0eeddc9c4c01c194e5af2a2c4506a9d9e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The multipleDirs warning was added to avoid surprises related to where
windeployqt would deploy files when using binaries from different paths.
To do this properly, make the warning message more meaningful, and
suppress the warning when the --dir option is specified, i.e. when the
user is already explicitly choosing where to deploy.
Pick-to: 6.6
Change-Id: Ie2984f4af740776c568610370d49ad4ff85ffff0
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a88b6bca21498f367908feedf660243eaf1d613d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Destroying the QComboxBox will, once it reaches the QWidget destructor,
close all popups, including the QComboBoxPrivateContainer, which emits
signals on behalf of the QComboBox, that is now gone.
Regression after d8e110054876b1cbf186e95bac5561a237ee1c13.
The old-syle signal-slot syntax had the advantage of not delivering
signals to slots in derived classes after that derived class's
destructor had finished running (because we called via the virtual
qt_metacall). The new syntax made no checks, so a conversion from the
old to the new syntax may introduce crashes or other data corruptions
at runtime if the destructor had completed.
See 0e72a846d379ba02ff80ecac2526640a05b872b6.
We also need a QPointer for the QComboBoxPrivateContainer, as the
container may be deleted from outside QComboBox, as seen in the
tst_QGraphicsProxyWidget::bypassGraphicsProxyWidget() test, where
the QGraphicsProxyWidget proxies the QComboBoxPrivateContainer.
Pick-to: 6.6 6.5
Change-Id: I7590cc2821c73a6762f281504aa62f0c2b472252
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit fde358dd9069d0695f113ec6ba98efebedd1e520)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When fa296ee1dcf4c16fb6f242cf08949485e499fec3 ported this function
from int timeout to QDeadlineTimer, the need to keep this variable
outside the do-while so it could be checked in the loop exit condition
fell away.
Moving the definition of the variable to the first (and only)
assignment makes the code clearer and the variable a constant.
Amends fa296ee1dcf4c16fb6f242cf08949485e499fec3.
Change-Id: I7a0fe01dc68ff140beeb0e76b141c84d4bd28458
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit ef7b641a3cf267e256468f9a6269a9bcf7656aa9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make sure that plugin_init_target is not empty. It's empty when
creating qml plugins.
Amends 566b726b8400d473861a62b4b9de87d1f0958d6d
Change-Id: If23998d50d8d31e20b3966730afb8b4b46b9990c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit e7d7eded4ce64896d98dbc92ac1c1f21aae52b06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the Android View is resized, the QWindow instantiated by it
should be resized accordingly.
Task-number: QTBUG-122626
Change-Id: I7bfbca149f927718d1e28cdabfa8759afbd06039
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 7942f7eedf4a8d7fac82737ea490f3c443e82149)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt window loading is initiated either when the QtView is attached
to its Android window, or when the Android QPA plugin has been loaded
and is ready, depending on the order. Since the window attachment
happens in the Android UI thread, and the Android QPA plugin callback
happens in Qt thread, add synchronized block to make sure the execution
stays ordered.
Fixes: QTBUG-122626
Change-Id: Id476032f02aa8990432a02f62b6bf6237a17e7ac
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d899cdb3a4dc9eb1ad489f7541244110e7e80f61)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit 90bc0ad41f9937f9cba801b3166635f6f55e0678 ("QProcess/Unix: add
failChildProcessModifier()") added this line that set childStartedPipe
so that the failChildProcess() callback had something to write to. But
we left it set on exit from QProcessPrivate::startDetached(), which
caused the QProcess destructor to try and close it.
Noticed when debugging the issue for QTBUG-123083.
Pick-to: 6.7.0
Task-number: QTBUG-123083
Change-Id: I6818d78a57394e37857bfffd17bbc41c8400270f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 0f56502fb6f062c6d2308198c93412c34525125b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The SPDX database lists the license as 'Unicode-3.0', and 'Unicode
License v3'. Now, the SPDX standard actually says that
License identifiers (including license exception identifiers) used
in SPDX documents or source code files should be matched in a case-
insensitive manner.
But the website at https://spdx.org/licenses/ doesn't treat it this way,
so the link we generate out of the identifier actually gives a 404. So
it's just easier to use the 'original' capitalization.
Amends 063026cc503
Pick-to: 6.6 6.5
Change-Id: I826077a914721b7b9499ad62c08fdf20be94e88d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 39c4c868a4c1acb5cceb00418b2bb0ca3836d0a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some libs don't necessarily have the lib prefix in their names,
3rd party libs and Qt for Python might have that, so no need to
always add that prefix to loaded libs is the lib name already
contains a .so suffix.
Fixes: QTBUG-123286
Pick-to: 6.7.0
Change-Id: Ib65215d9b4410c5c9e00aa0642f48ab45c92fe03
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 4bb4d015f7e855015f8dc32d658518d5ec3556bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the \fn commands for a limited number of methods in the
documentation for Testlib and Widgets, `= 0` is passed as default
argument instead of `= Qt::KeyboardModifiers()`. Until QDoc with Clang
17, inclusive, QDoc generated the correct signature. However, with
Clang 18, QDoc outputs `= 0` in the documentation. While strictly
speaking still correct, this change impacts the documentation
negatively in terms of readability.
Dropping the default argument from the \fn command ensures that QDoc
generates the right signature with both Clang 17 and Clang 18.
Task-number: QTBUG-123130
Change-Id: I94ccec2f2c9a02241095fb5b18feb74aa55f97e1
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 08e6d4b43d7959e87c4bd6e13165025f24eafd13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We want to be able to pass as an argument whether the texture grabbed to
an FBO is supposed to have a flipped y-axis or not. This is required for
screen capture on the EGLFS platform.
Task-number: QTBUG-121835
Pick-to: 6.6 6.5
Change-Id: I6dddc879a4be7ff2c2c189747193423644be55a0
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit 342ae435a198acdd794e575dc54ccab1d33b320b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is sensitive for the 'include' calls that expect cmake scripts
to be found in some staging prefixes. In yocto
QT_ADDITIONAL_PACKAGES_PREFIX_PATH points to the package image
path(installation snapshot). If repo provides bundled 3rdparties
the 'include' statement that includes 'FindWrap<3rdparty>ConfigExtra'
is unnable to locate it, since it's expected to be found in Qt
installation, but the file didn't land there at ptest stage.
Fixes: QTBUG-122205
Pick-to: 6.6 6.5
Change-Id: Idd03f44efd2e3fdaa476873068c73ac28cd0a7b5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 8db0a12e84075e0e41f6a92027df74fe2b2d2182)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There were a few issues to deal with. One of them was that we would
print a warning about an internal error if we tried to *set* an error
on the reply after it had been cancelled. That's kind of unavoidable
since these things happen in different threads, so just ignore the
error if we have been cancelled.
The other issue was that, for a request with data, we will buffer the
data to send, and _only then_ do we start the request. This happens
asynchronously, so the user can abort the request before it has finished
buffering. Once it finished buffering it would set the state of the
request to "Working", ignoring that it was already marked "Finished".
Fixes: QTBUG-118209
Fixes: QTBUG-36127
Pick-to: 6.6
Change-Id: Idbf1fd8a80530d802bee04c4b0a6783cba4992d3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit be6644c1f254cce796c43d7c1eae3ae794bb77be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
I don't know what it is but it's not 1, because it is quite
often flaky in these tests. A single failure leads to deadlock
that takes 5 minutes to fail. Then a rerun might do another
5 minutes and fail the integration, or it will pass but take
longer to do so.
Pick-to: 6.6 6.5
Change-Id: I188276df7800b00a20dbe39edee91c582f0a82a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6aee3342e9d0829bb113583c2b6ecc6c94492d2c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For some reason android in CI failed to include the
moc file through the mocs_compilation file.
It's an issue that needs some investigation, but
in the interest of time just include the moc file
directly.
Pick-to: 6.6 6.5
Change-Id: I079588598a6f4137ef1fccc482795d703b59bc6e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit c468dfedd6413994a72c41a53eadd1944eb52e6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On 64-bit systems, both the requests.size() and the
activeStreams.size() were truncated to uint32_t values from int64_t
ones. While extremely unlikely that either will contain more than 4Gi
elements, avoid the truncation by verifying that the `max` amount of
streams is larger than the activeStreams, and then using size_t for
the range.
Change-Id: I50644cb634bab0f020acf9aea1d03744b11dbe51
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 22c99cf498103c86baa5a415ca34630396e5b6aa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because we will do a small wait after the final connection (to see
if there are any unexpected extra connections) we can save some time
by reducing _how long_ we wait for it.
In general we only need an extra long wait for the first connection,
subsequent connections are faster.
So we change the loop structure from looping until we hit 20(!)
connections, when anything larger than 6 will fail the test anyway!
And use qWaitFor instead of repeatedly calling enterLoop and checking
the state of an ElapsedTimer, the total wait time is not super
interesting, and made it a guarantee that the test would take 10
seconds.
While we are here, update the attribute we use to test HTTP/2
connections. We were previously enabling http/2, but this is the new
default so it's not needed. We do, however, need to enable h2c if we
want to see it trying to upgrade to http/2 over cleartext.
Not a big issue, so we don't pick it very far back.
Change-Id: Ia314ae2827ab8a8baaa4af2c5136c5e531bcb1f8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 8de1ed89797cabc883b5651673daa747f6ee9c0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Before the qWaitFor() port from int to QDeadlineTimer, the
implementation constructed a QDeadlineTimer internally, passing int
timeout and Qt::PreciseTimer. The int overload that was retained for
source-compatibility, however, constructs the QDeadlineTimer without
the PreciseTimer flag, which is a behavior change.
Restore the Qt 6.6 behavior and pass Qt::PreciseTimer.
Amends fa296ee1dcf4c16fb6f242cf08949485e499fec3.
Pick-to: 6.7.0
Change-Id: Ib8e5b912c74b70d32a77195edb0d2a30cd7c241d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 73c52ba2687c2035a40141f2a5236399f8331f4b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bindableproperties is the actual project, not a subdirectory with
separate examples. It should use qt_internal_add_example.
Pick-to: 6.6
Task-number: QTBUG-90820
Task-number: QTBUG-123096
Change-Id: I409d20e035956e6c236f84721b3c6882893cd547
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit a2e0f3dfbd9f54e20221dbc04360f838b5fa5343)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This merges the tempFile and caching tests, which had been updated in
commit ae03ffaffdcc8b2a0589b846e16ad016691dec29 to attempt other
filesystems than APFS and btrfs.
Instead of adding yet another item to the list (xfs), let's insist by
writing more and flushing the OS buffers. Local testing says that btrfs
usually updates after the first write(), no later than the second, and
that APFS and XFS "just works" now (without the fsync() even).
Fixes: QTBUG-123151
Change-Id: I6818d78a57394e37857bfffd17bbe7427307efc4
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 025c45d628ae42989f50df10ca6c75ad1007614f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The switch from <string> to <string.h> dropped the definition of
std::size. Include <iterator> since <string.h> is no longer used to
pull in std::size.
Amends: dc2ae08e02730ab795445bc047221aa56914f723.
Change-Id: Ib742538eb5d21c77fcae7ee9abb6d5329bbcfd63
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit dea548ef040c95d6fd6796051b12f148372b0f22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By using "wt" for all OS's; according to Thiago the 't' is ignored
everywhere except on Windows.
tests/auto/corelib/io/qfile/tst_qfile.cpp:2846:70: warning: comparison
between ‘enum QOperatingSystemVersionBase::OSType’ and ‘enum
QOperatingSystemVersion::OSType’ [-Wenum-compare]
2846 | const char *openMode = QOperatingSystemVersion::current().type() != QOperatingSystemVersion::Windows
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Amends 3446313c7a5cd6005089866a7b20c9f28e132a0a
Pick-to: 6.6 6.5 6.2
Change-Id: I310d7d6ce3833756ffdc47b000e052ef3afdfdef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d7340d5c31c8ce79724af9592453d3cf55262fa4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When building tests in-tree targeting iOS, we run
_qt_internal_finalize_executable via
qt_internal_add_test_finalizers.
This in turn calls __qt_internal_apply_plugin_imports_finalizer_mode
which tries to link to versioned plugin int targets.
Because the linked plugin init target is built in-tree as well, and
did not have versioned alias targets created, configuration fails
with:
Target "tst_baseline_qsvgrenderer" links to:
Qt6::QSvgIconPlugin_init
but the target was not found.
Make sure to create versioned alias targets for the plugin init
targets.
Amends 6c9f4f5ebcd35dc1a68c442d9fbf3ec48f30baca
Fixes: QTBUG-123186
Task-number: QTBUG-122181
Change-Id: I0048b724d465dc3c176d238d144feb072262d76e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 566b726b8400d473861a62b4b9de87d1f0958d6d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By just moving the handling of the child process' desired target
directory below the initialization of either the signal mask and PThread
cancel state, without that "return".
Commit 52ed6af5277100ed5b9a4f4231b94013ce539a2c ("QProcess/Unix: merge
some code from startProcess() and startDetached()") introduced
QChildProcess and merged the functionality of PThreadCancelGuard into
it. But it added that "return;" to the code path failing to opendirfd()
the target directory, meaning that the QChildProcess constructor could
exit without calling disableThreadCancellations(), but the destructor
would still run restoreThreadCancellations() every time the opening
failed. And we have tests for that: setNonExistentWorkingDirectory and
detachedSetNonExistentWorkingDirectory.
For the cancel state, the uninitialized variable we ended up passing to
pthread_setcancelstate() was probably harmless, because the cancellation
state is almost always active and the variable would have been non-zero.
And we don't test pthread cancellation, so we would never notice the
problem.
But commit bd32c7d7055b436b8c33486a5b5ce1c29db77fd4 ("QProcess/Unix:
block all Unix signals between vfork() and exec()") introduced a block
of the Unix signals with the same uninitialized variable problem. Unlike
the PThread cancellation state, the original signal mask would usually
be empty, so the "restoration" would actually mask signals we wanted.
And one such important signal is SIGCHLD, used by QProcess/forkfd when
*not* using vfork semantics. This meant that tests that had a child
process modifier (meaning, they wouldn't use vfork semantics) would end
up timing out because we'd never get the SIGCHLD that told us the child
had exited.
Fixes: QTBUG-123083
Pick-to: 6.7.0
Change-Id: I1362eb554b97dc012d02eab2dbca90b06728460e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 418dcf88f827effb2981dcd1699b395e2aeaac2f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Contrary to OpenSSL the new ciphers support in Schannel
would disallow all ciphers when the list was empty.
The pre-existing behavior was to use the default list.
Amends f7792d2b6d3d1e5dd47a8f6429b817b793bcfb9b
Change-Id: I0e79013ac86261c4afa4affb28cb1838177c12de
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 2d521002ca024b71525036a0a6f5d02bb09b3ed7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the styled check indicator is smaller than the one from the base
style, then the clip region was to small and the check indicator from
the base style was also drawn. Therefore add both check rects to the
clipRegion.
Pick-to: 6.6 6.5
Task-number: QTBUG-102820
Fixes: QTBUG-122821
Fixes: QTBUG-122825
Change-Id: I1b5b8d70d66475bbfa4a40652dc3fdd4cc670c32
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1ac58f4ba343d0de74cfc879a13a751bcb49c316)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Dockwidget title accelerators doesn't work in dock widgets, so don't
show them.
This amends cc67b25579c1bb5ea9f5c1ca4c9b7997e66f19b9.
Fixes: QTBUG-86407
Pick-to: 6.6
Change-Id: I83fb2da1304d1e2b5eedfc127e5db3d322756d06
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e68c3f025ecc7cf1fa86e5e773cee8d61a816f61)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QColorSpace::isValid() returns true if QColorSpace can handle the
profile. When called on a QColorSpace obtained via
QColorSpace::fromIccProfile, this doesn't necessarily mean that the ICC
profile itself was invalid; it could be that the ICC data was valid, but
QColorSpace didn't know how to use it. This is especially true on Qt <=
6.7, where only XYZ/RGB matrix profiles were supported.
We don't fully parse ICC v4, and we're lacking an API to differentiate
between "ICC data was valid but QColorSpace doesn't handle it" vs "ICC
data was invalid".
Still, an invalid QColorSpace will still the original ICC data, so it
can be saved again without loss of information.
So: 1) when loading a PNG with embedded ICC data, keep the loaded profile
even if it's "invalid"; 2) when writing a PNG, check if we have ICC data
to save, and unconditionally write it if it's the case.
This avoids data loss in the two directions.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Pick-to: 6.6 6.5
Change-Id: I1f27f603acbca1590c820e80f52f3b994f5ea5c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 003cef9d40f2e840f2690bd465994deaab5c2b95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 269187bfa272f9456aad6a6233100d846915f175 which added the sleep
but just loading the main library.
This commit moves the delay before any library is being loaded. Also log
the fact the thread is sleeping and advertise how to use the env
QT_ANDROID_DEBUGGER_MAIN_THREAD_SLEEP_MS variable.
Fixes: QTCREATORBUG-30425
Pick-to: 6.7.0
Change-Id: Ic1370e0b9fcce8c6074f768e5d94e5aa4a0a7824
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0804109d686e0a99ab0de0f1c70e3422183c6e98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some plugins may have dependencies on additional Qt modules. This is
handled by deployPlugin() function. Existing code does not look for plugins
associated with these modules however, because the loop iterates over
plugin directories only once. This change introduces an option that will
make windeployqt take into account all such soft dependencies by making
recursive calls to findQtPlugins().
Task-number: QTBUG-121583
Change-Id: Id6535426a47f9b92a3035e864dfdd7577b82c9ad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
(cherry picked from commit 5010eda5345bdbfc12e134d6fb3ae5b7370e2185)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When calculating atypical margins that are used with
ExtendsContentIntoTitleBar, the margins were checked against
systemmargins, and then custom margins were added later. Instead, add
the custom margins immediately and take them into account during
calculations.
Pick-to: 6.7.0 6.6 6.5
Change-Id: I44af663c85b8bdf080d769e3b38431cbe5df64f3
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 82e8f9e4571c50be476f8e38f9239c5b0c6be32c)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
On hidpi screens, the painted edges of the rubberband can extend
beyond the selection rect because of scaling. Extend the area to be
updated by 2x frame width, when the rubberband changes.
Fixes: QTBUG-113432
Pick-to: 6.6 6.5
Change-Id: Ie7aec1fefdc3fbf71c63952b693f462697adf849
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit a5a6b657a799cbed4567f60342714df52f9c8891)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These previously claimed that date-times with different date, time or
zone are different; as pointed out by Marcus Tillmanns, this is not
true. Corrected the documentation to talk about representing the same
moment in time.
In the process, renamed the snippet shared with several other docs,
since the snippet name only focused on the other part of what it was
saying.
Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-122973
Change-Id: Ifd74da84aad0b0dca688c131b6ae6a7b65633225
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cb5aac06cf7b3982a42004fd7455d78a3caba550)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The docs for ~QObject say:
> any pending posted events for the object are removed from the event
> queue
but then they also say:
> Deleting a QObject while pending events are waiting to be delivered
> can cause a crash
These two contradict each other. In fact, the first one is correct, the
second one is factually incorrect. Amend it to what I believe it's the
intended meaning: do not destroy a QObject which is _handling_ an event
(i.e. we're into QObject::event() or an override).
Change-Id: Id1d564f296e17a764e0f49ebfedf6e292085c221
Pick-to: 6.6 6.5 6.2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shantanu Tushar <shantanu.tushar@kdab.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 6e0c438a41a61a3d0a93954f00f46951c4399224)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Reduce the spacing between menu bar items and change
font size to 10pt.
Fixes: QTBUG-120639
Change-Id: Ic16e74f4a2426be6d6ef40904919d92785d96ce5
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit f75e554c6af7ea00bb5e6aa62a2af26350b67d98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The license test in qtqa reads this file
in order to check the validity of the license used.
This file reproduce the QUIP-18 [1] rules, with some exceptions.
Each entry in the file corresponds to a set of licensing rules.
A set of licensing rules can depend on the file ending,
registered in "file_pattern_ending". The last entry in the
file has no "file_pattern_ending", it sets the rules for the
files whose licensing does not depend on their ending.
The license to be used depends on the location
of the file within the Qt module repository.
Let's call this "<true_location>".
The "<true_location>" can also correspond to a file name,
offering flexibility for exceptions to the rule.
The "<true_location>" are registered in "location".
For each "<true_location>" there is a
"file type" entry and a "spdx" entry.
The "spdx" entry gives the rule:
the expected license tag(s) in SPDX format
for the file ending (if applicable) and "<true_location>".
The "file type" informs on the QUIP-18 type
the tested file corresponds to. It is purely informational
for the reader.
The set of rules are tested in order of appearance
in the json file. For this reason, a more constraining
ending (like "special.txt") needs to appear in
a "file_pattern_ending" located before
the "file_pattern_ending" of a less constraining ending (like ".txt").
Also, a file ending cannot be present in two "file_pattern_ending".
"file_pattern_ending" and "spdx" should list strings.
"<true_location>" can be regular expressions.
During the test the deeper "<true_location>" are
checked first. The order is which they appear in the json file
does not matter.
To test this file, run
QT_MODULE_TO_TEST=../qtbase perl tests/prebuild/license/tst_licenses.pl
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121039
Change-Id: I720800507622701b80c76e78e68817c6c39c2407
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit d5d1bfd8e87a718145d1d8e3161fdf44ed1a804b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
During QMenuPrivate::popup() and QMenuBarPrivate::popupAction(),
QMenuPrivate::popupGeometry() is called from updateActionRects() with
screen = 0 several times (from sizeHint() and various event handlers
triggered), which causes it to return the primary screen geometry
always.
To fix this for the non-QGraphicsView case, use the screen of
the menu when it is visible or the screen stored in a newly introduced
popupScreen member variable, which is set from a few places
in QMenuPrivate::popup().
Fixes: QTBUG-118434
Pick-to: 6.6 6.5
Change-Id: I6b18593d313719d628b0856004197ac59f46c270
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8cd7a3d4723ca414f3fe544704a0ccb752da94b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Example takes precedent over build system file type.
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
Task-number: QTBUG-121787
Change-Id: Id348a89884bb309b96abb31077f14a51086b5d0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit c2333f312ff05d592e44e8b10591e3568b8d9a26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all build system files
should be BSD-3-Clause.
The files in this patch are part of the build system.
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7.0
Task-number: QTBUG-121787
Change-Id: Ibc6a60a9b009fab0c953e8e3269533c121e4511e
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit bf1e76408e07ac175ee467c5095e88209d9a6ba8)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
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
Task-number: QTBUG-121787
Pick-to: 6.7.0
Change-Id: Icd5d5be2e04819617e68ff142924de1773bebbad
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 7b6289a0358274ec3c37cabd5b7d7212508a4e8a)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Qt Gui expects that the platform sends DPR update
notifications if the DPR value has changed, before
sending expose/paint events or delivering update
request events.
The most straightforward implementation is to send
the DPR update event unconditionally and let Qt Gui
determine if the DPR value has changed, especially
if the native platform does not provide DPR change
events.
Pick-to: 6.6
Change-Id: Ica7a24a458b3b01f1c7b2e1e09d342114dc71331
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit b8584173ab6a3fc4e034bc237b34f4968528b0f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In some rare cases it can delete the window before this is handled by
other calls, so rather than crashing we clean up.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Iddcd9890f0c13f4130626b0ed9c5b32f5890208d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b8f9a8681347476f4db1719b38a67d7f9d3c74be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QGS employs a call to std::atomic_thread_fence. Unfortunately TSAN does
not support it, and GCC >= 11 raises a warning. This breaks the build
when building under -Werror. Suppress the warning using the usual
pragmas.
There's a catch: qglobalstatic.h is built into a PCH, and GCC <= 13
will still generate a warning because of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431 .
Change-Id: I770f39b7563b66f483851444cd580bcafc5f288a
Pick-to: 6.6 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 143bcbb96f512d8e4014f0abba99f8e7a8729499)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This helps with the jdb debugging settling, and the native debugger
can hit breakpoints at the beginning of main() function or in case
of unittests at initTestCase() function.
By default in debug mode the delay is 1000ms. This value can be changed
with the environment variable: QT_ANDROID_DEBUGGER_MAIN_THREAD_SLEEP_MS
Fixes: QTCREATORBUG-30425
Pick-to: 6.7.0
Change-Id: Ica0c6080c55468579a28eecf8f45cff68d99c3a8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 269187bfa272f9456aad6a6233100d846915f175)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 68a4c5da9a080101cccd8a3b2edb1c908da0ca8e
In a case sharing QOpenGLContext,
offscreen renderings cannot get QOpenGLContext from Rhi.
Fixes: QTBUG-123005
Pick-to: 6.6 6.5
Change-Id: I9baae5e5c77878885f73ee39df5cd39117e8f1c2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 50c81f549030aba3c29f8cd161662b019028e91b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A QDialogButtonBox with the first accept button becoming default, didn't
explicitly set focus on such a button in a QDialog.
d44413d526ec12ed83acd7343c2005782178c7ad implemented this missing
functionality. It set focus to the automatic default button, unless the
QDialog had a focusWidget() set.
That has caused a regression, in cases where
- the QDialog has a QWidget child with a Qt::StrongFocus policy, and
- the QDialog is not yet visible, so focusWidget() returns nullptr.
Amend d44413d526ec12ed83acd7343c2005782178c7ad:
Implement a helper in QWidgetPrivate, that returns true, if a child
with a given focus policy is found.
Do not set focus to a QDialogButtonBox's automatic default button, when
- not located inside a QDialog, or
- a focusWidget() exists, or
- the dialog has QWidget child with Qt::StrongFocus, that is not a
child of the QDialogButtonBox.
Add an autotest function.
Pick-to: 6.6 6.5
Fixes: QTBUG-121514
Fixes: QTBUG-120049
Change-Id: I3c65ae36b56657f9af4a3a4b42f9b66e8bc5c534
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 78a3301372fb9b48dc65b18a19731db37abab75c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
std::move on const object is ineffective, and the code will
use a performance-wise costlier SMF
Amends: 0c05d2b43ec5ab29efc3db2718289a5600da754c
Change-Id: Id4a639d9a037c3f1d79ea60faa2715075462fea1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 68ae776e73881cbc160cd747e401631452e7f659)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The variadic templates are supposed to be removed from the
overload set when any of the parameters is a literal string type,
as otherwise we get conflicts with the legacy overload taking
class names and signatures as const char *. The detection of
a literal string types was missing a few specializations, so that
we ended up with the wrong overload being called, and class
names getting interpreted as method names instead.
Add the missing specializations, and add more test coverage
for using the old overloads.
Task-number: QTBUG-122235
Change-Id: I5488f2009c8f62d74fac6754844f57cf64011414
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Lauri Pohjanheimo <lauri.pohjanheimo@qt.io>
(cherry picked from commit 10afa38aa44231b3617984fdbca66d9699e2825f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Windows the "interface" is defined as "struct".
Do not #undef it to fix a unity build.
Task-number: QTBUG-122980
Change-Id: I9379c996d8b67b16a8b825af0ff3469111533291
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1e836fff18ceaea8331711708bdc3d8ea0cc051e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The existing widget machinery works through mouse positions. In order to
correctly update state when a drag moves outside of a window it needs
to see a move outside of the window. When the platform drag leaves the
window a move to the outside of the window is now faked to not keep the
layout in the hovered state of the last move event.
Fixes: QTBUG-122944
Pick-to: 6.6
Change-Id: I348f5281a200b78e6be4f11b3c25339d052783a5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d7fe948fdb79e919065875410dba14275a2a7478)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To not rely on transitive includes.
Change-Id: I116483f94bba4a6edb0a78941da676b1a3e6e1bd
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit a83248dd9fe9831c72c1781f465b74b6214832a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qt_add_qml_plugin has code to set a sensible install rpath for user
project qml plugins.
If Qt was configured without rpath support, we should not add any
rpaths to qt qml plugins:
- qt-computed rpaths added by qt_apply_rpaths
- user-project rpaths added by qt_add_qml_plugin
This is done by setting QT_NO_QML_PLUGIN_RPATH to TRUE as part of
QtSetup, effectively applying the option to any qml plugin that is
built by internal qt api.
User projects will still be able to use the default rpaths added
by qt_add_qml_plugin, even if qt itself was configured with no rpath
support.
Fixes: QTBUG-122687
Change-Id: I8178b527553dd00436d0abb3b44061ea16edc121
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 375f3869308fd01c276b17581ef827583550dba3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The check and variable name were incorrect after a refactoring.
Amends ba9623860056cbb75e426e27905f9c29b687cefa
Pick-to: 6.6
Task-number: QTBUG-84884
Task-number: QTBUG-90820
Change-Id: I33b6b81695a6352c7869ef6186e00881b47bd6f3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit aacc31815d40c8f5dbdd998536fb1fcd5f632221)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
P2447 has been merged in C++26, backport the same functionality.
This makes QSpan<const T> a proper replacement for a const QList<T>&
parameter, because now both can be built via a braced-init-list.
// void f(const QList<int> &l); // old
void f(QSpan<const int>); // new
f({1, 2, 3}); // now OK
This is, technically speaking, SiC: in the presence of both `f`
overloads, the code above would have called the QList one. Now instead
the call is ambiguous.
We've been there already -- this is QString and QStringView all over
again, and the solution is the same: get rid of the owning container
overload. I'd rather have this construction *sooner* rather than *later*
in order to minimize the fallout.
And just like QString vs QStringView, there's nothing really doable to
prevent instant-dangling situations:
QStringView v = getString(); // dangles
QSpan<const int> s = {1, 2, 3}; // ditto
except for using QSpan (QStringView) as a *parameter type only*.
Note that QSpan with dynamic extent was already convertible from
std::initializer_list through its ranged constructor. However this fact
alone doesn't unlock the above syntax. QSpan with a static extent was
also convertible for the same reason. (This is non-standard:
std::span's range constructor for static extents is explicit, but QSpan
doesn't follow that design choice and makes the constructors implicit
instead.)
Found in API-review.
Change-Id: I160ab5b292b0c2568cd9a7ad1b4430085f475c29
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 7f7b5ff3a1b617a3a1add1b1b6ad0718f0dcf143)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 7d18ad49a37440835bb38bd77bc4e0991387ada0.
Reason for revert: This changes the constructor from being a template
to being a normal function, so changes overload resolution. The commit
message gave no indication on why this is safe. Since it's just a nice
to have, revert instead of running the risk of breaking code.
Change-Id: Icd506e7221bb50c99f276f6a43c15403ec0be7a9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit ff7e5987ecdd09f87cfcdb4c42039214627dcdb6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't need a message like:
"Cannot load library nosuchlib: (nosuchlib: cannot open shared object file: No such file or directory)"
Change-Id: I01ec3c774d9943adb903fffd17b76599cea47502
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit a6a56814702612d8981f594a6158d70a7928cb99)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Specifically, don't use it for either of the x86-64 ABIs (LP64 and
ILP32). The generic case below should work for everyone.
Fixes: QTBUG-122720
Change-Id: I01ec3c774d9943adb903fffd17b75fc79095e089
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 24245d2a85cbcd503816027067aa72995e3ac2ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
...when not using atomic.
On the non-atmic path the fb is passed in to drmModeSetCrtc.
Here we need a new call to it if a new QWindow gets created
after the previous one is destroyed. Previously this was
not done, so it ended up with Device busy errors. Atomic
does not need this since there the flip commit always
contains framebufferPropertyId.
Change-Id: Ie68152cad50438807ef45adfba65e74c8f30c956
Fixes: QTBUG-122663
Pick-to: 6.6 6.5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 818f8de64a2b1a7371ecb4bdd527b05343190582)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The target wrappers for qmake and qtpaths do not work on Yocto
builds and only create confusion when they are available in target.
Add option to disable their generation.
Task-number: QTBUG-122420
Change-Id: Ibb829cc846ad6c470fe29e746ade42fccaa33a6f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 762c56d65bf2bf430621f6bed8f6d96ee333e718)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit bc3b18764aabf95a50a65e090863c54b6ac57e3e.
Reason for revert: QDeferredDeleteEvent changed the size in 6.7. It is
more important to protect the casual user that relied on the mention of
the otherwise undocumented class in the QEvent::Type::DeferredDelete
documentation than to be convenient for one tool, developed by experts
who know how to replace their dynamic_cast with a type() check and a
static_cast and/or extract information from an unexported class.
In fact, not even the autotest-export is needed, as there are no
mentions of the class outside of comments outside QtCore.
Found in API-review.
[ChangeLog][QtCore][QDeferredDeleteEvent] Made this undocumented class
private and unexported. You will still be able to see the definition in
qcoreevent_p.h, but you won't be able to create objects of the class
anymore.
Manual conflict resolutions:
- squash the tst_qapplication.cpp part of dev-only
13074a967f18ed348ab744f7ff831965607a6421 to avoid the linker error.
Change-Id: I8a47c69d356a0bef260e7987bc4eab96430e8072
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e06c67d448a6b4684d9787e9c18ec12f884b7063)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We used to look through the event queue in QCoreApplication::postEvent,
and if we found an existing DeferredDelete event for the receiver we
would compress the two events into one.
This was changed in 99b89d30fa5484c5d1f3cbda828648c28af4fb7d, as the
logic was causing O(n^2) for deleteLater, by using one of the bits
in QObjectData to track whether the object had already been deleted.
But it kept the logic for tracking this in QCoreApplication::postEvent,
and QCoreApplication::compressEvent would still do the work of deleting
the additional QDeferredDeleteEvents.
To avoid the unnecessary heap allocation of the QDeferredDeleteEvents
we can move the debouncing/compression to QObject::deleteLater().
We use the same mutex as in QCoreApplication::postEvent to guard
concurrent access to deleteLaterCalled.
A note has been added about the (preexisting) issue that the mutex
is not sufficient to prevent data races, as the deleteLaterCalled
flag is part of a bit-field, and we're not guarding any of our
other accesses to other bits.
As QDeferredDeleteEvents is private API, we can rely on no-one else
posting it than QObject::deleteLater(), which should be the case now
that tst_QApplication::sendPostedEvents() was fixed.
The documentation has been clarified as well. It's safe to call
deleteLater() more than once, but that's not _because_ other
pending events for the object are cleared. The latter behavior
is normal ~QObject() behavior. The documentation was probably
written at a point we didn't do any event compression at all
for QDeferredDeleteEvents.
Task-number: QTBUG-120124
Task-number: QTBUG-119918
Change-Id: I2a733095b7cb066ba494b1335aa40200c749cb0c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 13074a967f18ed348ab744f7ff831965607a6421)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The QHttpHeaders comparison was dropped earlier, and the current code
no longer needs to compare both header entry 'name' and 'value'.
Change-Id: I57a3003f0fd1d8ff867c970d5ec8a994a167ae88
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit c0e4b73743b9e9e8c3e116f9db9fe37bfcd89bf5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... from a performance point of view.
Task-number: QTBUG-122020
Change-Id: I8a1558a46e74d740e330ad483454267f9922a5d5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 9e26a8c0826f0914581c3e6f8e7970aed231c8e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This saves memory and can speed up performance with
well-known headers.
The change consists of:
- Change the internal type of 'name' to a std::variant
capable of holding either WellKnownHeader-enum, or a QBA.
- Accordingly, add an equality operator.
- When headers are added (append, insert, replace) then
use WellKnownHeader as storage type when possible;
either use the function parameter directly if a WellKnownHeader
overload was used, or check if the provided string can
be converted to a WellKnownHeader.
- Convert other functions to use a more performant
lookup/comparisons.
Fixes: QTBUG-122020
Change-Id: If2452f6edc497547246fb4ddbace384e39c26c5e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 0c05d2b43ec5ab29efc3db2718289a5600da754c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As a prequel to make subsequent diff on the followup
commit (std::variant/union) smaller
Task-number: QTBUG-122020
Change-Id: Iaa5dd794dc7a9e33c2c43e459bf5dbd19afb3ba1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit d3860b1b73799244f240dac8d03176636e367567)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This allows a more performant (O(logN)) lookup for WellKnownHeader
enum (followup commit).
The lookup table is currently crafted manually. It may in future be
generated at compile-time, but this should only be done if new headers
are appended often; we don't want to unnecessarily bloat compilation
time either.
Task-number: QTBUG-122020
Change-Id: I0329902b13128f03c358796d5cda7014b1e75057
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit dd3af7e4e250b69d200770a670c90b1bb4ca2198)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We are observing that the strings become sequences of zeros in
release builds, possibly triggered by qOffsetStringArray being used
in a static constexpr function to initialize a constexpr array.
Pull the array out of the function as a static on translation unit level,
which is a pattern we use regularly elsewhere in Qt.
Change-Id: I69c8cfe4e2d6d7d4659edda621ba1afe9768035b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 302823d73b8ca27e67e703de8316092d8b4d5715)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Try to avoid writing anything that the parser would misinterpret.
Escape pre-existing backslashes, but not those that are already escaped.
Optimize maybeEscapeFirstChar() slightly and apply it to every line
of output (except in code blocks), not only to new lines created by
word-wrapping.
Since it would be hard to do this without using regular expressions,
the markdown writer feature now depends on the regex feature.
Fixes: QTBUG-96051
Fixes: QTBUG-122083
Change-Id: I8d95366501fd31441829081c668f11a3a3a23fe2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit ca4774131b9b8ee40b4d7f5c1ba296af4700207f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The ones in qlogging.cpp were copied to it from qglobal.cpp in commit
23688d8942895507f4bc1517dd3c161134f4f9d0. They existed in qglobal.cpp
like in qdebug.cpp since the beginning of the public history. The one in
qdebug.cpp already made no sense in Qt 4 times, because qdebug.cpp was a
documentation-only source (no actual C++ code).
The #undefs from qglobal.cpp hadn't been necessary since commit
d394ca7f27197cfbfc28eb9a08eb0db261dd9d3d, the global functions qDebug(),
qWarning(), qCritical(), etc. were replaced by member functions in
QMessageLogger whose names did not match the macros.
Change-Id: I50e2158aeade4256ad1dfffd17b1c62f23eca4db
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 5670d5f7e1ed65b6d6158b73edc43111d7b8ca53)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The quotes should be around the whole file path, and not
just around the directory. Otherwise it can cause the
build to fail if Qt lives inside a directory that is
symlinked from a different drive.
Pick-to: 6.6 6.5
Change-Id: I46e23d4a78c807e6617224ce7faff96e6985f449
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 26f307ddb16563777bbd57ba1f29d656760c7ff3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Several of the cmake bat files sets "script_dir_path". The problem
is that those assignments are not local to the script files. E.g
when qt-configure-module.bat gives it a value, and then call
qt-cmake.bat, qt-cmake.bat will assign it a different value. And
this value will overwrite the original value in
qt-configure-module.bat. So when the call returns, that script can
sometimes fail.
This happens (for unknown reasons) if the Qt source code path
contains a link to a different drive, created with mklink /d.
This is typical if Windows is running in a virtual machine, and
the Qt source code is shared with the host on e.g drive Q:.
In that case you might want to a folder on C: be a symlink to Q:, in
order to build Qt.
This patch will make sure we add "setlocal" in all the affected
bat files, so that any changes done to e.g "script_dir_path"
stays local to each file.
Pick-to: 6.6 6.5
Change-Id: Iee18e06eb0beece0c85c4345d9bfc0194e466e56
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 458be44aebd441884502798c569cfcdfb06d15a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 1b429d6be42d4282cabed9119d6122061bc9fde0.
[ChangeLog][Potentially Source-Incompatible Changes][QtNetwork] The
enums in QNetworkInformation must now be scoped when used from
QML. The scope is no longer optional. Adding the scope is a
backwards-compatible fix.
Change-Id: I0855c0c2edd569f486b283b4671cdc3177cb7d3b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f9653c4ff25a6c7d78e0d5cf2782d4c78d16281c)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QDomText::splitText() needs to unref() the newly created QDomText
instance as it does not use it by itself
Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-40561
Change-Id: I593011b63c39f2310204d97ec61da7cf78a0fc14
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit de0230467c1f658232b101a99e62d68992173592)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends d1f40ea0873a36288c6493f1ed5c9952064b9144.
[ChangeLog][QtCore][QString] Removed undocumented internal, yet
public, isSimpleText() member function. If you still use it, you'll
have to write your own version outside of QString.
Change-Id: Iff8e4961542384890df42ef6b5f11106f2c606ec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 735d2d41c387bc408391bffad9167af412194cce)
This reverts commit c41733b06bd61d4710a9f6ec849f0d913c4497bb.
Based on the Grafana data, last flaky was August 14, 2023, and
the test works fine on local vm with stressed cpu.
Fixes: QTBUG-115598
Pick-to: 6.6 6.5
Change-Id: I634598d20a581d4d1443a3fd81e1e9481bfa2545
Reviewed-by: Inho Lee <inho.lee@qt.io>
(cherry picked from commit 4dca61cbdaf070e7789e71669f306042a0dd7fe3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
975c0bdf732ea7c5f7632913a27a1b6ae5cd5b26 has disabled usage of a resizer
on Windows. This has caused a regression, when a dock widget was
rendered frameless.
Use a resizer in that case.
Fixes: QTBUG-120694
Task-number: QTBUG-102196
Pick-to: 6.6 6.5 6.2
Change-Id: I9fbcb1a8b1d8869995093bc1da7524ec81e9f02d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 89fc58127d449cc2995879ff334567141e9c1d58)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Clang supports `__attribute__((fallthrough))`. While C++ sources use
[[attribute]], the C codepath still requires a fallback.
Change-Id: Iaa93d2debc21fdd34e414ddb024b95942ae9191f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 376ff95e9308b311038bb316ef36d04244d55b66)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was added in commit 75a2c81b0041df4ca59178cf52d9e5a8815f3524:
Handle posix_spawn using exit code 127 to indicate fail-to-start
Most posix_spawn implementations are done using fork(), so the only way
to report errors afer fork() is via a special exit code.
Support for posix_spawn was removed when we dropped QNX 6.5 support in
Qt 5.7 (commit 005a8bfbf0022f03dafafcf2b5c438ccf0675a49). Also
complements commit d012e953bfb498091c0ea9a83a717a3deffc670f.
Pick-to: 6.6
Change-Id: I76ffba14ece04f24b43efffd17aadead7c30146b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 75254e1d355b2eb33fece8bc1a468ce92ac65c7e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of going through the bit casts. Also solves the violation of
constexpr requirements from the previous commit.
Change-Id: I01ec3c774d9943adb903fffd17b8b6ee93d3c031
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 398a51686eda225f222d9df7ce56898c18ecdaa1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In C++23 with std::float16_t present (QFLOAT16_IS_NATIVE), the
_limit_xxxx() methods in qfloat16 need to set the native type, not rely
on the union trick because that isn't allowed in constexpr mode.
in ‘constexpr’ expansion of ‘operator<=>(Max, std::numeric_limits<double>::max())’
qfloat16.h:209:5: in ‘constexpr’ expansion of ‘compareThreeWay((* & lhs), ((double)rhs))’
qfloat16.h:209:5: in ‘constexpr’ expansion of ‘(& lhs)->qfloat16::operator NativeType()’
error: accessing ‘qfloat16::<unnamed union>::nf’ member instead of initialized ‘qfloat16::<unnamed union>::b16’ member in constant expression
Change-Id: I01ec3c774d9943adb903fffd17b8b6ceed6ef9e2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 48cd6867578ef372bbacb16081414b506cdb5b38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Regression after 9e78256579e8dc704066a98cb4816a1aab0e7e3b.
Apparently the string based connection syntax is more lenient,
as with PMF-style connects, we (correctly) get:
ASSERT failure in QWindowContainer: "Called object is not of the
correct type (class destructor may have already run)"
when the QWidget destructor closes the QWindow and we get a
synchronous callback from the platform that we've lost the
focus window.
Change-Id: I8f25b3b050e11913ec0f0941eaf831c88b4249f9
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 7ff1285e7a93d51e1f2a079ae33349906d9e9fea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some machine in CI is failing some of these sometimes and
I would like to know by how much.
Change-Id: I88b41d5cde81419f7c11f7038101962630eb31ef
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 8d6d7428f49d91600977ef5fbe01ed2117424e71)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current logic that we will disable the read notification if we
have any data at all doesn't make sense for users who use the
receiveDatagram functionality, since they will not make any calls
that trigger the read notifier to be re-enabled unless there is a
datagram ready for us to hand back.
Fixes: QTBUG-105871
Pick-to: 6.6 6.5
Change-Id: I0a1f1f8babb037d923d1124c2603b1cb466cfe18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b2ff0c2dc25f640a31fa170dd7cd8964bbcd51d6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It shows for example when starting assistant.
Amends 3379fd2322d112af4ef7ce75aafe18c27746acae.
Change-Id: I85196c62ff9d9caaa46a5279c3b965dc28266ba8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit af814d7d9d35405fabdf25e3e8f3a243d4d55deb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We should really try to avoid another
almost-std-compatible-but-not-quite idiom. When qIsConstantEvaluated()
was added, the rationale was given that this cannot be q20, because we
can't implement it in all compilers. But we can: returning false is a
perfectly legal implementation, and makes most users actually simpler
because the #ifdef'ery can be dropped.
There are only two users that still require the macro, because either
they do different fallbacks depending on whether the implementation is
trivial, or because they direct expected test outcomes.
The INTEGRITY compiler complains "calling __has_builtin() in a
constant expression", which we currently don't understand. To unblock
this patch, and therefore the 6.7 release, hard-code INTEGRITY to
return false.
Amends 95e6fac0a5a1eee3aa23e4da0a93c6c25e32fb98.
Change-Id: If6cae902ff434f2ccceb6057cb053b7f304a604c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 4b806d678e68c786f4be3809c72d396ae15bb04c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code inside the loop body uses it.next() twice, however hasNext() is
called only once; each call to next() advances the iterator.
Amends 4041610cb202699a47268975e5aaecaa1f182c0a.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Idb96cfbddc56e0d7ed38ab1b0279f40592c75175
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 56e151663ebfd4fc0876d33f22c81f0218339914)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Values in connection strings must be escaped when they
- contain a ; -> escape with "
- start with ' -> escape with "
- start with " -> escape with '
Fixes: QTBUG-122642
Change-Id: I1df638194067af5df94a34009e1547886fdf928c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 000d462bf93b21a9bbb46fdba631c09ba3eb9276)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add RAII SqlStmtHandle helper class to make sure the statement handle is
properly cleaned up also on early exit.
Change-Id: I7aba4472be1e2991f395eeb7e43f8dd272336694
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 4f4ac705f0f918a133a6ff676180e99307358823)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For accessing the RHI managed by the widget compositing machinery.
Pick-to: 6.6 6.5
Change-Id: Ia3c1227cc2d9cfebe95611cad3dbcd7aa6f6f8c7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f451b01791536fede40c8d4fb90799c2e23e9386)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In contrast to nativeParentWidget(), we return the closest widget with a
QWindow, even if this window has not been created yet.
Pick-to: 6.6 6.5
Change-Id: Icac46297a6052a7a5698d752d4aa871bd5c2bdd8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b571634172428263fa83ac733cf89e664bded014)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was added for Android in a4f50269f82695fbd0dd344f87b4b355feff4333,
for the case of QSurface::RasterGLSurface, but since 6.4 we no longer
use QSurface::RasterGLSurface for composition. And the Android usage
was removed in 2020ce5fd2478389c56f34742fdeee9cd24ca8a5.
Pick-to: 6.6 6.5
Change-Id: I8dafe959c54e09b3a974253e15d184365141d559
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f517e85e906bcfb59dd11d1fb4a1bea84afb1d9a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation already marks the class as preliminary, but mark
also with the new macro for that purpose.
Amends: b4c90582a2dee5c534361b3903611206305b03c3
Change-Id: Idcf022283bff04f4c4ee260180d3f5cfd0e80034
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit dad2a60128c586fc816dcb3b22858112ce3dfc2f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The earlier patch 4ae537e67c99160f5dcac99f40d03a7921456556 had default
behavior as opt-out for size policy of items within the layout. This
can cause a lot more UI regressions than anticipated and, so make it as
opt-in (Qt::AA_QtQuickUseDefaultSizePolicy). This means that the user
needs to explicitly set this attribute to utilize the default size
policy of quick items.
Amends patch 4ae537e67c99160f5dcac99f40d03a7921456556
Task-number: QTBUG-117597
Change-Id: Ibdb3ea9897c19792a110cbb15834b27383b9103e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit c606739ad1d5cf68449e61db751aa0c65cba3e00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The removed includes were needed when there were separate methods
for returning QJsonArray and QJsonObject
Change-Id: I5f08c4afd5487c5ca191ee813a3d94c4ae3b0f06
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit ab04dcca88f926b6512acb7bd108eccb100d3b2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We no longer use QSurface::RasterGLSurface for composition, so the window
will already be QSurface::OpenGLSurface during WindowCreationData::initialize.
Pick-to: 6.6 6.5
Change-Id: I9b5ea0245ddf4a19d165bde9ad6fd48a98bfca4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit dc5a29b3246d19bd620acc9fdaea929bf856d8dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The specification doesn't provide an explicit grammar, so I turned the
prose into ABNF for easier reference.
The goal is both to aid review of the validateSingleType() function
and to eventually use this to write a parser that doesn't use, or at
least limits, recursion.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I21f81aa83cde356ab48105ea98f066024e0b7b5e
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 476d2a7392ee26294d1230f0c5031fe6bb4a0f26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The "does not contain two slashes in sequence" condition reads a bit
unmotivated. It's easier written as "each part is not empty", so do
that.
Pick-to: 6.6 6.5
Change-Id: Ibb204429521910582bd8ee03ff54f72d7e15ce84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 63b52ba994ca9d9a0ceaeab465f64465b1fa137a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make sure this macro can be used in any documentation regarding the
Qt IntelliJ plugin for Android Studio.
Task-number: QTBUG-121447
Change-Id: I764cd91ea4c1fc7897a9243729a1c6c553739ada
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
(cherry picked from commit 2bae857aadaf9d0c67d9cba91f5f71805227f06d)
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Even though undocumented, it's public API, doesn't hurt to carry
along, and improves compiler coverage in the test, so let's not remove
it.
Found in 6.7 API review
Amends 95e6fac0a5a1eee3aa23e4da0a93c6c25e32fb98.
Change-Id: Ia935036a69e0e678f22ac86b48a2c1c5e8c46733
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 380c01bac545172624944e269214ba168e59fb3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If we see a closing tag that really demands a new block after it,
like </ul>, that needs to be done even if some ignorable whitespace
and "inline" tags come after it. Don't get distracted by those.
Also add a comment in QTextDocument::setHtml() to remind the reader that
HTML parsing is a two-pass algorithm.
Pick-to: 6.6
Fixes: QTBUG-81662
Change-Id: If723c9d3c211a684725055a06bcf87be4e38923a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 60aeeb0e92762d57c208e4212374d30be6490611)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Revert Windows global palette changes and set the QPalette for
QWindows11Style in QWindows11Style::polish
Fixes: QTBUG-120571
Change-Id: Iad4eb699c2dbfed38a917e6c9bc378c4262dc66e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 41854cfaac0fcd2c8f4386a46955716e652c4edc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Drop the templated executeRequest functions in favor of
qxp::function_ref for readability and type safety.
Task-number: QTBUG-122018
Change-Id: I36c07ff5fe6d2025459fe3f7190bc29901a320ce
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 3044a8ae274e579b4eab9c9564482314eb7e3f29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace if/else snake, made more complex by handling of QT_NO_*
configurations. Move the unconditional cases to the top, which also
fixes the handling of ShortcutOverride and ToolTip events when Qt was
built with QT_NO_CONTEXTMENU.
Change-Id: I1e2cc2c39e3cef9fe29a71e48595756cff0d2949
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 83f73df3e0e07242ce355fa12ae818fbb0ed6d03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QPlainTextEdit/QTextEdit, etc. never received ActivationChange
when used as child widget. Set palette to control on
WindowActivate/WindowDeactivate
Pick-to: 6.6 6.5
Change-Id: Iae75d9dcfba0c6171c556626551b37d4549006c7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 402cb510e1d40825d74447af831918f4a2a951f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QPlainTextEdit would crash when adding a string of 136 348 169
characters, due to the integer overflow checks being done with int
variables.
Perform intermediate calculations and size checks with qsizetype
instead of int. This commit contains a slight modification of the fix
contributed by Adam Clarke in the bug report. Note that the size check
casts to size_t to cover the 32-bit case where qsizetype is qint32.
Fixes: QTBUG-119611
Change-Id: I1cf7e1bc4c35276862f37aa6d01f37075fa11635
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 997fd3b88ede8078af286da6ecc197e83a8cbb46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the macro and set it to the current support range in 6.7 for
Android Automotive OS which is 10 to 13
Change-Id: I4342a42f5f56ab9731c969d9cbe0d4291ec3eaf4
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6164b17d226a4dd2099a852a6c34bae6fa19876d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both QByteArrayView and std::string_view are Literal Types, so the
conversion between them should be constexpr.
Amends 96d67da420697cee10bdc537a1a592f6f22e2b8f.
Found in API-review.
Change-Id: Ic513ce32aa2a743ca890dc05a683a62c0f3a7d50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit f9474364ee7ad3209873530b786bc6c081e1e2c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qt_ptr_swap is our swap compile-time optimizer. It's faster because it
hardcodes noexcept(true) and std::swap() must calculate it.
Amends 9ba5c7ff6aa42c5701cf950d2137467a2d178833.
Change-Id: I1b5a326276bd30638ac9b6dcf597abb5e53ada00
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit f70e113b2e895fb71db4ee6fb77a91f65e2deae9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code used unintialized construction followed by (move)
assignment to construct a QJniObject that requires a LocalFrame
object. That is two constructors and therefore one more than we need
(and need to destroy in inline code again).
Everything can be solved with another level of indirection.™
Since the LocalFrame needs to remain alive for the duration of
argument evaluation, the usual comma operator trick won't work. But we
can add a private helper ctor that takes the LocalFrame as an
additional argument to inject the object with the correct lifetime
into the ctor delegation chain.
Put the new argument in the front, to avoid clashes with the primary
contructor's trailing universal references, which might be a better
match than the new overload had we added the argument at the end. The
hope is that the compiler will avoid the ensuing register shuffling by
inlining the outer two constructor calls.
This brings the number of QJniObjects constructed down to one, as it
should be. We might also be able to remove the Uninitialized ctor
again.
Found in API-review.
Amends 62cb5589b3723fe8162e190cd54d9c78929b98d2.
Change-Id: I326187e54fd0705a1bbedb2d51d94a46b108a3c8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit ddaf7642828c970a69c995a606c5cb16e003c26c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Clang's `-Wimplicit-fallthrough` warnings are a little stricter than
gcc's interpretation:
switch (i) {
case 0:
foo();
case 4:
break;
}
While gcc accepts the implicit fallthrough, if the following statement
is a trivial `break`, clang will warn about it.
Change-Id: I38e0817f1bc034fbb552aeac21de1516edcbcbb0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c26994ff1551aa5450383cc51bed9b4d39f973f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The "HTTP RFC 9110 5.3 Field Order" states that the values combined
with comma can be followed up by an optional whitespace, and for
consistency recommends "comma SP". This is also what eg. 'MDN Web
Headers' class does.
Fixes: QTBUG-122650
Change-Id: I3391c86018090f0b8721929b64a7e3029e98ac85
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 1fbcb411e12047961dac157f5fbcd327e0a47833)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The method traversed QDockAreaLayoutInfo::item_list, to identify
dock widgets tabbed with the QDockWidget argument in a tab bar
It relied on bool QDockAreLayoutInfo::tabbed, which is set to true, when
a QMainWindowTabBar is to be added to a QDockAreaLayoutInfo. This flag
isn't cleared, when the second last dock widget is removed from the
tab bar. It can't be replaced by QMainWindowLayout::isDockWidgetTabbed,
because the flag also represents intermediate states, where e.g. a dock
widget is hovered over, prepares to become a floating tab and then rolls
back, because hovering doesn't result in a drop. In that case, tabbed
must become true, which the dock widget isn't actually tabbed.
Furthermore, the way to traverse item_list didn't find dock widgets
in a floating tab. In that case, tabifiedDockWidgets() wrongly returned
an empty list.
To fix both issues, refactor QMainWindow::tabifiedDockWidgets() to read
the list of dock widgets directly from the QMainWindowTabBar.
Add tests in tst_QDockWidget::floatingTabs() and
updateTabBarOnVisibilityChanged()
Fixes: QTBUG-122001
Pick-to: 6.6 6.5
Change-Id: Ia9eb3711be642101261f34ee447521cc6accc20c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit cd2a3e970aaeb8f5f92d9c6e52ede7a82f953150)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously, querying Qt::ImEnabled only returned the value of
isEnabling(), which is incorrect for edit widgets with read-only
properties set, as Qt::ImEnabled indicates whether text can be *input*
through the input method, which results in the IM being able to insert
text into read-only edit widgets.
The fixed version uses both isEnabling() and isReadOnly() values to
determine whether input methods need to be enabled. For some platforms
(like iOS and Android) that rely on IM to select text, a check for
ImReadOnly has been added to their QPA plugins to enable handles on
read-only input boxes.
At the same time, the imEnabledNotImplemented function in the test file
tst_qwidget was modified, since ImEnabling should give a _false_ value
when a lineedit is read-only.
Task-number: QTBUG-105009
Task-number: QTBUG-110838
Task-number: QTBUG-119182
Pick-to: 6.6 6.5
Change-Id: Ia2abcdb3200826d567f90447d4f8b71d0ef1fbf0
Reviewed-by: Yansheng Zhu <670429759@qq.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 70096b2bbd54d35518167cb41ea3576b992c3cda)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
androiddeployqt rules that support depfiles cause creation of rules that
interfere each other and cause the test build flakiness in CI.
This disables depfile support for ABI-specific external project until the
rootcase is found.
Task-number: QTBUG-122838
Pick-to: 6.6 6.5
Change-Id: I12e85f43494331c943c9b516d9494593facf9180
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 356b0aee0e93c9fc51e79faa8d6904bf4d5a6c27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That QString and QByteArray::clear() shed all capacity() is a
historical artifact we will fix at some point. Don't add more code
that assumes a clear()ed string isNull().
Amends 8af346c1f66f813c3c8fe4d8b892ecfbe96eacfb.
Amends 1d9137e13f9eb3f183c967e9e911c5b260f93dc0.
Task-number: QTBUG-31283
Task-number: QTBUG-60745
Change-Id: Ib0d929325088d3e8e119fee3eafa964a783dc8e9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 6c424dbcb0385a4b36835fc5103ca74c1044eccc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There may not be a checkbox when the helper is initialized, and
we want to support the case of a checkbox being added at a later
stage.
Regression from e5c40ec5c117376f401c01069f05780046d07094.
Change-Id: I397c3b3a101b249aab17804bd90085cfd4ab7dbb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f6d09a68f6fe7100bd1c6f6039db3832a9c5dce2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rename the toType() overloads taking an out-parameter to appendToType(),
because that gives a better understanding of the usecase.
Found in 6.7 API review
Amends 8af346c1f66f813c3c8fe4d8b892ecfbe96eacfb and
1d9137e13f9eb3f183c967e9e911c5b260f93dc0.
Change-Id: Ic1a462e9507123a59e6086bfb48b8b61ab79abb8
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ff034ebbfa7c1cc47cdcc15bc854972cd960db1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In 2022¹, we gave ourselves the rule to allow #pragma once only in
non-installed headers (examples, tools, snippets, ...), because the
same installed header may reside in different places in the filesystem
and #pragma once would treat these as separate headers, causing
multiple-definition errors.
Recently, the question came up: "What constitutes a public header?"
Non-_p.h headers in e.g. src/plugins/ muddy the waters here a
bit. Since #pragma once is forbidden in installed headers, I had the
idea to use it to indicate non-installed headers. This patch enables
use of #pragma once as a static assertion to that effect, should we so
choose.
¹ https://lists.qt-project.org/pipermail/development/2022-October/043121.html
Pick-to: 6.6 6.5
Fixes: QTBUG-122813
Change-Id: I3b5beef72e154cf5bf1ccd4b6f02df9680609e43
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 1c8884fc277c5916a420a3c14de68547a391f9fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When hiding a widget that has focus we try to focus the next widget in
the focus chain by running focusNextPrevChild. The abstract item view
overrides this to step the items but does not account for this hide case
which makes focusing not only not work, but also by hiding the widget
the selection in the item view gets changed.
Pick-to: 6.6 6.5
Change-Id: I29d40a1fb86ced60ec742b2753a87383846a89b3
Reviewed-by: Viktor Arvidsson <viktor.arvidss@gmail.com>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d9397479e6dfc2d7b73cab6dcbcda4cccdc20b8a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Language and some other improvisations
Fixes: QTBUG-120028
Change-Id: Id5a5544abf244de5cff83f0d795732595934bd36
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit d7b71294e8267123595593efca397151e4bf2595)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Do not allow replacing a state again if it is already being replaced.
Cleaned up from the patch provided in QTBUG-121126.
Fixes: QTBUG-121126
Pick-to: 6.6
Change-Id: Icca932b0e5cccd2f39ac18f29d8f7707887d147f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit f429f12a7fb94ef5970a28eaf0b53aea935044b3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When SQLGetDiagRec() does not return an record, the list of
DiagRecords might be empty. This will create an assertion when trying
to access QList::front() or similar. Therefore we need to check if the
list is empty before accessing it.
This amends 4ec5c0efc756a39162b43367438fee965c229ae7
Fixes: QTBUG-122073
Pick-to: 6.6
Change-Id: I6f421d82f9b6fdf84672d755cbbe8d2adec13266
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6287daaa20bfb306d1e2d87d67df961e1da2857a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We want to get rid of the QWindowPrivate::compositing member, as it is
no longer needed for the Android backingstore, which it was first added
for in a4f50269f82695fbd0dd344f87b4b355feff4333.
We can use textureChildSeen instead to check if we're compositing.
Change-Id: If85b21f92c8253bf89543a7e81e03730023f8095
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d31cc6dc7b1d1762990fdb70702981f73d060903)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These states have direct equivalents in AT-SPI, so map them
accordingly.
Fixes: QTBUG-119080
Pick-to: 6.6
Change-Id: I5a78a75d135a853b3773c34aa2a45c0791cefebc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit b2ec2e1137ceb0b83978a7fa35485b1b97c73648)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The functions are now on QImage, not on QtWIn.
Change-Id: Ida777c7fc087bf673c5305beffb498ada115ed73
Pick-to: 6.6 6.5 6.2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit b2c95e74a6ad97bdebd9d1fed8ffec065aba31f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It will be re-used in a subsequent patch.
Pick-to: 6.6 6.5
Change-Id: Ia58020a39440d5e583450f7adecf561f7267c403
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 74cbb1bbae718fce10b6ef1c882d74ffa4a2180d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 523cf066285a648b10b277bb1b3b2c7b9d66d464.
Reason for revert: To avoid QTBUG-122456
The revert is done for 6.7 only to avoid such regression before the
release, and that gives us some time on dev to find proper ways to
handle that, since the access restriction still makes sense because
QtNative wasn't proper public API that's documented to start with.
Fixes: QTBUG-122456
Change-Id: I2e175ba170df85b7537be20a8841407f1162c7ba
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Temporarily bring back the QtActivityDelegate.insertNativeView() and
QtActivityDelegate.setNativeViewGeometry() (replacement for
setSurfaceGeometry()) as they are still in use by the ActivityView
module of QtAndroidAutomotive.
They have been removed by 0a92d881bb91d3ff14187e7838af1cad9ad1070c.
Change-Id: Ia00407d827ca9217c9f49df55b4cf7001ac9871a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b42f174cd5be2014ae74453ab2d09742cc83fc36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Do it both for d3d11 and 12. Also add a bail out when presenting
to the latter (it is already there for d3d11).
Pick-to: 6.6
Task-number: QTBUG-109708
Change-Id: I6f8039bcf27fa20e4bebcdf01ac3feaa14249b4d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit c738a349d2d6fa27e994657ce38fe9027c96a251)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since the Android emulator on CI is running without hardware accelerated
graphics, showing the widget can take almost the same time as the timeout
for exiting the app with the "wrong" exit code 1. If running on Android,
increase the timeout to 1000 ms to avoid flaky failures. Un-blacklist
tst_QApplication::abortQuitOnShow() since the random failures are
taken care of by this patch.
Task-number: QTBUG-122693
Change-Id: Id52ae15b3ab2dbdaf4924b675276dfe3a4168585
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 32197e94d79f9bb00ddb9c294bd2711dba47d1ee)
All file under doc/snippet should be
license as Documentation snippets
and according to QUIP-18 [1]
this is LicenseRef-Qt-Commercial OR BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I76eedfb6b15c4091f726a5652e3530001d7cdaf7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1556a3a5eb13b05ccff5fb551ae9d72edb267e8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The handle is not owned by the Shell, we have to clear it up ourselves.
The documentation is not clear about how long the handle needs to be
kept alive, so store the icon when we create it as a member of the
private, and clean it up when it need to be recreated, or when the
QSystemTrayIcon instance gets destroyed.
Fixes: QTBUG-96348
Fixes: QTBUG-62945
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I6f93f29a415cde2cfe4e1b296295783c15b4da4b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit afb74a86d8cd1ac6463fa804300480967101d7d7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow up to commit 00d9a9a9b59650b8e297f91dcc600c377da5bceb - as
commented in the QTZ constructor, one of the reasons for the prior "is
available" check was to avoid creating TZ cache entries for it; so
have the TZ backend also (like ICU) overtly check for availability
before trying to find data for the given ID. This duplicates work done
later in the constructor, which can perhaps be optimised out later,
but is no worse than where we were before the commit mentioned above.
Pick-to: 6.6 6.5
Task-number: QTBUG-121807
Change-Id: Ie0571df2de2bf0a3f4ee767184e58b378e8cb05a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ec9ca7ac43cfebc74afc03de338f81a879354b2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace fence with pause in opcode form,
as GCC doesn't support fence operand.
Amends a7f227f56cfe562280e89d3c73040f7e8384129e.
Remove the builtin pause checking,
as in GCC13 this will always pass,
while the opcode pause works
regardless of the pause extension.
Task-number: QTBUG-103014
Change-Id: I26e3c3b9f7d234be24abe1570aaf4c8cb3a272b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 61bd614abea0cbff83595ebf31b0beeccaef5304)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently with have two base classes for COM-objects that implement
basic IUnknown functionality and the idea is to remove duplication and
keep just one. Since QComObject supports more features than
QWindowsComBase, such as multiple inheritance and intermediate interface
querying, we should switch to the former one.
Change-Id: Ief6567496de9f547b936de91d634c6998ba59a75
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4a705f5f29aa5ffce8db87fe54f7e70c08124d80)
On this ABI, pointers are 32-bit, so Qt::HANDLE (void *) is a 32-bit
variable and the "movq" instruction is inappropriate.
There's a GCC extended inline assembler modifier for the instruction
size suffix (%z0) but Clang seems not to understand it. Instead, I just
removed the suffix: we can do that because this is a memory load
instruction, which implies the destination is a general purpose register
(also required by the "=r" constraint) and therefore the assembler can
determine the size of the memory load from the name of the selected
register.
Note: I did not verify this compiles on x32 at all, much less that it
loads the right thing from memory.
Fixes: QTBUG-122674
Pick-to: 6.6 6.5
Change-Id: I01ec3c774d9943adb903fffd17b6513d146e89ce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 08349ef0fe3902504987d12ebe0ed9674ed1e486)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In reality I think it should be covered elsewhere, before reaching
the TLS code. But this is a simple fix to avoid an unnecessary warning.
This is actually quite similar to the resolution in
ef4ba0285f9c5dd5ee2dca1e0cefee45eba3477c.
Technically checking isWritable would be more correct, but Qt is usually
the one to open the socket, and we open for both read and write anyway.
Fixes: QTBUG-116550
Pick-to: 6.6 6.5
Change-Id: I4996b18b5b65c434d91543451186f335e201604f
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 74f16c0ed5f0e0bb05e8a9b40266524cec8e4257)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When adjusting handling for the special traling HEADERS with PRIORITY
case the actual no-headers case handling was lost.
This patch adds it back.
Now it deals with it being empty due to overflow or just empty headers.
With a real server this should never happen though, since they either
send the required headers or don't send a HEADER frame at all. So, in
theory it will not have caused a problem for users.
Pick-to: 6.6
Change-Id: Iacbb1183f26cb1f2e7e30ace6456488c4671972d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit a680838be4cf9eee44d7977722cd5acf3422f5ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As the comment says, on most RISC platforms, the return address need not
be on the stack in the first place. In fact, in all ones currently
supported by Qt, it's passed in a register to the callee, which has the
option of simply saving it in a callee-save register when calling leaf
functions. Even if it is using a frame pointer, the compiler can simply
use any register. That means unwinding the stack is not possible in the
absence of either debug information or stack-unwind information, neither
of which backtrace(3) will use.
Strictly speaking, even on x86 the compiler can use the RBP register for
any purpose and thus make getting the backtrace() impossible, but in
practice it seems to work.
Fixes: QTBUG-121389
Change-Id: I5dd50a1a7ca5424d9e7afffd17acbd01ef916f5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 03f1ea3dcb956c69216084d1df3a21f460c8475b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It can only happen on resource exhaustion, which is an unlikely
situation. That's probably why we didn't handle this case. But let's do
it now.
This necessitated that qt_create_pipe() return with errno/GetLastError()
properly set, so save it and restore around functions that may change it
(like qErrnoWarning()).
Drive-by update of some warning messages.
Testing this is not practical and is fragile, because it requires
causing the resource exhaustion problem.
Pick-to: 6.6
Change-Id: I76ffba14ece04f24b43efffd17aafe4f11f54c21
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b653e05c92dd137ca2994d9d97bea839ca9a5e73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
`autoRenderTarget` is a private bool that very much looks like it's
used as a Q_PROPERTY. Use QDOC_PROPERTY for it to generate warning-
free documentation.
Change-Id: Ia6255287f139ff23172c4fac96950e1a37eeef83
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 2fb8c2d5c331b1bc30a54e803e1cd17cf534fc32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
tst_baseline_painting and tst_qpdfwriter rely on QT_FEATURE_pdf being
enabled, without making it a condition to build the tests.
Don't build the tests with PDF disabled.
Task-number: QTBUG-122137
Pick-to: 6.6 6.5
Change-Id: Idbf03f30557618c83e946a80b7759cd4f6978ad5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 90a6415bedfc4ce1a934c3a36271b20c1a6a606a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The logic to detect color fonts in the GDI font database was never
implemented in the DirectWrite database, causing emojis to look
monochrome. The patch moves this into the font engine itself instead,
along with the other initialization code.
Fixes: QTBUG-122168
Change-Id: I6f5dad579bd987149e613b8071821aaf70a89bc2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6bd85d4a27ba2e934fa76a430f2e1d55c08d379d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since SQLite 3.31 there is a new open() option SQLITE_OPEN_NOFOLLOW to
disallow a filename with a symlink for security reason. Expose this
option to QSQLite via QSQLITE_OPEN_NOFOLLOW.
[ChangeLog][SQL][SQLite] Add new option QSQLITE_OPEN_NOFOLLOW to expose
open mode SQLITE_OPEN_NOFOLLOW.
Change-Id: I2d6218bde2bf8b4f1bc36125dffa551b52369072
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3379fd2322d112af4ef7ce75aafe18c27746acae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The various find() overloads that take a QRE *ignore* the case
sensitivity option set on the QRE object itself. They instead apply the
case sensitivity passed in the flags (see QTextDocument::find).
I think it was an historic mishap, but it's too late to change now.
Amend the documentation.
Change-Id: I526650d89a98777c7bb839b27d2f2e536a43ca4f
Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-88721
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
(cherry picked from commit 3ec9331c341767b1430eb2b14df02383226e25e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both qsettings.cpp and qjsonparser.cpp defined Space in the
global namespace. Hiding it in one of them in an implementation
namespace resolves the name clash.
Pick-to: 6.6 6.5
Change-Id: I8dd1244f80d87f3908597ed82c8e41b49b7b916c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4ff65f0e5615b1132ec13c6eeba3647162d8dd0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixes QTBUG-113255 by running graphics related actions also onPaused state when the paused app is visible. Also corrects possible other
problems where UI should be updated while app is onPaused state.
Fixes: QTBUG-113255
Change-Id: I02ee6b0713ec5f08ebba676c5edf94d2c1f81958
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b01a8075193afce3934f1ec436241784d9811bce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When 3446313c7a5cd6005089866a7b20c9f28e132a0a extracted most functions
from QOperatingSystemVersion to a new unexported
QOperatingSystemVersionBase, for BC reasons, it kept the existing QOSV
methods as (inline or out-of-line) forwarders to the new QOSVBase
ones.
But the only ones that are actually still required are currentType(),
type(), and isAnyOfType(), because their Base equivalents use a
different enum type (we should probably make the OS Type an enum in
namespace Qt instead; other patch).
The others can just be REMOVED_SINCE, and should be, to make new code
use the base class implementations, where inlining and constexpr
properly work (they don't, on Windows, in exported classes).
Re-use the existing REMOVED_SINCE(6,3) block in removed_api.cpp to
move these functions there.
Amends 3446313c7a5cd6005089866a7b20c9f28e132a0a.
Reverts a tiny part of 215677818470e48e9090d7ae4411e1fea62207b8 (will
conflict in backports).
Pick-to: 6.6 6.5
Change-Id: I1d7ba784634ccd7c9ba5f7ceddb15b7787468d31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1214edc0d94fd8b3c0d2660879d9175256c14bbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The method removed from QWidgetList widgets in a ranged for loop.
That caused items being skipped.
Create a new list by adding positives, instead of removing negatives
from the original.
This amends b1802a164b8682ed9e8956a5a19a90ade65c25d0.
Pick-to: 6.6
Change-Id: I3f329290187ddc76169ababe8ffa6059d953212d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 086897a1ae8e8d5bb1c1c1c18375eacba9ec97a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The order was wrong so we could have ended up saturating a 0
before we grew to 1.
Since this has never been in a release it is of no concern, and it was
already an edge-case anyway.
Amends 1090d5dd4ae5be898d4566314eda43b0283709d9
Pick-to: 6.6 6.5
Change-Id: I4b70f9018c3049697495a58313af148f8366c8bb
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 0d6b64bec6b555a6e534538a38d40259017f0de3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Looks better as the action in a text input field.
Change-Id: I63fd9b963102919cf69f345723d1c5d83778f1f4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Karolina Sofia Bang <karolina.bang@qt.io>
(cherry picked from commit d51a47c316dcaf65f9cb82babc9ccfcd5ba62310)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Vulkan fails when we attach a depth texture to a render target with
QRhiTextureRenderTarget::PreserveDepthStencilContents (we want to reuse
the depth data from a depth pre-pass.)
vkCreateRenderPass(): pCreateInfo->pAttachments[3] format is
VK_FORMAT_D32_SFLOAT and loadOp is VK_ATTACHMENT_LOAD_OP_LOAD, but
initialLayout is VK_IMAGE_LAYOUT_UNDEFINED.
The Vulkan spec states: If format includes a color or depth component
and loadOp is VK_ATTACHMENT_LOAD_OP_LOAD, then initialLayout must not be
VK_IMAGE_LAYOUT_UNDEFINED (https://www.khronos.org/registry/vulkan/
specs/1.3-extensions/html/vkspec.html#VUID-VkAttachmentDescription-
format-06699)
To fix this, just do the same as color attachments: specify a
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL instead of
VK_IMAGE_LAYOUT_UNDEFINED when the depth-stencil is preserved.
[ChangeLog][RHI] QRhiTextureRenderTarget::PreserveDepthStencilContents
now works properly on Vulkan
Change-Id: I0577bc8021b3598ddfdcea4af98aaef46e8a4519
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 9904686cf3e3fb59fa7839b2d16a6c78bb35bfa1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The newer D3D12 backend uses DXGI formats (for the texture, DSV, SRV)
that actually work. Backport these to the D3D11 backend. Otherwise
attempting to create a render target with a D24 or D24S8 QRhiTexture
as the depth/stencil buffer won't work.
In practice this is rarely exercised since the depth-stencil is
typically a QRhiRenderBuffer that maps to a
DXGI_FORMAT_D24_UNORM_S8_UINT texture but without
D3D11_BIND_SHADER_RESOURCE. Whereas textures get the latter flag,
and things break down. At least now the usage of typeless and
typed format is uniform. It could still be questioned if D24
should actually use R24G8_TYPELESS or if the original was fine,
but for now just sync with the D3D12 backend.
Pick-to: 6.6
Change-Id: I8a0564fc42a7866dae90f49f7b557c83dffc4d6e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 51106995cbf51af0c92b34119f6d254568a67540)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Rendering into a multisample texture (color or depth-stencil) is
supported, but the code only seems to pick up the sample count from
renderbuffers.
Pick-to: 6.6
Change-Id: I95a97debfebc7582f2026282384f6fb97aadfe23
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit ce54e07dacd99ae9d532b6398cdeedc287ee2743)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The special sizes NullCode and ExtendedSize does not need to be part of
an enum. Turning them into constants removes the need for some casts.
Task-number: QTBUG-119952
Change-Id: Ie7835c52f4642ab907b91f0eceac2ea7650e81da
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit fb81373313c4d1834437351aeb5df4a44303b93c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a space before the redirection operator, so that the '0' in
'-DFOO=0' after '%*' expansion, does not get squished with the '<',
effectively redirecting from '0>' instead of stdout.
As a drive-by, also add a comment why we need the '.'.
Pick-to: 6.6 6.5
Fixes: QTBUG-122622
Change-Id: I74ea3a1fe751cc1f2ad216b309f6b24d6d5f6b7f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0165a91bff80722d2384914dd40ca65a20fc1a47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix typo in 'application'.
Emphasize MAXIMUM_MEMORY.
Link to the latest commit of settings.js instead of the master branch,
so the link doesn't break in the future.
Task-number: QTBUG-121705
Change-Id: If4bbdcc4fa33d86a892c81dfd1d2703386a0035b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 3ec4a555599d352fa97272b8df612bf33e752878)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.6 6.5
Change-Id: I34f996b607b958d12607a94eb273bb1b406cca1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 00d9a9a9b59650b8e297f91dcc600c377da5bceb)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
And it should also apply to the promised streams, not separate ID tracking.
https://datatracker.ietf.org/doc/html/rfc9113#section-5.1.1
Change-Id: I6826a39c98f9b6a585200e628533843db731a85b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
(cherry picked from commit e247a6ce9ff83ef62424eef01d26cb752a4d2abc)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Not all xcb icons have a corresponding icon on all other desktop
platforms, so we might want to remove those enums for which we have
almost no coverage in a follow-up commit.
Change-Id: I8fdc64f773768ce4ed1e0050f2a3bddef976e688
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 72d129c45e92eb55c64a336bb60a1ebca471241f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 5b5f4344daa4df023007cd59efdf8f36b00bb150.
Reason for revert: Without the key being public, we would have to duplicate this variable in our application code when fetching the stored referrer.
Change-Id: I46ad3618da9912c41f8248f871c24dd41015af2b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 950998223b68a247ac96f7e3ef92db9f89bfec0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Of course, createSurface() is called more than once, for example
when coming back from the background, and you cannot add a View
to the layout more than once, since this leads to an uncaught
exception and a crash.
So add the QtEditText once, in the constructor, as is indeed
sensible.
Fixes: QTBUG-122648
Change-Id: I7ef48951cd8a1c99935f5e96c70b6dbf0c745803
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 211e51b81ec9800161d0a98c6f70c747701035e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A null view can not be focused.
Change-Id: I0564dd554a304e2e60e3ae83c4782ac348edcd9b
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 14851471eefb8708a52981532ebaeed87509381f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In order to use the same functionality from outside the class and avoid
reimplementation, moving the dpi minimum value check to functions.
Change-Id: I242b18fafab1b6283a46bda8b59e87adf50e5c0b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
(cherry picked from commit 7bbd39c4c9f345ae48781a212a6544e72757fd3e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a virtual destructor to this polymorphic class and disable copying
(requires to bring the default ctor back manually, and to export the
class nested in an exported class).
Amends 248d2103b5ef8f9cf8c1189cb67d78e1b6e741b7.
Change-Id: I9008e4ecebca34feac6ae92fa026f2673b652ba9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 02d7c8c069b93f7ddc1ccba462d8ff9ec3c1d806)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When 2e8a48c1cdc8547ec47f097a41dd53c641715b77 made
Annotations::mapped_type a struct Annotation instead of just QString,
it inserted the Annotation definition after the first inline user of
Annotations (struct Method).
I don't know why this compiled in the first place, but it did,
probably because of the re-parse-everything-at-closing-of-class rule,
but there's no reason to not move it to before the first users, so do
that.
Found while trying to make QDBusIntrospection a namespace instead of a
struct.
Amends 2e8a48c1cdc8547ec47f097a41dd53c641715b77.
Change-Id: I316cb5e49f3476adc5ff5abb023b9d74303ab640
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 448d4f847a263d88ee2149a728bcb390e15cefbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the QOSVBase we're constructing from isn't an actual
QOSVUnexported, the cast from QOSVBase to QOSVUnexported is
invalid. Instead of casting, add an QOSVUnexported(QOSVBase) ctor and
just call that.
Amends 215677818470e48e9090d7ae4411e1fea62207b8.
Pick-to: 6.6
Change-Id: I7352a044b62086585f1b036433f9b8779c77ac9d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit e3c831dc558de7e83c81fe09644db18013d5dd65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When 30a8e79243084017d23f1c765d5f1cbb86564191 added constructors as a
work-arund for an MSVC issue, the default contructor became deleted.
This hasn't caused trouble so far, as all users apparently pass a
payload object, but I'm about to merge a new user that doesn't, so
this came up.
Fix by bringing the default ctor back using =default.
Amends 30a8e79243084017d23f1c765d5f1cbb86564191.
Pick-to: 6.6
Change-Id: Iaf1a9536c2e0b24a62fdd55c837478a3450da38c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 1b89d747d7da7bffd515a5521e7dd5212c95f7af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The AND/OR combinations are not evaluated correctly. Wrap them with
parentheses explicitly to ensure the expected evaluation order.
Pick-to: 6.6 6.5
Change-Id: Ib2515ba85417b32cef3f799e0cb2c89d2c4257ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7ac969e1461478974f62a46a913d6cd2b34ed80a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Not really a common use-case and shouldnt be in images anyway, but
we have the code to support it, except it had a typo in it.
Pick-to: 6.6 6.5
Change-Id: I8585eaf7be82f13e61c94430743d765359fa48fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b697de79b041cd47e86b578a3a119fb3e7b62f71)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the intrinsics test failed, we never showed the failing build
output due to two reasons:
- TEST_x86intrin_OUTPUT was empty
- bracket arguments don't do variable expansion
Use the newly introduced feature in qt_config_compile_test to get
the output.
Replace the usage of a bracket argument with a concatenation of
regular strings.
Amends db342f42a4b00f858cb43328c9fdaff5fe2b5788
Pick-to: 6.5 6.6
Task-number: QTBUG-122596
Change-Id: I7cdef9a145ac64c8fced8add4879fa19b8bcd19d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9e9099865a0881ac5bb6035237e0a0c86962c45f)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The qt_config_compile_test command now assigns the build output of a
config test to the TEST_${name}_OUTPUT variable in the callers scope.
We can use this to show error messages, and it can also be seen in
trace files for better troubleshooting.
It works for all project based calls with CMake 3.16, but for source
code based tests, due to the usage of check_cxx_source_compiles instead
of try_compile, it will only work for CMake 3.23+.
Pick-to: 6.5 6.6
Task-number: QTBUG-122596
Change-Id: Ib9664c158ba9a391bd17bf30a28f9a34eba991d5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3334a77ecfb792fba0144e99887f11cd0fa2506d)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
They can be treated like QJniObject, but are not QJniObject instances.
Change-Id: I419b6d0493f9a0ad3dcc726d48ac4c9ad3e6bc19
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 77e00a4d08498285ea4273e01fda489ae6a7fd8a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QStringView::split() only returns an empty container if a) the haystack
is empty and b) SkipEmptyParts is in effect.
Neither is the case here: We use the implicit default of KeepEmptyParts,
and we've already checked that the haystack isn't empty in the first
line of the function.
So the result of split() can never be empty here. Remove the check to
avoid confusing more readers than just yours truly.
Amends the start of the public history.
Pick-to: 6.6 6.5
Change-Id: I423e747ae4de0708d063a6bb2befd625dbd5c591
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 05f9996bbf45fc90e49ea8c1679fa25201555860)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This avoids a warning with clang compiler.
error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
QT_DECLARE_EXTERN_RESOURCE(AusweisAppQmlModuleMoreView_raw_qml_0);
Change-Id: Id289080884ba2b017e884a15debfdd46102f1093
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 11259972a3c5d1918f889f145a1f223bf7d876a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This avoids -Wnewline-eof for clang compilers.
error: no newline at end of file [-Werror,-Wnewline-eof]
Q_IMPORT_PLUGIN(Governikus_AnimationsPlugin)
Pick-to: 6.6 6.5
Change-Id: I8de21f1f27cd177211ebf70fac0e01292cfa410c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit f926ccbf64791ded226da187674e7a5f6a40eca7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add missing \since 6.7, and document the purpose of each value based
on the description in the freedesktop specification.
Change-Id: Id88438abf152c317600454d7137a19b13aa0a3cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit b5a0db53b5eac7c0be8bc99ba79097608bf3e71f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The ThemeIcon enum provides symbolic names of icons for which most
engines provide an icon. We couldn't find a matching icon for several of
the XDG icon names, so remove those enum values for which we don't have
at least two matches.
Also remove names that are too specific for a desktop environment,
like icons for certain applications or system-wide actions.
Change-Id: I5a6c74256bda66d9fde7513f834a8361858605c4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 0de09beee54f715e4d2b1e739cf75c8c8d78db16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These TUs never seem to never have used QMap, QMultiMap or
QVariantMap, so remove the superfluous includes.
Amends ffa5820fa3bf8b28675129919d748373d6c77827.
Pick-to: 6.6 6.5
Change-Id: I3381fced294d7b99d3553d0efde38f20f01e4e97
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 7285fea9f3ba0824dbc12bb9de463f8e6ebd3c2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The referenced QString overloads were removed when
6bbfae9457248f1f65cf18f87ecc6ff66a6fdd70 ported from
QString/QStringRef overload sets to single QStringView functions.
Remove the docs.
Amends 6bbfae9457248f1f65cf18f87ecc6ff66a6fdd70.
Pick-to: 6.6 6.5 6.2
Change-Id: I766ad104f83aa19d90eeefe5b67524184869640a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 0be4e195fd9b20f33b70a8527cf581eff5fb7a84)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Do not add new paragraphs in the \value description,
which breaks the generated HTML table. Instead, use \br
more often to break overly long lines.
Replace 'option is only valid' or 'supported' by
'effective' and 'used'; if an enum doesn't apply to a
dialog or platform it will just be ignored, but it's
OK to set it.
Fix link to DontUseCustomDirectoryIcons enum.
Pick-to: 6.6 6.5
Task-number: QTBUG-119551
Change-Id: Iac86a85c7b3b402997fa14f4c4e2fa7111c62e9e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 8fd3f7e578ef65a77c4ba1ed981db98d99cd3e98)
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Don't return fixed square icon sizes from availableSizes(), respect the
aspect ratio of the input image we get from the system, and return an
actualSize() that fits into the requested size, but uses the image's
aspect ratio as well.
Reuse the calculation in the rendering code.
Amends 5b993fa8ede67871a8b2434505bc3c3d8bb906c6.
Fixes: QTBUG-121764
Change-Id: I672b90a1fbecb662fd6614dcfa5090e28b16f3c8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit 8a19f3c089deafa8a3a5fa5a05baa7ca01d8ec14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There were a few missing includes.
Change-Id: I352f4745a2691e96160408ab234a1ed8549f063c
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 9fe6190b5b609d7f69b61db4d4c77aad2eddf8ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All major browsers support webgl2 out of the box.
[ChangeLog][WebAssmebly] Default OpenGL ES version raised to 3.0
Fixes: QTBUG-110686
Change-Id: I875b55c2e0f6e955249f121d92214cf10ed416d7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit ee25bde3edf08e27efbb9619683ffb5517115817)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all build system files
should be BSD-3-Clause.
The files in this patch are part of the build system.
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I9a79fb04971b117515ed16b3978435ad8ef0e31f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 08b8f9dd2f3e792a6fb43b7e065a7123dff74313)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We assume that we can remove the variable handling and replace with the
warning, since variable was never out from TP.
Task-number: QTBUG-121706
Change-Id: Iee29c0b5327d62cd3d7e77419e14e555fadcec2c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit bb68cc5844b364987b4f8317ba2d4509b9253cf1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... to describe the comparison operators provided by this class.
Task-number: QTBUG-119433
Change-Id: Ifde49fb60aa50b733a35aa01c7a031b82fb06836
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4281495f52c22326ae961849d8ad7362c30168d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... to describe the comparison operators provided by these classes.
Do not remove the existing documentation of individual operators for
now, because the new commands do not contain any links to explain what
do the types of ordering actually mean.
Task-number: QTBUG-119433
Change-Id: I663b992377ea8b00ffa0c0a64da0733e3772d1dd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e766a338345a3ac00d9e6ae498353616dd5d4c77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Undef a macro that clashes with variables in other sources.
Pick-to: 6.6 6.5
Task-number: QTBUG-109394
Change-Id: Id62f886ad64908047fc896f7e48da04759308123
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 9362e4f3fa7c42b9d76fd5b4dd504e749b3bcaab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code assumed that the rounding of a floating point value, and the
rounding of the sum of that value and an integer, would always snap in
the same direction. But because of accuracy limits (independently
of the rounding function employed), that is not always the case for
fractions very near to .5.
Fixes: QTBUG-122451
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I0825d42e6be7f6e3397760a5e9be5dddca42dcdc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit a43d86fe1c0bc9d352f67c134a9ee5f754aea5e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all module files should be
LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
or
LicenseRef-Qt-Commercial OR GPL-3.0-only
LGPD and non-LGPL licenses should not be mixed in a
given directory.
The files in this patch are the only ones in their directory
with non-LGPL license.
The license is changed to that of the other module files
in the same directory.
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: Id58248a6f60438e01e77e9448f07e3057d173260
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0fd636d7cc4f9d50b1623e9374215a15640af5e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all build system files should be
BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I06880d91e4c6f8d7a92d249f3d216b2bc82fdeed
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit d478ca528511fcaa95491bcedaa259b2f6c5e727)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This way we can just pass the input delegate as the listener for
QtEditText when we create it, and having the listener in a separate
member doesn't provide a real benefit anyway.
Task-number: QTBUG-118139
Change-Id: I0125c87ecd39eed550a120ea8326d2c50a1b016e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0e95d3ab57f4f57e65f7bb6019064ce4e31135a3)
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
A macro to mark tech preview APIs, in order to make header reviews
easier:
* newly introduced TP APIs are clearly marked as such;
* an API that leaves TP and becomes stable requires to change the
header, and not just the documentation (and therefore will again
appear in the header review).
The idea is to use this macro as if it were a C++ attribute.
It can't actually be an attribute, because we want to use it to tag
e.g. macro expansions (like Q_PROPERTY).
Change-Id: I05c5a91a4fa5bedfbd1c6146d4dc00e1d1d28628
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 32a1151245034e4d5d3162df21518e38b6f81fcd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Apart from some source code reshuffling, 10.43's JIT has
dropped its support for ARMv5.
[ChangeLog][Third-Party Code] PCRE2 was updated to version 10.43.
Pick-to: 6.6 6.5
Change-Id: I7909f0a9358f38282f5eaeacd2eb10529b47e63c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 909d881e7539bc77ab79650782ae91372fb4ee83)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The fusion svg icons had some unneeded transparent objects which lead to
artifacts during png export/pngcrush optimization. Fix it by removing
the unused objects and re-export the pngs again.
Fixes: QTBUG-122272
Change-Id: I13c670a90e88dd31cb7a066c3565cf30c42e83b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit dfe5118f927a45c56d508ffa8662e05c2f99d68d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove m_ prefix from function arguments. Move constructor to be
the first method.
Change-Id: I8854c3964ccd609666d8bbae631e59bcaee768f3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit c545a3a086a6747b09ed8fffbcd85e0efeaa896f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously QtEditText input method hints, input type and caps mode were
parsed and set inside QtInputDelegate. Given these things are only
relevant for QtEditText and did not use any QtInputDelegate internals,
moved them to QtEditText.
Task-number: QTBUG-118139
Change-Id: I5162e890679f6e14adf42647572c0fb96ad451b9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 1ed1122fc3fb2c1cbdc3befec584e4e84754ef01)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
WASM projects failed to link on Windows if "CONFIG += silent" was
specified in the .pro file and the build environment did not contain
sh.exe.
In that case, QMake prepends "@echo linking && " to the link command.
The mingw32-make tool then considers this command as "complex command"
and runs it through either sh.exe or cmd.exe, depending on whether
sh.exe is found in PATH. If cmd.exe is used, the single quotes around
the ASYNCIFY_IMPORTS option are passed verbatim to em++. Then em++
thinks 'ASYNCIFY_IMPORTS=qt_asyncify_suspend_js,qt_asyncify_resume_js'
is an input file. That file is of course non-existent, and linking
fails.
Remove the single quotes around the linker option. They are not
necessary.
Pick-to: 6.6 6.5
Fixes: QTBUG-122192
Change-Id: Id362b51ac787f7f235bcb3d9102c5dee66ce5768
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9c56c1f7c2a9aa28eb800d16d783290ff4b55aa4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QTzTimeZoneCache::findEntry() function is always called with
QTzTimeZoneCache::m_mutex held, from its only caller,
QTzTimeZoneCache::fetchEntry().
However, findEntry() performs quite heavy parsing, reading
e.g. /etc/localtime or a file in /usr/share/zoneinfo/. These files are
larger than 2KiB file on my system.
Even though findEntry() doesn't touch m_cache during its operation¹,
it thus prevents other threads from looking up (and even parsing)
other entries in the cache.
A straight-forward solution is therefore to drop the mutex in
fetchEntry() for the duration of the findEntry() call² and then
re-acquire it for the final m_cache.insert().
This means, of course, that more than one thread could parse the same
file concurrently, and then one of the thread's result would be
discarded. Having the file already in the OS cache makes this probably
less of an issue than it sounds, but more complicated protocols are
readily implementable, should it become necessary. QTBUG-122138 has a
sketch.
¹ It's a static function, so it cannot access NSDMs.
² Incl. the heap allocation required to store the result in QCache.
Fixes: QTBUG-122138
Change-Id: If0cba6d041fb21a48cbde6b43190662a2c55cd25
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 039b2e4e5dca0fbf98a10fe548467034eeddf117)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It doesn't need access to the members, so making it static both saves
the implicit this pointer, and communicates to the reader that this is
function doesn't access other QTzTimeZoneCache members.
In particular, it proves that it doesn't really need to be called with
m_mutex locked, cf. QTBUG-122138.
Task-number: QTBUG-122138
Pick-to: 6.6 6.5
Change-Id: I28c99be8d066c1647aaf7aa256b6400a6dd92955
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7862453ba9cbcb601b9aad59dd821ae49661de4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Various functions in QLoggingRegistry took QByteArrayView, but they
continued to assume that the data was NUL-terminated (converting back
to const char* by calling data()).
Make sure only NUL-terminated strings are passed by taking in the
tranditional way, as const char*. Keep QByteArrayView when storing in
the map as key, to avoid comparing just pointer values (as opposed to
the string content).
Amends 806545fcc8d6b3b96a5191a00a31e9a39837189c.
Pick-to: 6.6 6.5
Change-Id: I232167d4c91070369e770c41d3ea53bd2406a03f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6b59ff573028eabba42ca63ce50ce05fa160ecaf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also de-duplicate the code by using defaultTypeFor() in singleShot(),
this way the comment and the calculation are done in one central place.
Change-Id: Ib822cae0e9228e546b664fbac728a60d65c4bbc3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit adc0920c48d812fb1b3e2b7bfc76217a7126a41e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code is in a critical section, so don't waste time traversing the
QMap twice.
Now that two previous commits have re-arranged the code such that
lookup and insertion are symmetric, we can combine them into a single
lookup using operator[].
Pick-to: 6.6 6.5
Change-Id: I4a10cece65b8c35d05a9b80967bf15d2e15bd73f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7192b1184190982b6422196121821838d9fcbba6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QXcbConnection::mousePressWindow() returns the XCB toplevel window,
which has consumed the window system's last mouse press. When the
function returns a valid pointer, QXcbWindow::handleLeaveNotifyEvent()
didn't propagate the leave event to QWSI::handleLeaveEvent(). Instead,
the leave event was ingored.
That behavior is correct, e.g. when a button on the main window is
pressed and the mouse hovers away from the button, with the mouse
button continuously being pressed. It is not correct, if the mouse
cursor leaves the main window.
=> Ignore the leave event only as long as the mouse cursor remains
within mousePressWindow()->geometry().
=> Deliver the leave event, when the mouse cursor leaves the window.
Fixes: QTBUG-119864
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I30a6ebedcd148285b9f17dfd87885ff67726b54c
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit ec24b36d3db82c340d9386951ea48c26f77c2923)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The media svg icons had some unneeded transparent objects which lead to
artifacts during png export/pngcrush optimization. Fix it by removing
the unused objects and re-export the pngs again.
Fixes: QTBUG-122272
Change-Id: I7e63ef53e5a78ce3a06c0053dea98e13c6ba264b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7a4b307210f2825f5f53b6d6f8537f27cc9659a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously the test consisted of just one cpp file. An attempt to add
more test cases to the file resulted in the minGW compiler complaining
about a too large object file:
Fatal error: tst_qcomparehelpers.cpp.obj: file too big
This patch splits the implementation into a header and a cpp file.
This itself does not fix the issues, but now we can add the new test
cases in a separate cpp file. This patch also adds some comments
that advocate doing so.
Change-Id: I451987370fa4e18b7ad81dfc064ea016f1d0da47
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit e26914fa0fe8b6bb2a045a8d37e1b73777a5e0ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Like other backends we should increment the invalid character count
when we output a replacement character.
And we should also output the NULL character if requested!
The downside here is that convertFromUnicode doesn't even have the
ability to do so. So instead I added a comment explaining why it is not
handled there.
Task-number: QTBUG-118318
Pick-to: 6.6 6.5
Change-Id: I57ba631aa59454e77007ab353277b7e8c2b5526a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 3c8d71796499a2ca641758dc1e9af4a778c8ef41)
Fingers in touch events are modelled by rotated ellipses with their
major and minor axes stored respectively. The axis is the diameter of
the ellipse in one direction, not its radius. These values should be
converted to a rectangle correctly, without doubling their extents.
The pair of this fixed code is located in function
QWindowSystemInterfacePrivate::fromNativeTouchPoints().
Change-Id: I4fea7e8168a9c248a744964d4821b774b85a6cf4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9a0098f4b34e88f28d3d5d6d88948dcf8606e7b3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
By failing to set the G_FILE_ATTRIBUTE_STANDARD_ICON attribute, the
"icon" returned by g_file_info_get_icon was always null and a
GLib-GIO-CRITICAL warning was output to the console (at least since glib
2.76.0)[1].
After adding the necessary attribute, the code was crashing, because now
a valid icon was returned, however the icon should not be freed[2],
which is why I removed the "g_object_unref(icon)".
Now it was no longer crashing, but the size of the icons was off. It was
passing GTK_ICON_SIZE_BUTTON (4) to gtk_icon_theme_lookup_by_gicon where
a size in pixels was expected. I chose 16 because that's the pixel size
associated with GTK_ICON_SIZE_BUTTON[3].
Finally I noticed the returned icons had the wrong color. It seems that
a GdkPixbuf uses RGBA8888 format[4]. Adding an explicit conversion to
ARGB32 made the icons look correct for me.
[1] ed8e86a7d4
[2] https://docs.gtk.org/gio/method.FileInfo.get_icon.html
[3] https://docs.gtk.org/gtk3/enum.IconSize.html#button
[4] https://docs.gtk.org/gdk-pixbuf/class.Pixbuf.html#image-data
[ChangeLog][Platform Specific Changes][Linux] Fixed file icons provided by QFileIconProvider when using the gtk3 platform theme.
Pick-to: 6.6 6.5
Change-Id: I312ef76ac28bc28435b756d299998485db122906
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 277d77029d7fe8f46c6ee101869dcff389426cb1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The previous fix calculated an icon size of 12 instead 10 for the icon
size when SH_DockWidget_ButtonsHaveFrame is set. This lead to a too
large icon. It was also rendered blurry because there was no native png
with 12x12 pixels so it has to be scaled.
This amends 04f4b27774ba70ebba425394fa8a1ffdffb2483b
Fixes: QTBUG-122214
Task-number: QTBUG-118643
Change-Id: Iaf332a21681e5b84222299d79d4b28d0c26b0cda
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 8eb599566ea983869298fe1f3362918bf0651f11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This allows switching focus between different Qt windows,
which combined with the previous changes enables keyboard
focus for child windows.
Task-number: QTBUG-118139
Change-Id: I4b237166dee264a22b2e3dd1ca4d82e0cfce376b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e703feea40108cdd11f8f0270cc82c2aa0e691cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In order to detect gaining/losing and moving focus between windows,
implement GlobalFocusChangeListener for the root View.
Add a surfaceFocusChanged native function in QAndroidPlatformWindow in
order to follow these focus changes.
Task-number: QTBUG-118139
Change-Id: Ia9bf6249c28a420f42793a9829aef31b12757630
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 2c192c6f5fe08b014bfa90ea0452258e649d3183)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Every QtWindow has its own QtEditText. QtInputDelegate
uses QtEditText from the QtWindow which has the focus.
QtEditText is a View class which handles the creation
of the input connection, and encapsulates other various
keyboard input related functionalities. Previously
we have only had one, which requests focus when the
software keyboard is opened. However, with the
introduction of child windows, it does not make
sense for all the windows to operate through this
one instance.
Furthermore, since it always needs to have focus
to be able to open the software keyboard, this
leads to a bit surprising behavior in the focus
chain if we want to make each window focusable,
not just the top level one. Having each window
have its own QtEditText makes sure when a window
gets focus, the focus doesn't leave outside
of the matching view's own scope, making it easier
to handle.
This should also make it easier to clean up keyboard
input related events tied to a window when that window
is removed.
Task-number: QTBUG-118139
Change-Id: Idd1a9407bc0c48660f2885d3bda28e46d42c08a0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f4050cc5ea7490ba3b8b2bb0a174559d7e72a27e)
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
The other files in this directory are non-LGPL
Task-number: QTBUG-121787
Change-Id: I9c319f723dafd7205029d7632c456412d1a3010b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 76a7057bf544e3b35a3b1d6e3cb3fc7be3c2036c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because there is no other way to stop it from printing the output.
Pick-to: 6.6 6.5
Change-Id: Ie6dcb393351f50691366849ba85d60e2e186f9fb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1dd89bfb04515bd2e431f8915256a417d622288f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all module files should be
LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
or
LicenseRef-Qt-Commercial OR GPL-3.0-only
LGPD and non-LGPL licenses should not be mixed in a
given directory.
The files in this patch now match the other files
in the same directory and QUIP-18 rule.
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: Ied60c775fbae38d6edeabc669f782b39d02c28f4
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 039d51835f4c2a3956e929f7ef7f525dccbd7fd5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both of these functions return a StringResult, which has no
StringResult::code member. Instead, use the existing
StringResult::status member.
Fixes: QTBUG-122254
Pick-to: 6.6 6.5 6.2
Change-Id: I0b9bfa1fc9a30e9c542ab90f3d8f4243bdeda762
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 57388179a41a169d4f6d65a385f605af31722bf2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Changing the focus object should update the VoiceOver focused element,
the same way we do it on macOS.
There's no NSAccessibilityFocusedUIElementChangedNotification on iOS,
but we can pass the focused element as an argument when posting the
UIAccessibilityLayoutChangedNotification.
The class method on QMacAccessibilityElement to get an element for
an QAccessible::Id was not used by any callers, and has been modified
to resolve the container from the QAccessibleInterface, so that we
don't need to plumb that all the way from the focus change event.
Inspired-by: Jan Möller <jan.moeller@governikus.de>
Fixes: QTBUG-114608
Pick-to: 6.6 6.5
Change-Id: I2e43ae649bc7e3a44c1e1200e8de66bf420b1949
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7a512d1267442e646bb7942291197b2b03f4d1cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We have explicit QFont properties, and QTextFormat::setProperty().
Setting FontFixedPitch doesn't necessarily affect the view (QTextEdit or
Qt Quick Text/TextEdit); and setting the font to the one we get from
QFontDatabase::systemFont(QFontDatabase::FixedFont) is also unreliable,
because the "monospace" fallback might actually be proportional.
QTextMarkdownWriter checks for both to decide whether to use backticks;
so markdown writing works if an editor UI makes the format monospace
both ways to be safe. But in the opposite case that the main font is
actually a monospace font, it's always been broken.
The rest of the QTextCharFormat properties are generally working, to
the extent that they are applicable to Markdown. But we lacked explicit
test coverage: so far we were just reading Markdown or HTML and writing
Markdown to test the writer.
Also amend an old comment about writing underlines: writing was always
possible, and since f5c7799f59ba53c634906b11e2135190093bf87b reading is
supported too. So the underline support is symmetric (except that we
don't heed the QTextDocument::MarkdownFeatures argument to the writer
ctor: we probably should do that some day).
Task-number: QTBUG-54623
Task-number: QTBUG-75648
Task-number: QTBUG-75649
Task-number: QTBUG-79900
Task-number: QTBUG-99676
Task-number: QTBUG-103484
Change-Id: Iacb4ed0ea59030570702d4eadfdadfad872065c6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bf8167c5fc513861ba9ecadf491db256de65eafd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Blacklisting items on the baseline server would avoid any mismatch
failures for such items. However, they would still be rendered. That
is undesirable if the rendering itself has unwanted side effects for
such items, e.g. crashing the test executable.
Fix by adding new functionality in the baseline testing framework to
allow checking blacklisting status ahead of time, and add a new macro
QBASELINE_SKIP_IF_BLACKLISTED to do just that.
Add usage of that macro to the QPainter baseline test.
Pick-to: 6.5 6.2
Change-Id: I35f6df8cff2c6cb985c25ab5470cd42b53d44940
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 4449dbe73704e328c4645f1e9ae7455622b8968f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If there's no QLibraryStore::instance(), then there's no LibraryMap,
so no need to construct a mapName we know we'll just throw away.
We must keep locking the qt_library_mutex to check instance(), but we
can drop it immediately if we find there isn't, and construct the
QLibraryPrivate object outside the critical section (the hope is that
the compiler sees this as an opportunity to tail-call).
The final goal of this exercise is to get rid of the double-lookup in
LibraryMap.
Pick-to: 6.6 6.5
Change-Id: I181dd2657e831a37e2d6f1c5d4df7e2a25ac48cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c9b967437df344b5fc95121a3560a34bf352c696)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QTZP base implementation of the availability check was to
construct the list of all available IDs, then see whether the given ID
appears in it. This can be very inefficient. The ICU backend has
recently grown a more efficient solution than that, matching the TZ
and Darwin backends. For Android this was still very inefficient, but
its instantiation is cheaper, so simply instantiate and see if the
result is valid. For MS, the backend caches the list of available
zones, so searching the list is a reasonable solution, given the
complexity of its constructor.
Add an implementation for Android and document, in the base-class,
that the fall-back is only suitable for use if the list is cached.
Pick-to: 6.6 6.5
Change-Id: I9dc2ba4be1492ec811c8db6cff9490ac0303115d
Reviewed-by: Volker Krause <vkrause@kde.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 7c502391cf73e3fa5bc02ea0b46261f0b5be0b84)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make sure not to set the AUTORCC_OPTIONS property on INTERFACE_LIBRARY
targets, because it's not allowed with CMake versions lower than 3.18.
Amends 329dbfcc78d067d26b5a4dd99f4284900fd68f2c
Pick-to: 6.6 6.5
Fixes: QTBUG-122266
Task-number: QTBUG-106466
Task-number: QTBUG-101353
Task-number: QTBUG-121948
Change-Id: I9ab606c0b11e2b4f8689e0bde9c001f59c81fa42
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit b3cc89e81c149533e279df2442a79cc1dfce9ec5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A QWindow can have a requested target color space via its QSurfaceFormat.
This allows users who know what color space their source material is in,
or who do their own color matching, to ensure a consistent target color
space.
In the past we plumbed this to NSWindow's colorSpace property. This meant
that you could only have one color space per top level, even if child
windows were in play, and we could only set the color space if we were
the ones creating the NSWindow, failing the color space request in cases
where the window was embedded in a non-Qt window hierarchy.
We now store the requested color space in our QNSView, and propagate it
to both the IOSurfaces we use in QCALayerBackingStore, and to the view's
layer, in case it's a CAMetalLayer. We also pick up any changes to the
backing properties of the view, and ensure we update the color space
accordingly.
We still propagate the color space to NSWindow, as for OpenGL we don't
use CAOpenGLLayer (which has a colorSpace property), but instead use
NSOpenGLContext. This is not something we're going to change, so as
a workaround we set the NSWindow color space, which does affect GL
drawing via NSOpenGLContext. The granular color spaces we set on
the IOSurfaces and CAMetalLayer will override the NSWindow state.
Change-Id: I5d9765d95140b8523ee09f70ff09a8c9400ffdc7
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
(cherry picked from commit ef378898454964ce4d66d2656d2d5e4c7ac69b22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test is a bit silly, it was originally written to make sure that
we produce meaningful errors when trying to connect to a proxy server
where the connection is refused or the server doesn't respond at all.
To test that, it creates a local QTcpServer and starts listening to any
free port (by specifying port 0) and then it closed the server and
uses the address-port of localhost:serverPort as the proxy to use, since
we know it _was_ unused, since we were able to bind to it.
However, just calling close() doesn't immediately tear down the internal
socket descriptor, so the OS may still have the port reserved for
some time.
By moving the QTcpServer to a narrower scope we will quickly destroy it
and the internal socket engine, which is parented to the server, and
this in turn releases the socket descriptor.
Pick-to: 6.6 6.5
Change-Id: If12128fc21d1f545df152f08f0d52c1b14ac6037
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 775a57f26682867e183d26863d85eb22a563cdbd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There were a couple of errors when calculating advances
in the DirectWrite font engine: First of all, we would
apply the CLEARTYPE_NATURAL glyph metrics when using
GDI_CLASSIC rendering, causing text to look compressed
in some places, because we always passed TRUE for the
useGdiNatural parameter to GetGdiCompatibleGlyphMetrics().
In addition, we would pick the GDI-compatible metrics even
when design metrics had explicitly been requested on the
layout. This is the case for distance field rendered text,
which always operates with design metrics and scalable
layouts, so it was visible as kerning errors on some text
there.
Pick-to: 6.6 6.5
Fixes: QTBUG-122139
Fixes: QTBUG-122167
Change-Id: Ic28da6b3235d7af0452bdcb836e037594f8a20ba
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
(cherry picked from commit de3d5dd73b748bc1591447fe81dff6427a86f77b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and use that in QVarLengthFlatMap's definition in lieu of a magic
constant.
Amends d4611ba3a5b46ee790e6c790ef6c3d771d3507ee.
Pick-to: 6.6 6.5 6.2
Change-Id: I369f31b643789075ef6c14669b8b794ed0b3bbb1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c30195a95e751552a39f99dd5833ebf722d11bc1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The requested icon might not be square, so fit the image
we have correctly into the requested size.
Fixes: QTBUG-121764
Change-Id: I877dedf5aa779cd82a75a1a49b26c08e3cea6163
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 5b993fa8ede67871a8b2434505bc3c3d8bb906c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In icon mode, the name of the icon gets truncated.
Change-Id: I8e2081a68006907ae916c8e8fa1aeb6006acbc6d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 477381993a3899c73e240e0fb2dc2b9f67f8cb63)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Drop link to non-existing documentation.
- Reorder links such that the target becomes the text and vice versa.
- Use correct link target names.
- Add missing qttestlib doc project dependency to qtwidgets.
Change-Id: Iaa0ea7b22326c82271b14b17c4b78c3a25a834f1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit f157422c58475b3b818b0dddc31289e7105967c2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The first time ensureRhi() is called we don't have an RHI yet, and will
adopt the top level's repaint manager's RHI. We need to register a
cleanup callback for this RHI, so that if it goes away, we will
reset our RHI pointer to null, just like when we switch from one top
level to another (and get a new potential RHI).
Without the reset, we would be working with a stale QRhi pointer,
which we in most cases updated via a call to ensureRhi(), that
picked up the new QRhi, but for good measure we should reset it
if we can.
Change-Id: Iac6d8787b636675bbcb4358e8f0baad26187b0e2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 986f8b361ce9d6163f6ef691cad7b2955dcfe5cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were handling QEvent::WindowChangeInternal, but based on what the
code is doing, what the comments say, and what QQuickWidget does,
the right event should be WindowAboutToChangeInternal.
This fixes a crash when reparenting a QRhiWidget into another widget,
where we could call removeCleanupCallback() on an RHI that was already
gone.
The fact that we have a stale RHI pointer at WindowChangeInternal time
is still problematic, and caused by our call to addCleanupCallback not
happening as it should for the first call to ensureRhi(), but this will
be fixed in a follow up.
Change-Id: I054120e97a24a1f74af44b2d251470792f03f7f3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 6fbbbef260cf71fee05d9e816c069964c6f0b92c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The value of QT_DEPLOY_QML_DIR was never passed to windeployqt.
Pick-to: 6.6 6.5
Fixes: QTBUG-121881
Change-Id: I993793f74d84ccb0e7c2deb72b1e33e81692ecbb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 527b9da5388a3cccb81706becbd8e40977d5db11)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As we did for convertToUnicode. To support more than 2Gi input, we
need to handle the input in chunks because of the `int` parameter in the
Windows API. Testing also revealed some corner cases we also need to
handle, which is mostly happening when there is an incomplete surrogate
pair at the end of the current input window.
The test takes between 3 (plain MinGW) and 8 (MSVC with ASAN) seconds
to run on my machine.
Pick-to: 6.6 6.5
Fixes: QTBUG-105105
Change-Id: I4fb0420b88ca41dfa8b561a35c6d96659bd81468
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 496340f33ad48738d1595c5c4048e4a05819786c)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
As we did for convertToUnicode, we do some smaller changes, like
increasing indentation, and switching to using pointers and calculating
the input-size in this commit, so that the real changes in the next
commit are (hopefully) easier to read.
Pick-to: 6.6 6.5
Task-number: QTBUG-105105
Change-Id: I3bf1a487f63a3e24efd7a945152647dd8fc0aca8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit cba0efc2705af1ef027603f7ee4cb60f184412d8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To properly support more than 2Gi input we have to support being asked
to resize more than once. Previously we would only have to resize the
one time because we went from our 4K stack buffer to the final size
heap buffer. But now, since our input size can only be specified in
int, we have to deal with looping over the input and resizing the buffer
as needed.
We also have to deal with trailing data at the end of our sliding window
potentially causing issues for the encoding. So we try to shrink our
window when it causes issues, or store the trailing data for the next
call.
The >2Gi test takes about 6-8 seconds on my machine.
Pick-to: 6.6 6.5
Task-number: QTBUG-105105
Change-Id: I9a44b8f379bf2c2c58183f961544ed2f4c8c7215
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit a7171c62569ac2005560131a17515bb6841e9b98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We will need to potentially grow the buffer before appending anything
to it, because if we pass in 0 as a size then the MultiByteToWideChar
just returns the size we would need. If we didn't intend to do so then
we would increment our output buffers even though nothing is written.
And when appending single characters (like the replacement character
for an invalid sequence) we need to grow the buffer as well.
We'll need this all in the next commit.
Pick-to: 6.6 6.5
Task-number: QTBUG-105105
Change-Id: I94b9a0f7d18a725da01a47398163e6d0f704eefc
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 1090d5dd4ae5be898d4566314eda43b0283709d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If it wraps, the text on the next line is no longer part of the heading.
Fixes: QTBUG-106526
Change-Id: I8015c948d875c6944422ef3439e3128af5b2a2e2
Pick-to: 6.6 6.5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 65c40290b488395ee7c1fdfabc4d274889d9afab)
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
If we need to word-wrap a paragraph after a long formatted span,
write any ending markers before the newline (amends
280d679c556ab8ead4748a627d7cd4c1950027fb ).
Break before a fragment if the whole thing is past the column limit;
in that case, write out any ending format markers before the newline.
And now we have test coverage: prepend characters one-at-a-time to a
line that already has a two-word formatted span at the end, and watch
it successively break after the span, in the middle, and then before,
while never putting a newline before the ending markers or failing to
write them.
Fixes: QTBUG-116927
Change-Id: I140e10d19a491cb599bf7ecf8514af866b5383f3
Pick-to: 6.6 6.5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 908fc2e72b34073dc42ce0f2d6f7cc5adc9651d9)
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The method takes an std::function as a parameter, so it makes sense to
pass it by value to avoid copying when passing lambdas.
Amends bd78047df34fda3a56b8db069fc97280831ac696
Found in 6.7 API review
Change-Id: Ic0608a176bfd26b5b44fae48f29d84737e81a413
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit c5d0345c3d6177105c2a6cbb2f99ab6c64d333a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QObject::startTimer() returns 0 in case of failure, for example when
someone tries to register a timer with a negative interval.
However, QTimer internally uses -1 as an invalid timer id.
This could lead to a situation when the timer was not really started,
but QTimer::isActive() returned true.
This patch fixes it in two ways:
- check the return value of QObject::startTimer() and treat 0 as an
error.
- do not treat 0 as a valid timer id when calculating the active state.
As a drive-by: move the `using namespace std::chrono_literals;`
declaration to the top of tst_qtimer.cpp, so that we do not need to
repeat it in each test case.
Fixes: QTBUG-122087
Pick-to: 6.6 6.5
Change-Id: I0e21152b2173ebb5fb0dada1b99a903a321ca9c4
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 612b67cf13cedb832e082308b620f948377ddf21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Read buffers are not automatically synchronized when the
buffer uses MTLResourceStorageModeManaged. This commit adds
GPU to CPU synchronization for managed buffers, ensuring
proper data transfer for reading operations on non-Apple
Silicon devices.
Fixes: QTBUG-119447
Pick-to: 6.6
Change-Id: I6398f4f27d00950c7dceae918b04e0054d4b5647
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit f21af7f88b2184a420293967d07bf6552541ddc9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I701e707447ca68977bdd80662200eb0c36545dbe
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit ee8822168ce15764693cb4600f445e0605ce0e9a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Split the header copy custom commands into two blocks and add
<module>_sync_headers_fw_copy target that is responsible for the copy
of CaMeL-case header aliases. For the Ninja generator we leave the
file-level dependencies between the <module>_sync_headers_fw_copy
target and header copy commands. For the Unix Makefiles generator we
put the command directly to the target to make sure it's executed by
make.
Also add the explicit commands for creating the output header
directories.
Fixes: QTBUG-122200
Pick-to: 6.6 6.5
Change-Id: I71ba716d17a879f20ae0869cf2257d246ac17eff
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 103eca1070a75bfa97d0b72b94e0c759ef0bcd1c)
The format of QImage is not considered upon texture loading,
it should be documented.
Pick-to: 6.6 6.5
Change-Id: I795c8a82a71ecdba5407f7e4ce940f7d538ff924
Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit f2957e463362b307c1cc736365c4640c9befbdd0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This was a feature in Qt 4, but the only platform that carried it over
to Qt 5 was Windows, in ab76593f18396e693f24066592244ca95e135ea2, and
that's still the situation.
As a first step in possibly implementing this on more platforms, lets
replace the hard-coded check in QWidgetRepaintManager::hasStaticContents
with a proper QPlatformIntegration capability check in the only call site.
Change-Id: I2067109f45116cd8c62facf7224cd748f19e845b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cce303b6a70bfc5e7f191529724969ca7509039f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWidgetPrivate::setGeometry_sys wrongly triggers full update, which is
why the test was QEXPECT_FAIL, even on Windows, which does implement
static contents.
We can test the behavior without involving the broken QWidget behavior
by resizing the QWindow instead, which triggers a resize of the platform
window and will be fed back through QWSI, similar to when the user
resizes the window via the window frame.
The QEXPECT_FAIL message for the QWidget resize has been updated to
reflect why it's expected to fail.
tst_QWidget::optimizedResize_topLevel() has similar issues to this
test, and solves it by using Window specific platform code. For now
this test has been left alone, as there are a lot more going on in
that test in terms of workarounds and blacklistings, so it needs
further investigations.
Change-Id: I28a55c0723b3e7f16b362d1ebc369e038d5a7ac4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ea0cf4a9a2535110d6cf325e75537b4618a7374f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We already had the machinery to copy one buffer to another, so this
machinery has been generalized a bit, so we can use it to preserve
the static content during buffer resize.
As explained in the comments, we need to do the buffer copies during
buffer creation, instead of relying on our back buffer finalization,
as we are not guaranteed that we can always copy the static content
from the front buffer.
Change-Id: Ia9b3ac6ec982949990d172b0b14f35b13bbae92a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit cd29145ddcf099acf0651aca637fc2ce65ba7546)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The majority of files in qmake/ have non-LGPL licensing.
Remove the mix of licenses and follow the majority.
Not sure what is the type of the files in qmake/
according to QUIP-18 [1].
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I4003daada9e20b9ea4524de89ba49fbe0880ec23
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 3828b30951e3bdaa8227d0ade14725de04593671)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The plumbing from QBackingStore::resize to the platform backing store
was missing a high-DPI conversion for the backing store's static
contents, which is also expressed in the QtGui coordinate system.
Pick-to: 6.6 6.5 6.2
Change-Id: Ifaac916cbf184b9386aa5feca1577a53bf2906ed
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 515822de24e45e9c6d8d59b74c557640ba68a6ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
But we do not yet handle a blockquote in a list item. Presumably
that's less common anyway.
We now also continue block-quote prefixes onto blank lines
within a block quote, which looks more normal.
Task-number: QTBUG-104997
Change-Id: I2b5642cf3a0c81a94444a33f026a02ad53e7e6bb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f3e528b97f6836b497953935e1dd27fee134e68a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Work-around SiC change made to qfloat16 when using native floats.
Pick-to: 6.6 6.5
Change-Id: I981505e6eff7277ad14512b56fad334be6e79016
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dcb2186c2a3199d39af09bb81376437b55b907ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In ccd3bf0871b81dfc09bb469b161f32dfb47ee53e we introduced code that would
ensure that our call to QWidgetPrivate::setVisible() from QWidgetWindow
would not result in WA_WState_Hidden being set. This code was later
modified in 51300566ffe2ece2455e1d0479a556c5dbb3bb8e to apply to
widgets that were explicitly shown/hidden.
Unfortunately, the reset of the Hidden and ExplicitShowHide attributes
would in some cases result in the widget having only ExplicitShowHide
after being hidden, which is an invalid state.
It also resulted in the widget having both Visible, Hidden, and
ExplicitShowHide, if first being hidden via QWidget, and then
shown via QWindow, which in turn prevented the widget from being
hidden via QWidget::hide().
As we no longer rely on the adjustments to Hidden/ExplicitShowHide
to fix QTBUG-73021, we can remove the entire logic. Any setVisible
call to QWidgetWindow will either come from outside, in which case
we should respect that and set Visible/Hidden via QWidgetPrivate,
or the setVisible call is a result of QWidget itself (or its parent)
showing the QWidgetWindow, in which case the QWidget visible state
is already up to date and we skip the QWidgetPrivate::setVisible
call.
Task-number: QTBUG-121398
Task-number: QTBUG-73021
Fixes: QTBUG-120316
Change-Id: I3174ad66b7e10c55aa99b7cb433267632169ca8f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 1308f7e0b182769896e6c4c31105c100265beda9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When destroying a widget via QWidget::destroy(), we clear WA_WState_Created,
and then delete the QWidgetWindow, which in turn hides the widget. But
QWidgetPrivate::setVisible(false) skips hide_helper() if the widget has
not been created, which leaves out important events such as the hide
event, and even more important, fails to clear WA_WState_Visible. As
a result, the widget is left visible (and mapped), even if it has been
destroyed.
This is normally not a big issue for the main use of destroy(), namely
destructing the widget, but for cases where destroy() and create() is
used to recreate the widget this is important.
We now unconditionally call hide_helper() if the widget is not already
hidden. As a result, the widget will correctly be visible=false after a
destroy(). This in turn means we need to re-apply the visible state after
recreating the widget when we detect a mismatch in RHI configuration.
Due to our meddling of the Hidden and ExplicitShowHide attributes in
QWidgetWindow private, a QWidet::show() will not have any effect after
being destroy(). This is okey for now, as destroy() is internal to
a widget, and we make sure to either update WA_WState_Visible and
WA_WState_Hidden (in QWidgetPrivate::setParent_sys), or use the
QWidgetPrivate::setVisible() code path directly, which doesn't
have that issue. The root problem will be fixed in a follow up.
Change-Id: I77cb88d75e57f0d9a31741161fb14d618a653291
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 371d7ea19a8075a1ad2c2011433b40e8eb1f6816)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When we recreate a top level QWidget due to the RHI config not matching,
we need to re-apply the window state, as the state is lost on destroy().
But we should do this on the QWidget we are recreating, not on its
closest QWindow. These are usually the same, so it didn't matter in
practice for most cases (besides the more convoluted way of getting
to the QWidget's window).
But if the top level widget does not have a winId yet, the call to find
the closest QWindow via QWidgetPrivate::windowHandle() will traverse from
the top level widget to its transient parent widget, via nativeParentWidget,
which is strange and likely a bug.
As a result of that, we would store the window state of the transient
parent widget, and then, once we had created() the new top level, we
would apply the window state to the top level, which now had a winId.
We can simplify all of this by just storing and applying the window
state on the widget we are re-creating. There's no need to go via
the closest QWindow for this. We do however need to set the window
state on the widget's window, as going via QWidget will just bail
out since the window state hasn't changed.
Amends c88211d1e4ac12eb2ae4990703a4f73c7085d624
Fixes: QTBUG-119795
Pick-to: 6.6 6.5
Change-Id: I0ad6e7bbac5f29d095cc643e9a7094784e9a2122
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit aecedfed9ab763513af8fda5a2b208b263da3f65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This shows the output immediately to the console.
Change-Id: Ia7f40c10ea24e4c95d5d8fa95fd1bc2bd76d61ca
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit d588924d11db24efe92a4ba3d77b3d768f460002)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Core Foundation would fail to pick up defaults from command line
arguments, as the logic to read the command line arguments was
in the Foundation class NSUserDefaults.
As a workaround, we initialized NSUserDefaults as early as we could,
so that we could use Core Foundation elsewhere in Qt.
As NSUserDefaults is considered a potential privacy risk, and needs
explicit declaration of use for iOS in the privacy manifest, we
disable the workaround for iOS. This should be okey, as the original
issue does not seem to manifest on iOS 17, and was only a problem
in practice when using command line arguments to debug things.
The issue is also seemingly gone from macOS 14.3, but we keep
the workaround in for now, just in case.
Task-number: QTBUG-114319
Change-Id: I2c698353673f797756a877a49cfbd8a37367c31e
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 6657acf8f57529bfe601d18db5d594773f51fe91)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The latter API is considered a potential privacy risk, and needs
explicit declaration of use for iOS in the privacy manifest, so
avoid it if we can, to simplify things.
Task-number: QTBUG-114319
Change-Id: Ica6fef47720696bc9ab25cb25642d6650f618b70
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit a3eba2378b4acfc46e5e6f8f511cdb0370c81d89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Access the target name value, but not use the variable name in
when checking the target existence.
Pick-to: 6.6 6.5 6.2
Change-Id: I0f86e3c7665d9c028bf4cbdc5aa8fb840fe1d542
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 3d4a5c513ab050d04ab175610167f4d31982be5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On MSCV x86 (32bit) the comparison of qsizetype with
std::numeric_limits<quint32>::max() leads to a warning.
This patch adds a static cast to avoid the warning.
This is an ammendment to 28ecb523ce8490bff38b251b3df703c72e057519
Pick-to: 6.6 6.5 6.2
Change-Id: Ie50572165ac31aafa7d23570bc133c5c96cf8b00
Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io>
(cherry picked from commit 6463b36da05bf57f2ff5857be6fa56e2c240fe12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The scroll bars may show up in one of the grabs and not the other,
(as seen on macOS), which is interesting, and possibly a bug, but
is not what the test is checking for, so let's disable the scrollbars
to stabilize the test.
Change-Id: Iad97ca5b22783bb1bee51b560957c5461b7d9923
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit c6fc6cef33b2b343fd507ee1f6f6ec5d32b6df4e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It has been passing consistently in dev, 6.7, 6.6, and 6.5 for the past
6 months: http://testresults.qt.io/grafana/goto/S35hM52IR
As a drive-by, fix comment that claims the test is only run on macOS.
Pick-to: 6.6 6.5
Change-Id: I6502c40e0c39afb68a461bd530df1bacb5211dec
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 4e9017c1fc6b80a24871481f0c33dcc88a69d9d6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Upgrading emscripten to 3.1.50 breaks this test, so we disable the time
for time being. After emscripten update this test is to be enabled
and fixed.
Change-Id: Ic48d81e2285ed8f7639bf20c6c29b2b9e402a591
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit c23d3ca1f08a7c7c76bb71602a56a79898efa117)
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
So we can test more values. Because we are testing more values, we can't
use QEXPECT_FAIL, because we can't guarantee a mismatch.
Task-number: QTBUG-116077
Task-number: QTBUG-116080
Change-Id: I664b9f014ffc48cbb49bfffd17b021719e6d612f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 1845d433277348542e496d3c38175ad0c5cbddde)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The fusion style had an own handling for
PE_FrameGroupBox/SC_GroupBoxFrame but failed to handle all cases (e.g.
with checkbox, text and horizontal alignment) correct. In contrast, the
base class (QCommonStyle) is properly handling all those attributes and
returns a correct subControlRect(). Therefore remove the special
handling, let styleHint() return the correct value for
SH_GroupBox_TextLabelVerticalAlginment based on the groupBox's text
alignment and rely on QCommonStyle ability to calculate the correct
values.
Pick-to: 6.6
Fixes: QTBUG-85425
Fixes: QTBUG-95472
Change-Id: I98ccf861274026a8fd4a2ef436efc3bb009be056
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
(cherry picked from commit 5a032f0b3fcfb7dbd63e784dedaa8e27fc34ce3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Now that QtWindow extends QtLayout again, the touch listener interface
is unused as QtWindow can directly handle the touch events.
Change-Id: Ic58b5ab7644ffb3a60833b6507115b20db3f29de
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 0ae95cb1f72782d5890f34c00b91eed15936ad29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 2bc7d38bd63843c4598ed501e3adbf0e39162c61.
The real cause for the problems was the missing runAction() in
bringChildToFront(), creating the QtLayout could still be done
in Qt thread without problems, just as long as its hierarchy
is not changed outside of Android UI thread.
Let QtWindow extend QtLayout again - the missing runAction()
causing problems is added back in a follow up commit.
Task-number: QTBUG-116187
Change-Id: Ib4211c40adf573f9f6dd6300b275cff0ce718fba
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 3dad99a43ed3ae936d5f47ff0cf4db78260e91d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since qt is on C++17, it's possible too use the [[fallthrough]]
attribute instead of a // Fallthrough comment, that may be stripped by
compiler launchers (ccache/icecc), causing -Wimplicit-fallthrough
warnings.
Change-Id: Ic809cf4e95b2160fac591b3802fa123e705337cc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 84537e6dc22030004c2aec7285641e721da627cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It wasn't getting inlined in aeshash256_lt32_avx256() (used by VAES +
AVX512VL variant) due to a GCC __attribute__((target())) mismatch,
causing a major loss of performance compared to the VAES + AVX2 variant.
Comparing the throughput after this fix on an Intel Core i7-1165G7
(Tiger Lake) laptop, with qHashBits modified to statically select either
[A] aeshash256() or [B] aeshash256_avx256(), out of 5 runs:
dictionary numbers paths-small uuids longstrings
A/B (avg) 103.7% 101.1% 103.5% 104.5% 100.3%
A/B (best) 103.4% 100.9% 103.2% 103.6% 100.8%
Considering that a string representation of a UUID is 37 characters (74
bytes), neither "uuids" nor "longstrings" are directly affected by this
change. However, the overhead does change, with the aeshash256_avx256()
needing slightly fewer instructions to reach aeshash256_ge32().
Benchmarking on an Intel Xeon Scalable 4th Generation (Sapphire Rapids),
the "uuids" data set has a 10% performance loss for some reason.
Pick-to: 6.6 6.5
Change-Id: I50e2158aeade4256ad1dfffd17b1b105d3cab482
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6ab4623cad39bec935f76e366f3f262922bde94a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is possible for a QRhiD3D12 instance to be created and destroyed
before the cmdAllocators list is initialized. This change simply
guards the cmdAllocators so that Release is only called if the
element is not nullptr.
For an example of how this can happen see QRhi::create. The
QRhiD3D12 is created but may be released immediately if
QRhiD3D12::create fails. One way this may happen is if the
ID3D12Device is removed but in practice many different errors may
cause create to fail.
Pick-to: 6.6
Change-Id: I395d247a952f9584122be083ac5ca6a3caddf300
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 63c8c1e862ee7dcd98dfd0d786e65e1b4fa05267)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
msvc_objectmodel.cpp and qmakeparser.cpp have symbols that may clash.
Removing them from unity builds allows qmake to be unity-built.
Pick-to: 6.6 6.5
Change-Id: I46443ec979142ab2ebb686f9444b37e1043f0af1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 72f5793d2e6b8d749d7d6c9e3a6444f11e8b2cc0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The word "file" could be slightly misleading in this context, because it
refers to an entry on the file system, which could be a regular file, a
dir, a special character device. Clarify the meaning by using "file
system entry" instead of just "file".
Fixes: QTBUG-120688
Pick-to: 6.6 6.5
Change-Id: Ic2a91cc74336a6718c13ad1ffd9f2c4001e5d63f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0211dfd92bcaa5a3a4c1ce94e13fcfd9c49e9c6d)
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Drive-by clarify a bit the text what "it" means, because it's different
from the "it" in "its" two words later.
Fixes: QTBUG-121875
Pick-to: 6.6
Change-Id: I664b9f014ffc48cbb49bfffd17b0959e7b3495fd
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
(cherry picked from commit 2c51a0bb7b71cba0d085281f7a588f750b06a8e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the same technique the constructor already uses: Q_ASSERT followed
by selecting the no-op branch in case assertions are compiled out.
Change-Id: I24cbcfd686f67e060134baecfb21044948b6eb98
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a327117c0d851dac4eea860e7d86ef3f80a0ffce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the new (in Qt 6.4) QByteArray::resize(n, ch) to avoid the manual
memset() unpleasentness.
Change-Id: I786988125f52b1bc1f733c30ab2b95eda569481d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit efc579145ef33655a4aaad5a41124cb103bfbe7a)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Don't do the memset() manually just to save re-writing the single
leading byte. Pass the initial values to the QByteArray constructor
directly.
Change-Id: I67daf446bebb8c8c6b05d235746ee43604f42445
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0d6ca27517523e960b132bd5e51d9b48bb9a93a3)
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This function can be merged with the other overload of qMakeFieldInfo()
because no-one uses it except qMakeFieldInfo() itself.
Change-Id: I7ed07ac0c673801fed9c00c9b0ce1628cfea3837
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 686f953bdb05f3e68de8c847fb4054e6cd91cde8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When expanding items in a tree view, the model as seen by accessibility
changes size and structure, and needs to be reset. This was done in
6a4afebc5ce8db69a6c9fb398cada31e6bad5e3c by emitting a ModelReset update
at the end of QTreeViewPrivate::layout when laying out the items had
changed the number of visible items.
However, QTreeViewPrivate::layout is called both recursively, and in a
loop when expanding all items, or expanding items to a certain depth,
resulting in a heavy performance hit when each recursion or iteration
causes the accessibility bridge to rebuild its representation from
scratch.
Instead, we now only store a flag that the model has to be reset in
QTreeViewPrivate::layout, and then trigger the reset in the function
that call layout, after the laying out is complete.
Fixes: QTBUG-122054
Pick-to: 6.6
Change-Id: Icb8384b56a4727c8c5050a1d501aebb55f48aafe
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a86321cb665b1af03b245b3b0fe0b57faa4a678f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... into an own function instead doing the check if fetchScroll is
available in every function.
Change-Id: I8c8a1c8693f667ddf89a660b733e31505427073a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 16c27a83f0c9c6f53578dd56024719a709cafcb0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... by moving the adjustment for the table/schema/catalog name into
splitTableQualifier().
Change-Id: Ia392b1c2e7f29e63ea88c21492f2116eac573b5e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 06039b523d2969e6683f9daf7d89dae727e7eaf4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
INTEGRITY has a pre-P1115 implementation of std::erase/erase_if that
returns void instead of the number of erased elements, so make q20's
implementation more specialized, so the compiler will pick it over
INTEGRITY's.
Same as 9b83574e8391e3e68a1c400f09b8354e268eeb32 did for std::vector.
Change-Id: I65149d7c92593126696f281151309b8f02ba4038
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 1a7edf3ba7bc8f7cdcd11eae973582158b4ecff8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's not copied, and copying would probably be a bad idea, so make
sure it's not done inadvertently.
Pick-to: 6.6 6.5
Change-Id: Ia7397906c0efb07ac5e079580bdbb15f4bf4911e
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 3a2d8c5828efee9f182c260f55720d3bb6152893)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all build system files should be
BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Change-Id: Ifd2832708e0c8e0bde1cad4004839fecffe44e3c
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit d44629d677ed2aae6d32ab10cb69cfdffa385639)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtIcoHandler::canRead() calls ICOReader::canRead(), which assumes that
QIODevice::pos() is at the position where the .ico data starts (i.e.
pos() == 0 if this is a separate .ico file). But if an AnimatedImage in
Qt Quick opens an .ico file, canRead() gets called multiple times:
the first is when QQuickAnimatedImage::frameCount() eventually results
in QImageReaderPrivate::initHandler(); then ICOReader::readHeader()
is called, which moves the file position. The second time is when
QQuickAnimatedImage calls QMovie::isValid(). At that time,
QIODevice::pos() == 6: we need to avoid calling ICOReader::canRead()
because it's no longer at the start of the data.
Without this change, AnimatedImage reports "Error Reading Animated Image
File" and doesn't show anything.
The fix is to store the known-good state, the same way that
QTiffHandler::canRead() returns true if its d->tiff already exists
(TIFFClientOpen() succeeded).
The test checks that it's ok to call QMovie::frameCount() first and then
QMovie::isValid(). Calling frameCount() has the effect of moving
QIODevice::pos().
Pick-to: 6.6 6.5
Task-number: QTBUG-117429
Change-Id: Ie3a5225f2cea9a0d76d685e83ce4d4a10cbe9188
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 3f515fa7aff7cb24565f0bb61b16bb2bde6faf60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
isTimeZoneIdAvailable() is significantly slower than just trying to
initialize the timezone and see if that worked.
Even in the x86 emulator the difference for this is from 2+ms to no
longer measurable here, on less powerful ARM devices it's even more
extreme. This matters in particular for code creating many QTimeZone
instances, e.g. for calendaring.
Pick-to: 6.6 6.5
Change-Id: I5f175137b8b71816347a8debb492214427a51104
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit f4e83fccb4ecbf01ba9b72b02a1041e93e7c92b3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... as it is no longer needed.
Change-Id: Ia60b6e53675260ef0e793ac1b44c913af1454b35
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 74722411d3fbfcc30d8eff98efcc627be451aea9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The switch needs to be on QSqlField::metaType() instead the internal
QSqlField::typeID() which holds the db-specific type of this field.
This amends 7b391c0d2c03d8d25449eca3868cd010d75ff81e.
Pick-to: 6.6 6.5 6.2
Change-Id: Id1d1791826f08adb01cc3da45bf5a66bad288046
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 55d1480c9992b52c39906b3861a3e2e7f7bed898)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.6
Change-Id: Iadc67fee0c7ee70ac904f66a523acd3b1a63e42b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 95c20ffac3473f9188df363aebcb911589645806)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A recent change fixed the texture format parameter to be RGB instead
of RGBA for opaque internal formats. However, this broke the RGB10
case, since the pixel type is then GL_UNSIGNED_INT_2_10_10_10_REV. The
doc says:
"GL_INVALID_OPERATION is generated if type is [...]
GL_UNSIGNED_INT_2_10_10_10_REV [...] and format is neither GL_RGBA nor
GL_BGRA."
https://registry.khronos.org/OpenGL-Refpages/gl4/html/glTexImage2D.xhtml
This modifies ba9e57d65f15c935632b0ad22db0bead9a7d5f90.
Pick-to: 6.6 6.5
Change-Id: I9a004331513179a3f840a007af0418d14e7f5dff
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit b0056f052d842150305d59a3ced280e1885a8619)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This will show up in menus as ⌫, instead of ^H, which is a better fit
with the native behavior.
Task-number: QTBUG-122042
Task-number: QDS-11733
Pick-to: 6.6 6.5
Change-Id: I224971421a13baec2a0f65be8ae4a5791dabafdd
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 41b76ffbd0993997f541436b1235407b00c542f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use qAddOverflow/qSubOverflow methods for catching additions and
subtractions with overflow and handle these scenarios when reading the
file.
* Add 'safeView' method that checks that the byte array view constructed
is not out of bounds.
* Return error if number of levels is higher than what is reasonable.
* Return error if number of faces is incorrect.
* Add unit test with invalid KTX file previously causing a segmentation
fault.
This fixes CVE-2024-25580.
Fixes: QTBUG-121918
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ie0824c32a5921de30cf07c1fc1b49a084e6d07b2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 28ecb523ce8490bff38b251b3df703c72e057519)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The LibraryMap can never contain an object whose fileName is empty.
To see that, observe that the only insertion into LibraryMap is in
findOrCreate() and that refuses to add such objects there.
But if LibraryMap cannot contain such an object, and findOrCreate({})
is just an ugly way to get a default-constructed QLibraryPrivate (a
new one for each call), then we don't need to lock the
qt_library_mutex to produce one, and neither do we need to construct a
mapName that we know we'll not find, anyway.
So drag this case to before the mutex locking and the construction of
mapName.
It took me more coffee than I'm ready to admit to figure this out, so
leave a comment for the next reader indicating that an empty fileName
is actually a valid argument.
To avoid repeating the new-expression, wrap it in a lambda, together
with the ref() call. Move the remaining ref() call to where it's still
needed.
The final goal of this exercise is to get rid of the double-lookup in
LibraryMap.
Pick-to: 6.6 6.5
Change-Id: I781eafdb9516410d7a262ad27f52c38ad2742292
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b28bad0b20719f72fb335a65f76382132e326ad0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all tests file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit ff1039c217fb1ae03b701557a5a50c2112555991)
[ChangeLog][QtGui][Platform Specific Changes][wasm] Previously, bitmap
and pixmap cursors were nonfunctional in wasm builds and would trigger
warnings. These cursors now work as expected.
Fixes: QTBUG-116796
Pick-to: 6.6 6.5
Change-Id: Idd9aa4d458a36452fd5b49f72cc595756fc50923
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 38c62c58514d574f44caf799e5568a2e9eebffeb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code should consider that image may be created by
a pointer to user data, with original alignments.
It means that we the way of setting parameters from
raw data and QImage should be the same.
In Qt Multimedia we want to pass a zero-copy image
to rhi creation to get rid of an extra copy:
codereview.qt-project.org/c/qt/qtmultimedia/+/537062
Aslo, data align has been fixed.
Due to the documentation, GL_UNPACK_ALIGNMENT can
be 8, 4, 2, 1. Let's find the biggest possible align.
Task-number: QTBUG-121934
Pick-to: 6.6 6.5
Change-Id: Ic0f1617d4699217a7549c13e916be96108183d03
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 1d6bb23f6285252f7fa6cac87003cbe0f33f51af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.6 6.5
Change-Id: Ia9f27eef2bd7bd5bb57b96e553304924db252365
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit a61ac2ca58eb705021176720d481c0eb4c925c2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.6
Change-Id: I883fd0b5f75db175a730262035ebbf0cb19de529
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 95feea933bbc67ab4a188470973da3f4df450c3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We'll need this in more places, so centralize its definition in
qcompilerdetection.h.
Amends 595b4e1a9b436a8190964dc41f79621400f5a6be.
Pick-to: 6.6 6.5
Change-Id: I87f84cb9ff3ad339c000604423295180176f5799
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit f4cfc21dec6319c2ae99042be6bb12922a9d336d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 25b89f2c88cdfc98bfa462949531a33f7ef50996)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QAIV::rowsAboutToBeRemoved() closed all child editors when the child was
a direct ancestor of the removed index but forgot to check if the index
is an indirect ancestor. Some of those editors were removed later in
updateEditorGeometries() but not all as the testcase in the bug report
showed.
Pick-to: 6.6 6.5
Fixes: QTBUG-103476
Change-Id: I90b3d3bff3857aa79f96eecf23d980928693b7bc
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 1d799e91082092821a04885bd9d069febefc37da)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
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>
(cherry picked from commit cbc6ee0eb9ef42c7024fa527bb94ac89953709a6)
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.
Change-Id: I45de37b512fb666c26490551c831c0db824b5f35
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit b33b85cc46998133cddb18683402b6f0aaac754e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.
Task-number: QTBUG-115777
Change-Id: I6712f687134fd452fb0b962363a8f0fde85344ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit ef5ab6e00664caf0af23b21593f809d718c9dfc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unlike other containers, a QBitArray's size() is not limited by
storage, but, esp. on 32-bit platforms, its size_type: A INT_MAX
size() QBitArray only requires 256MiB of storage.
So we can't rely on "won't happen in practice" here and need to avoid
the potential UB (signed overflow) in the (d.size() * 8 - *d.data())
storage-to-logical-size calculation by using unsigned arithmetic.
Use the opportunity to Extract Method adjust_head_and_tail(),
centralizing the bit fiddling.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I485eafdf3ce2087a81c683672ff98a43f97c9968
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 78f8dfc5427457783ceef7d85885cddbec035ebe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt 5 streams cannot handle QBitArrays with more than INT_MAX bits,
even on 64-bit platforms, because of interface constraints (size_type
int).
Qt 6 can, so make sure to refuse serialization of oversized QBitArrays
to Qt-5-compatible streams.
[ChangeLog][QtCore][QBitArray] Now refuses to stream a QBitArray with
size() > INT_MAX to a Qt-5-compatible QDataStream.
Pick-to: 6.6 6.5 6.2
Change-Id: I263e27bd366757c8e0360dfd337948c44d00647a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 9219e8ff1d13a7e9aeb595d60aa4b3767a8941fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.6 6.5
Fixes: QTBUG-121948
Task-number: QTBUG-106466
Task-number: QTBUG-101353
Change-Id: Ibdcfecd9a4b1e206479a3f4588b1b624dd91e122
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 329dbfcc78d067d26b5a4dd99f4284900fd68f2c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Change-Id: If4c62ea53ac9bccd423f00f0f03afd6ba6bdc4f5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dd514160ce169734e23a146a2c115fed55a69260)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.6 6.5
Change-Id: I071df68d51ba1dbd8b2eb5f94eb078a33223505f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a1bfac287ee5d3719646d68dc91dc8e8e4cec04e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Change-Id: I83704edec021d400b992de810feba5da52d5ffe1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 0aaf7092cd077eb07e62d3742293f146c65c9630)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Do that to avoid narrowing at the call site on 32-bit platforms.
Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
Found in 6.7 API review
Change-Id: I31142399385521d973b2ed3789745569e44d5d63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0ed34d19926c60f3b74a58723c5c36f366e99d95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Task-number: QTBUG-121787
Change-Id: I185ebdff2faa5e4af6ac0ee77c3ae33faae06e7d
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit f45dffa8b4e5a3ddc3473203e27ebdeebfde10da)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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
Task-number: QTBUG-121787
Change-Id: I89e08859871d29a9cf8c7a56b30b07b2c2f34b42
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit fb226262e8b371372fdc66b832b9eab24741f70d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all build system files should be
BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I58689f832ed3a5c8475c9bd7e0205e2128fb7cc2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 20f7c54fdc76a3798ba431b88a0f9701253198c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Neither win_outputDebugString_helper() nor OutputDebugString() add a
newline at the end of the message, so one needs to be added before being
passed to the output handler.
A newline was previously present but removed when deduplicating calls to
qFormatLogMessage().
Fixes: QTBUG-121947
Change-Id: I9f1c1d8726e4234f24999f47c52340140d5a4614
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c05f987fcd36bf2f194f0dedb37f4eea7a68e4f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Android 13 and above requires the notification permission
"android.permission.POST_NOTIFICATIONS" to be requested at runtime.
Pick-to: 6.6 6.5
Fixes: QTBUG-121668
Change-Id: I38512ffc07c1a3ffe7cddffa937b98332f172d15
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 7fa6d09ca20b27b8350e6e26040372ba70e6244d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If extract_android_style meta data is set to none currently the app
still tries to extract full stlye and crashes. If this option is set
no style data should be extracted after this patch.
Fixes: QTBUG-121667
Change-Id: I764e1eb6a582073196f991ca930d245d17a1f7e5
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit ff6a6d3285c48d5e54bf03361115116f58461e33)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all .qdoc files should be
LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I7c4d8a1957db6f6d7ad18cbc1928499724e9305f
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 60889fcf72da0c3bf003ea587befee6b573ccb23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all doc snippet files should be
LicenseRef-Qt-Commercial OR BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I6e5bc9d05a5d510cc07a15abafe2257034562510
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 1dbc57ad0c7bb0ca9ffeb931c836f6f9791db12f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Drag the common parts out of the if-else. This also means that
qsizetype size() is no longer truncated in the assignment to quint32
len, but that doesn't fix the problem that we create invalid Qt 5
streams when the QBitArray has more than INT_MAX bits in it. That is
for a follow-up patch (which is why the {} stay for now).
As a drive-by, replace verbose constData() with data() (the QByteArray
is already const).
Pick-to: 6.6 6.5 6.2
Change-Id: Iabf816e16f823bb3959469a635a21339242f36fc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 741617aea0e4c631b2fd4b822f0948ec067f1cdc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Update the icons for bad, heart and trash in the system tray example.
Fixes: QTBUG-119127
Change-Id: I0b6d4600397a0cb2a5474da04297ab92689358cd
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 1878556f25cb86ecefc986a92801c3cbe421ca8b)
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
Change-Id: I9c18c579cd310266273eccd2aee2e032f60538e0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit cdfeca26cf313b84f6a9b1380e039f214357c52f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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.6 6.6.2 6.5 6.2
Change-Id: I15c357c9eef7f6559bcc2ad89033a3d8e7fcbfef
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit c6af5b9c12e1ea4cec007c5efe869636ce97a9d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Added icons to the controller.
* Keep the car within the scene.
* Removed the ui file because 4 buttons can be maintained in code easier.
Change-Id: I10af821beb442939e1e7fbdd3ffbde67a272bb2f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 29a4323974a1877faf389637be40688e3bc1790d)
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.6 6.5
Change-Id: I9824351ebab5a24509800da4db69f1e282a35884
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 75d83d5a6521a5cf5c7159f1ef09e8978e429919)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The call site may pass in a null-widget, so guard for that.
Change-Id: I631cb2fc105bad69faf3daaeac4b893457d27cc1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 97c02b80ae28d9bdc4e01980296e0db67f194f81)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The Android TextureView class wants to know whether the view is
opaque, while the condition has been evaluating whether it should be
transparent. Invert the condition to let Android know correctly whether
the TextureView should have transparency.
Change-Id: Ic636f78dd3c691e85456c579e4559b8bc7a077a2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 8b601e6dbecdd85b77e0a7796dc3e5b908dfb5ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CarbonCore defines `DEBUG`, which can nameclash with the `DEBUG` define
in the json parser when using unity builds
Change-Id: Ic9f666a1da98aaebe30836abf877228f2f83004c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cadc239c485ee4f1ab3587f3c53c548238c40fa5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When linking Qt statically, QtCore and QtGui are not separated into
different DSOs.
when both statically linked versions of QtCore and QtGui are linked into
the same binary with LTO, gcc emits:
```
/usr/src/debug/qtbase/6.3.0-r0/git/src/gui/painting/qicc.cpp:105:
warning: type ‘Tag’ violates the C++ One Definition Rule [-Wodr]
/usr/src/debug/qtbase/6.3.0-r0/git/src/corelib/kernel/qtranslator.cpp:78:
note: an enum with different value name is defined in another
translation unit
/usr/src/debug/qtbase/6.3.0-r0/git/src/gui/painting/qicc.cpp:106: note:
name ‘acsp’ differs from name ‘Tag_End’ defined in another translation
unit
/usr/src/debug/qtbase/6.3.0-r0/git/src/corelib/kernel/qtranslator.cpp:78:
note: mismatching definition
```
we therefore define the `struct Tag` in an anonymous namespace or the
QIcc namespace
Change-Id: Ib4edeede35c51322ab1959d70fb87359b196e59b
Pick-to: 6.6 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6b13e0ca593592b34ea34837335db0d5cefdf630)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The docs say "This example illustrates function calling with 0, 1 and 2
parameters" because it was copied from the synchronous call()
documentation. But the snippet didn't do that, because back in Qt 4 when
this was created, it was too difficult to exemplify that for
asynchronous use. It now no longer is, with lambdas.
Drive-by update the docs for both functions to refer to each other.
Fixes: QTBUG-121873
Pick-to: 6.6
Change-Id: I664b9f014ffc48cbb49bfffd17b089b7f77c1cde
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
(cherry picked from commit 9e73917537368d1904cc227da3332e970ad23752)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The method takes a pointer, so the code shouldn't crash when passed a
nullptr.
QFileInfoGatherer::getInfo() still needs to generate a descriptive
string for the file, so we refactor QAbstractFileIconProvider::type()
to put the implementation into a reusable static function
QAbstractFileIconProviderPrivate::getFileType(const QFileInfo &info).
This unfortunately involves constructing a QMimeDatabase on the fly,
but the docs say that is fine.
Drive-by change: use nullptr instead of `0` for pointers.
Pick-to: 6.6 6.5
Fixes: QTBUG-99178
Change-Id: Ia32ea0a26701d593e74fbecced7be8d9e0aa0f52
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 2a8b27bf6c523de6f3f466f8062279c093940a60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
During shutdown we may get traitCollectionDidChange for our QUIWindow,
as it may outlive the QGuiApplication and the QWindows due to hanging
around in an auto-release pool.
Pick-to: 6.6 6.5
Change-Id: Ifc6471b933fb1b4d1e83e9b734aac31044dce03e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 4dbc267945df841508a217fbdb6faf15c6f457fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and use it in QCborContainerPrivate::replaceAt_complex() to avoid
unconstrained memory growth in certain scenarios.
Remove the `reserved` parameter, because it was referring to the
elements array, not to the byte data, so it cannot really be used
in the implementation.
Fixes: QTBUG-109073
Change-Id: I2e8fe7e4a4bf7a0ce06c87ca657f2bc01bae0341
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 83f0796192d9f0ed3bc005dbcf68b98de62955b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
During shutdown the UIView might outlive its QIOSWindow platform
window. If we receive displayLayer calls, we need to bail out,
to avoid crashing when trying to send the expose event.
Pick-to: 6.6 6.5
Change-Id: I2f36a4dd825e91b348bc57a06e6aa6b1a12fd249
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 483523ad9f9807e84ab6aa0f48712df0524dbe28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unlike on macOS, our UIViews are children of a QIOSDesktopManagerView
that we use to do window management, so we need to remove the view
from its superview, even if represents a top level QWindow.
The only exception is top level foreign windows, which are used to
represent a native UIView for the purpose of containing a Qt view
hierarchy within. As we don't know anything about the foreign view's
superview hiearchy we shouldn't touch it.
Pick-to: 6.6
Fixes: QTBUG-120369
Change-Id: I6a43bb0a4e72d0d1525a7cc33d572ea7477215b3
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit bc7e728fcfd2cfdbff29fa9d1b0f8dae718a0f8c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They were expanding as simple blocks, so their uses didn't end in
semicolon, which looks wrong when reading the code.
Pick-to: 6.6 6.5
Change-Id: Ibea7b01ac165045604b6eb7a838765b2061c368a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 5d451d514cc35402b04288372483223d6c893c47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(This turns out to be identical to v44, for our purposes.)
The CLDR license has been revised at v44 to "UNICODE LICENSE V3",
which is now included (as LICENSES/UNICODE-3.0.txt) in addition to the
old license (still in use, presumably, by UCD - at least until its
next update). Some new QLocale::Language entries are needed. There is
no change to the time-zone data.
Some tests needed changes:
* Various Arabic locales now use U+0623 (Arabic letter aleph with
hamza above) in exponent separator, replacing plain U+0627 (Arabic
letter aleph); it is still followed by U+0633 (Arabic letter seen).
* Where likely sub-tags used to fill in world, 001, as territory for a
language, they now (e.g. for Prussian and Yiddish) give specific
countries.
* Tamil locales now have something of a mix of inherited and localized
forms for AM/PM, which looks a lot like a mistake in CLDR.
Conflict resolution at 6.7: a test fixed in dev is not present in 6.7,
as it wasn't reworked or given the new test-case, so that's omitted.
[ChangeLog][Third-Party Code] Updated QLocale's data extracted from
the Unicode Common Locale Data Repository (CLDR) to v44.1. The license
changed to Unicode License V3.
Pick-to: 6.6 6.5
Fixes: QTBUG-121485
Task-number: QTBUG-121325
Change-Id: Ide1a68016129526d7a5aa3fc67f1a674858696bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 063026cc503e0c02af781caf920f5abfa0416268)
As a result of using QWidget::setVisible to show the child widgets we
would end up also setting ExplicitShowHide. This is not in line with
the intent of ExplicitShowHide, which is to flag a widget as explicitly
shown/hidden by the developer, which in turn prevents Qt Widgets from
toggling WState_Hidden when the widget is reparented.
By using QWidgetPrivate::setVisible instead, we can show the child
without setting ExplicitShowHide.
As side effect of this is that we no longer reset WA_WState_Hidden
from QWidgetWindowPrivate::setVisible(). This is an issue when the
setVisible call comes as a result of destroying the QWidgetWindow,
as that is an implicit hide, and should not result in the widget
having WA_WState_Hidden. QWidget handles this case in hideChildren
by not calling QWidgetPrivate::setVisible -- instead doing its own
reset of WA_WState_Visible. We don't want to untangle this just yet,
so as a workaround we detect that the widget is already !isVisible(),
thanks to hideChildren having hidden it, and then skip the call
to QWidgetPrivate::setVisible that results from QWindow::destroy().
Task-number: QTBUG-121398
Change-Id: Ib5b4d9c84f0569124c5f3ca2169cabff18934e2d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5ba0982b2879a1a4c13bf97467b8e5ad296e57a2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The nativeHiddenChild is not used for anything, and shouldn't be
needed to trigger the failure condition.
That said, I was not able to reproduce the test failure on macOS
14 with the test neither pre or post patch, nor with any of the
test cases mentioned in 51300566ffe2ece2455e1d0479a556c5dbb3bb8e,
nor with 51300566ffe2ece2455e1d0479a556c5dbb3bb8e itself, so this
has seemingly been fixed or worked around some other way in the
meantime.
Task-number: QTBUG-121398
Change-Id: I299e7f4b71ebdb17870348a3d5b0c49a93228c8b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f85c988980f73398762d4bd5c1a8a1799d182bdd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Task-number: QTBUG-121398
Change-Id: I94b4c90c3bd515279417c88497d7b9bd5a362eae
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b393b26c70cc40c37173cba8c22d66484041087c)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The de-virtualization gotcha might result in client code not calling
QRasterWindow::resizeEvent, which we use for dirty state management
after e0eb2818face4ffb7dafd87464f355d4654b7be0.
In practice this wasn't an issue, because QPaintDeviceWindow handles
paint events by calling markWindowAsDirty first, but we should not
rely on this.
Instead plumb the resize event to QPaintDeviceWindowPrivate, which
QRasterWindow implements and can override the behavior of.
Pick-to: 6.6 6.5
Change-Id: I5c0747da10f0275b77f56be32690d796fa48cdb4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 6cb497c1570ee427460962b2c0abe3b6dd8c4ae6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit c0791ac76ec7cfdc3945efa67a6f72ee3623413c didn't explain why it
was #ifdef'ed out. It's just an alias for double. Maybe compilers at the
time used to complain if you used it, but I can't make Apple's clang
produce a warning now.
Change-Id: I664b9f014ffc48cbb49bfffd17b02293403e9571
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit c5f22c54cbff8c31ab9e5111e74faae4e188e99b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Declare an IfUntypedPropertyData alias and use that consistently.
Amends 311f8896322bcd39d33369c8311a8c89ccdad449.
Change-Id: If36ef8e2f9ce25e0ffe7b4b448c31ea5866acfc3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 216af5d7f9675a408e22167b097f221beeeb88db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QObjects are usually passed by pointer, so we leave the override
taking a pointer.
This amends bbeff2a3350dd3396400865525d509b784c2d93e, and reverts
the previous revert in b148a362c36a9b34b0c21c60530353d6bf6b92cb.
Now that we have removed the incorrectly added operators from the
6.6 branches entirely, we can remove the unnecessary const/ref
operator from 6.7.
Task-number: QTBUG-119952
Change-Id: Id196367ddf3ffb443db44194002f850dcfec5d79
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4b64df56509dd770002ec083ee64f3ec23a8b682)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QLineEdit activates the blinking cursor timer when it's shown,
but never deactivates it, resulting in constant wakeups even for
hidden line edits.
Note that this is a workaround. Qt is supposed to send a focus out
event to line edits that get hidden. In some corner cases, it
doesn't, and only a hide event is sent.
Change-Id: Ic0645512051466ca9b1e84c54cef34c22287338b
Task-number: QTBUG-52021
Pick-to: 6.6 6.5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit e35dcba5bb8cdcf578a514ad6e03ae64002c2c3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add right side indent to the title if groupbox alignment is set to
Qt::AlignRight | Qt::AlignVCenter.
Fixes: QTBUG-121049
Pick-to: 6.6
Change-Id: I9aac295c824ad774410efd679f59075e4251b611
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3aa9388056f56b65b33cd2929a690584e21a02b2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Configuring a test as standalone would fail with the following error:
Invalid max SDK version: It should be a major version number,
without minor
This happened because _qt_internal_check_apple_sdk_and_xcode_versions
expects QT_SUPPORTED_MAX_MACOS_SDK_VERSION to be available, but it is
not yet set due to Qt6 package not being found yet.
Avoid the issue by exporting the version requirements into both
Qt6ConfigExtras.cmake and Qt6BuildInternalsConfigExtra.cmake.
Make sure to assign the variables only once.
Amends a29bff3d80219f54d0837b0e6e0577192011dea1
Amends a0bdd2195f24d8a7d880ba506afc16b41337218e
Pick-to: 6.6
Task-number: QTBUG-119490
Change-Id: Ic297eeaabf22c8c42ded1a766906f88fdb91fd3d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cec2e42052a04cd2481c20bd4be5de2ba5ccaec2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since 3f4d6279c4b0d04422efff478a5e2fb36259dbaa (khansen 2005) QMovie
calls QImageReader::read() until QImageReader::canRead() returns false.
That's apparently to support animated image formats in which the
frame count is not known at the beginnning (i.e. not specified in
the image format's metadata). But non-animated multi-frame formats
are expected to return valid values from QImageReader::imageCount();
and those also tend to keep returning true from canRead() regardless
of how many frames have been read (the interpretation of canRead()
is "does the file have the expected format?" rather than "are we
about to read too many frames?"). So, when a multi-frame image is abused
as an animation, QMovie was able to keep reading the same frame
repeatedly and pretend that the frame sequence goes on forever.
It also tended to read frames as fast as they could be decoded,
because nextImageDelay() is not usually provided, because multi-frame
image formats don't specify a frame rate in their metadata.
So now we change QMovie's behavior for image formats where
QImageIOHandler::supportsOption(Animation) returns false:
trust imageCount(), but not do not trust nextImageDelay().
But to actually jump to the next frame in this case, we also need to
call QImageReader::jumpToNextImage().
Altogether, this makes QMovie support "flipbook" animation for
multi-frame image formats, such as tiff and pdf.
Added "read frame x of c" logging in qt.gui.imageio category.
For testing, we use a pre-existing multi-frame Obj_N2_Internal_Mem.ico
file, to avoid depending on the tiff plugin.
[ChangeLog][QtGui][QMovie] QMovie now handles non-animated multi-frame
image formats (such as tiff): QImageIOHandler::imageCount() is observed,
and the default frame rate is 1 FPS.
Pick-to: 6.6 6.5
Fixes: QTBUG-117429
Change-Id: I6dad2a684e12c78a68288402e223a59427bf649e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 7c313f18654d18fe253e1f1c55d6f4d92660888a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
installEventFilter() prepends new objects to the eventList, so that
events that are posted while processing events are left to the next
round of event processing.
This is a baseline test to check that subsequent commits preserve the
current behavior.
QCOMPARE_GT is available since Qt6.4, so make the check backportable to
older releases too.
Pick-to: 6.6 6.5 6.2 5.15
Task-number: QTBUG-120779
Change-Id: I5ed5e9c2917a9be62de4af19c3b72889399b4fe6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 1fe88bf4cd919d4b5cadb4be2cf0193525c54673)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use _qt_internal_qml_root_path when collecting the qml root paths using
_qt_internal_collect_qml_root_paths. The property is only applicable for
Android builds. This suppresses the QTP0002 warning for the cases when
android application has both QML executable and QML library modules.
Amends 575b8a7fa289a2e27984a6c322069f9e1b499024
Pick-to: 6.6
Change-Id: Iccadbe1f6ed697a94dba11af3dd054baec8daf9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit d954d53c1ddcffda394c4f44663b4c86a61ed452)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all build system files should be
BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Task-number: QTBUG-121787
Change-Id: I88e3640b32e6b4bd83c49c14df6aecd7c824aef7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 35fbb6561028a59702b12d6ff5e7cf310202ed0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The elements we iterate over are always jobjects, i.e. POD, so iterating
over values is at least as efficient, and less unnecessarily clever.
Change-Id: I6142dab84f3d37d82613ecf27cc03dde7810e541
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 9f0dc59cd62f7afd18b36e6064f2d4b8ff2a7c6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The class has a user-defined destructor, so it mustn't be copied or
moved (which here is the same as copying).
Amends 3c93286f08a80b6e1821d7d63d361742b25c6578.
Pick-to: 6.6 6.5
Change-Id: I1b23588309654f34aedc0269e1d1c9511ddda2bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 1b3c8d6e95a81d307a9f7bb556aabcf7fea04588)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the work-around for CMake issue #19005 for Makefile generators
and Visual Studio projects.
Pick-to: 6.6 6.5
Fixes: QTBUG-120317
Change-Id: I3d15f23937133a5dd4d1c2a88af0fc34d5608a77
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 654f3c5634ac9efc2257177351c8dea7c8d8875a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Include the \since markers they need, plus changes in past versions.
Purge a stray blank line.
Pick-to: 6.6 6.5 6.2
Change-Id: I4edaa0ffaf59323e0af6412727f2a85866813ab8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 8c178a540faf27fdab6977b13507d94735f89e21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to QUIP-18 [1], all .qdoc files should be
LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
[1]: https://contribute.qt-project.org/quips/18
Change-Id: I4559af21fc9069efa9bf0cbd29c5e86cfdac9082
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 865d0133fcb54c0e22f53dde71ebbca9cbcaf78e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When we add support for dynamically linked FFmpeg, some FFmpeg libraries
will be available in the bin directory. windeployqt should then copy
these libraries to the application directory if the ffmpeg media backend
is included.
This patch extends windeployqt with support for deploying these FFmpeg
libraries.
Potential issues:
1. This patch hard codes the FFmpeg library names that we currently
depend on, such as 'avcodec' or 'swresample'.
2. We don't take version number of the FFmpeg libs into account. This is
done to reduce the maintenance burden when we upgrade FFmpeg, and
should not be a problem as long as we have a single version of FFmpeg
in the online installer.
3. Finding the library names is a bit quadratic in complexity, bound by
the number of libraries in the bin folder, but should not be too
slow.
4. We need to update windeployqt if we add or remove ffmpeg libraries.
An alternative would be to identify all dlls that the ffmpeg media
plugin depends on, and then deploy all files that exists in the bin
directory instead of hard-coding library names. This would, however be a
bit more fragile because we would not be able to warn if a library was
missing.
Note that this patch is a workaround. It is needed because Qt does not
properly support CMake's runtime dependency features with platform
plugins. Even if we added FFmpeg binaries to the dependencies set, they
would not be visible at install time.
Pick-to: 6.5
Change-Id: I4b23e50429d16e8487bf43ce9982ff37d02ffbe2
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit 138eebcc099e5e95ce04315ac7e1899f59399ca1)
Don't call the native function directly, call the Java function that
calls the native function.
Change-Id: Icdcf250313a38f6e4bc2b90fb7b0adbfa5a890fb
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit cfcd56a78fae5d4f4c79f9e76d6bcd57f8a3cde2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since 6.7 we consider the BUILD_SHARED_LIBS when creating libraries
using Qt CMake API. This change may affect the user projects that rely
on the old strategy of selecting the default library type. To preserve
the old behavior this change introduces the QTP0003 policy that allows
user to control whether the BUILD_SHARED_LIBS should or shouldn't be
considered in library creation process.
The policy doesn't affect Qt repos, we assume that we want the NEW
behavior by default.
Fixes: QTBUG-121707
Change-Id: I4bcfbd8966839731624e3f7ef9e0d6bb2782ac50
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 31b75303d7f9126dcc9bb0e94f0ea4ef1b9c0a71)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixes the following documentation warnings:
(qdoc) warning: Undocumented parameter 'r' in QRgbaFloat::fromRgba64()
(qdoc) warning: No such parameter 'red' in QRgbaFloat::fromRgba64()
(Which repeat for green, blue, and alpha.)
Change-Id: I22d281b716865eec649b9fb63f2113f982fdf8ea
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 92dc4c5c9451f70060bf379742b91c8cacbb7df6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fixes a documentation warning:
(qdoc) warning: Undocumented parameter 'other' in QFlags::operator=()
This warning is reported by the latest version of QDoc, but fixing
it causes another warning in the currently-provisioned QDoc.
Therefore, raise the warning limit temporarily to pass the
documentation check in CI.
Change-Id: I14863baebf712cda6f4da6d989e3ab83ffea7f85
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit d76828a1c73ecb5858142f63bea4bb4ea8bf2a25)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was shown to have poor performance compared to contains() and
insert().
Pick-to: 6.6 6.5
Change-Id: I61cfbc8c34e325d677d7954118ef68057df640cb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 000cb2dadc16e5bd585da459de44f1902943ea56)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's not the _WITH_TIMEOUT variant (the timeout is missing).
Amends a change preceding b24bb12f6a93b98e9bc44c99e151b995eb7cea71,
the commit that moved all the documentation into qtestcase.qdoc in the
first place. I didn't track the change back further than that.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I79ccd84a5dbed20012fa1a2d3561945f8a7638d5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4af3cf275fc9f5e721fab6b05fc05cf7bdbe5c99)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
cfd935fe6c26800befc10889afc0aebde311acca removed the erroneous mapping
from XKB_KEY_XF86Calculator to Qt::Key_Launch1, leaving it unmapped.
It should be mapped to Qt::Key_Calculator, just like
XKB_KEY_XF86Calculater.
Fixes: QTBUG-121713
Pick-to: 6.6 6.5
Change-Id: Iaa28e38792f43a7950a3c38397869a6ffed332d1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 86e92972dd1df463f8da859f651ba0eb76dacd50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a QMessageBox is created with setModal(true), the user can in theory
choose to show() it, and then return back to the main event loop, instead
of calling exec(). We tried to support that case via a single shot timer,
called on the next pass of the event loop, that checked if the applications'
current modal window was the alert, and if not, showed it at that point.
That logic failed when there were more than one alert show at the same
time.
We do maintain a stack of the modal sessions and their windows in the
Cocoa event dispatcher, so we could use that to check if a modal session
had been started for the alert's window, but a similar solution is to
just check the alert window's visible state.
Fixes: QTBUG-121557
Pick-to: 6.6 6.6.2 6.5
Change-Id: I6f52a53e8f678bb8a071e334a09ab30669d95bbf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit 7edff3f15ae21c2310437e0711f84442a21cb6a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As part of the API review process, in QNetworkRequestFactory:
(set|clear)Headers() were renamed to (set|clear)CommonHeaders(), and
request() was renamed to createRequest().
In addition, QHttpHeaders::has() was renamed to contains().
Update references to the old names in the documentation.
Change-Id: Ib79ae99de26be2f3af60787c8b86c3c20cb30067
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 711def1290439d19e7ed9068704bb2160edab968)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's possible for the "det" variable to exceed 0 and be negative.
This scenario is already handled in one case, this change will fix second case.
Fixes: QTBUG-120907
Change-Id: Ib30213b3455b5c6f3b8b8384e78e7b43158f93b5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit ba75e7770f7facf5f841e72ca0a4fd2a1a1fb6e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently we assume that only modules that have plugins built in the
current build tree need to generate and install the
Qt<Module>Plugins.cmake file. This approach is weak since other Qt
modules might still want to provide the plugins of the certain types,
even if the module that the plugin type belongs too didn't have plugins
initially.
The fix unblocks the formally 3rd-party plugin installation and loading
chain.
Pick-to: 6.6 6.5 6.2
Fixes: QAA-2266
Change-Id: Ifc616e26a00674371c8e2fe2ca12237d153e5707
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 180afc7321c85f7f36d085b76d1be74c99da2462)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
...or rather when it's used with the generic deployment tool.
Task-number: QTBUG-121708
Change-Id: I161564923a43c82150f581874ba20a9ad6de310f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e39d13bc873a651007d45b23e1d87a676224cba2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This was in the 6.2 and 5.15 versions of the script, but not in dev,
6.7, 6.6, 6.5, and so was promptly forgotten.
Pick-to: 6.6 6.5
Change-Id: Ic0a1708a29eccd7efe41aa4670ea55f1edb6be0b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 324fe120ba405f0eeca0b1a00cc5aee0ea99f76f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In Qt 5, a QBitArray could not contain more than INT_MAX bits, because
the then-size_type, int, cannot represent more, even if the underlying
storage could hold 8x as much, and the serialisation format, using
unsigned int, could represent 2x.
Therefore, reject old formats with sizes that exceed INT_MAX elements
as corrupt.
Likewise, the Qt 6 serialisation format unconditionally uses 64-bit
sizes, but 32-bit platforms still cannot represent more than
numeric_limits<qsizetype>::max() (= INT_MAX) bits in memory. This is a
valid stream for 64-bit platforms, though, so ideally, this should be
using SizeLimitsExeeded, which, however, is only available from Qt
6.7. So, for now, and until we have SizeLimitsExeeded, mark the stream
as corrupt here, too.
[ChangeLog][QtCore][QBitArray] Fixed undetected overflows in the
deserialisation (opertor>>()) from QDataStream.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ib24cf9218c06a3a05185723c77d4313611c2dd40
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0808beace332631f8100b5700577f10f63e4630c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Embedded loader was missing style set up, leading to a crash
when platform theme style data was loaded. As a drive by, change
the style set up to use Context instead of Activity, since it doesn't
require Activity.
Fixes: QTBUG-119532
Change-Id: I434233e173cc2c90d981bbf2aa0044117a20b17f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit bd5ae42cf86857fa08c2607eb8c9e434317374f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
List might be a reference type, in which case it won't have any members.
Change-Id: Iac2c08c42f31ebc67b31be157f73ae318d328a18
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit ddc67dcc5a270a3739514c23b88ed8612f0ae1f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All calls to the fromVarArg() conversion helper are made with JNI types
from a va_arg list, so they have to be either primitive types, or a pointer
(jobject, which internally is a _jobject *). There's no benefit from
moving those or passing them by reference; the most efficient convention
is to pass them by value.
Change-Id: I6fed9b202be3c6a265117684fecd51d03ccbb534
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 43f66e619176e4903aa62a30dc5ae2122e22f13a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When declaring native callback functions with the JNI type system, then
we actually register a helper function with variadic arguments, and
implement that to forward the arguments to the declared function, which
then might use higher-level types as arguments. We deduce those
higher-level types through a variadic template, and use std::tuple as
well as std::apply to generate the calls.
Simplify the implementation by using std::make_tuple, and replace
q20:remove_cvref_t with std::decay_t; this is what std::make_tuple uses,
and we don't need to maintain functions and arrays as such.
Found during 6.7 header review.
Task-number: QTBUG-119952
Change-Id: I7cd206c6b372c2ec62a10feb5f9253f5607f01a9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 76cf922980cf0cde7cb03f4bec8f17eab94a5767)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 83e5d74864a8780445db4b34e406afc53b331039.
A model index returned by QFileSystemModel might become invalid when
events get processed, so don't store the result of setRootPath to re-use
it in a QTRY_COMPARE function. Instead, always ask for a fresh model
index.
Also, use std::chrono::duration::count correctly; it returns the "tick",
not the corresponding milliseconds, so (10s).count() returns 10 instead
of 10000. Explicitly use 10000ms here.
Un-blacklist the test on macOS again.
Task-number: QTBUG-74471
Pick-to: 6.6 6.5
Change-Id: Ic98bb53c696441131bbc1055b64822faf2aec96f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 72f5b35b3d7704db6ef16e4c60751ed8444363be)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The "qt" meta-catalog is some relic from the past that pulls in the
translations for qtbase and qtmultimedia. The qtbase translations are
deployed by default, and the qtmultimedia translations are deployed if
qtmultimedia is used by the project.
Change-Id: I53e5920d39f87162c418fb3f4cff7927ec9b5488
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 62bea90207b6fde116ef6fbb926565b648708d57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The tables allows us to show how the parameters correspond to variables,
and it gives us the ability to add notes.
Add the note that LIBEXEC_DIR is available since 6.7.
Task-number: QTBUG-121708
Change-Id: I9421bdc692b0df45dc356c17fb90da8799d18ef9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 313b7c56bd4f2053483c1addea89d8e293bc433b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
...that mentions that they're only needed for advanced use cases that
aren't covered by the higher level deployment commands.
Task-number: 121708
Change-Id: Id31aece7ae7685ea5f4940e6c4adf62ae8216528
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 609a9bc93967403726d0139bbf63162cb61d3fa2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since QCalendar is non-trivial, parameters of this type should not
have a default in the declaration; better to have an overload set with
the calendar-less overload out-of-line passing the default.
This actually restores signatures that existed previously, but that
were merged with the QCalendar-taking overloads at Qt 6.
Fixes: QTBUG-121528
Change-Id: Ib10ced67a2398108a31c7e95d5e865b7959bed4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 534e836b69b2f8c5f779b66b05c01bb00b9233f1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add indent to the title if groupbox alignment is set to Qt::AlignLeft |
Qt::AlignVCenter.
Fixes: QTBUG-121049
Pick-to: 6.6
Change-Id: I25e2fe4e73b920baf4c678b6b0e758d1da7cf632
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 4725bbb3ee41ced9f97d42d73505b2513ff9c576)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It appears to be used only in qlalr, which is, however, not
bootstrapped.
Pick-to: 6.6 6.5 6.2
Change-Id: Idc16d957bf687238c7b0ee603d8b092e2048ef18
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e57f7b1b01b9b34a51a4ee3f898ef7f1fb013f17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to the documentation:
GL_INVALID_OPERATION is generated if the combination of internalFormat, format and type is not one of those in the tables above.
https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml
We were allowing the RGB values be passed as RGBA, after this change we
don't do so anymore.
This would result for KWin in:
Mesa: User error: GL_INVALID_OPERATION in glTexImage2D(format = GL_RGBA, type = GL_UNSIGNED_BYTE, internalformat = GL_RGB8)
Pick-to: 6.6 6.5
Change-Id: Ifde8a570eff01be573f780655d8cedbb96f5ba2b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit ba9e57d65f15c935632b0ad22db0bead9a7d5f90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends c4e550703c2bdc1ee710507b8df9c0c9a118402e. The data version
update was just forgotten when updating to Unicode 15.0.
Pick-to: 6.6 6.5
Change-Id: Ibb3e9cb81e9bbcb5d4aaf4e4df6231485531c128
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 1e7f1e5b73b931931178bc884d3469439adf8c5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit ab6950acab5f799e5b3f097a87300e7c1dd1cf04.
Reason for revert: It breaks test_qml_app_deployment test in qtdeclarative for iOS and Xcode
Pick-to: 6.5 6.6 dev
Fixes: QTBUG-121729
Task-number: QTBUG-120317
Change-Id: I356882a97f63534aa17133a4fbbb1db90295dfba
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Instead of separate QJsonObject and QJsonArray types.
Resulted from API-review
Change-Id: I977d692d3709a8c3aa872683ddda54a143c25e67
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 26993046283605a806f34ba604e7dcef20f34ba5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This naming should make it clearer that (successful) calls to
readJson(), readBody(), and readText() consume the data received
so far.
Resulted from API-review
Change-Id: I09ca9eac598f8fc83eecb72c22431ac35b966bf5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit bd78ff024599d33cfcb411ff17727a0f4447bc7e)
This test uses socketpair which is not available on vxworks, so it fails
to compile.
Task-number: QTBUG-115777
Change-Id: I46f3b4ebd937dc4ca2511381dd58451434e6a2fc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4b4a6f6d8e3111f0d9e78285e5951bd89ae37812)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the fontconfig, the fonts will be populated with the variable font
and the named instance from the variable font. In this patch, it will
skip the variable font, and populate the named instances from the variable font.
The FcFontMatch function ignores the FC_INDEX when match the font,
changed the code to match the FC_INDEX by iterate the font list.
[ChangeLog][Fonts] Added support for the named instances from the variable fonts.
Fixes: QTBUG-111994
Fixes: QTBUG-112136
Co-authored-by: Peng Wu <alexepico@gmail.com>
Change-Id: Ic598d69a1e76109958fafa1226ea927656092319
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 185add27b2f7a4aa477e7988260bfaccb930f95c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In operator<<(), stream the QJsonDocument directly, instead of
toJson(Compact).
This is how QJsonDocument operator<<() also does things, but that
knowledge should be need-to-know, and QJsonArray doesn't, seeing as
operator>>() just streams a QJsonDocument, and then calls toArray().
Pick-to: 6.6 6.5
Change-Id: Ia378bf0fb04ce33e3af24a2ce67778e89c41e31a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 264d54953e8b53f2454fbf8361b851923b8115a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The only user of the vector passes begin()/end() to BitIStream, which
appears to be 64-bit-clean.
Change-Id: I4ad0b9e9547008fecc4c816cc92ff9db4b2066e3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 297341396203c5afed6420fa3789485c0996f846)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add classes that make it possible to add QML as a View into
a native Android app:
QtView: Base class for QtQuickView, handles non-Quick dependent
operations. In essence a Java ViewGroup class which loads a
QWindow and embeds it into itself.
QtEmbeddedLoader: Extends QtLoader for embedded case, creates the
embedded version of QtActivityDelegate and provides an embedded-specific
path to loading Qt libraries (Mostly just allows users to set the name
of the main lib)
QtAndroidWindowEmbedding namespace: Deals with calls from
QtEmbeddedDelegate to create/destroy QWindow and from QtView to
show the window.
Take the QtEmbeddedDelegate introduced in an earlier commit
into use, and add functionality for loading QWindows for
QtViews and managing QtViews into it.
Add a factory for creating instances of QtEmbeddedDelegate.
The factory holds a map of QtEmbeddedDelegate objects and
creates them, with the Activity as the key. This is to make
it so that the same delegate can be used by multiple views
which share the same Context.
Known issues left:
* keyboard focus not working, as with other child windows
Task-number: QTBUG-118872
Change-Id: I94a5f9b4f904c05cc6368cf20f273fcf10d31f17
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 702c420f51d9d56ca056315387f224ec2dba3ff3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Our ideal scenario was to run python to run its getnameinfo()... so just
use getnameinfo() directly. This also avoids the problem of Python not
being present and our falling back to nslookup.
Change-Id: I5dd50a1a7ca5424d9e7afffd17adfc830386306f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7b981a4f1a60d8bda22f7f1d21cb2c72ec843ea0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unlike other containers, a QBitArray's size() is not limited by
storage, but, esp. on 32-bit platforms, its size_type: A INT_MAX
size() QBitArray only requires 256MiB of storage.
So we can't rely on "won't happen in practice" here and need to avoid
the potential UB (signed overflow) in the (size + 7) / 8
logical-to-storage-size calculation by using unsigned arithmetic.
Use the opportunity to Extract Methods storage_size() and
allocation_size(), which differ by one (d[[0] contains the size() mod
8), making it clear what's what.
[ChangeLog][QtCore][QBitArray] Fixed a bug with QBitArrays whose
size() came within 7 of the size_type's maximum.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I5d94bae9c9c210ba1e36f8cf03609125c81bd15d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit c6aa399d062c8b31c2ab88acf564a24cdff7b3c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The boundingRect and controlPointRect did not use the start point from
the `QPainterPath(const QPointF &startPoint)` constructor until the
`dirtyBounds` or `dirtyControlBounds` member variables were set to true.
Those two are false on construction. This bug was fixed by adding a new
constructor for QPainterPathPrivate that initializes the `elements`,
`bounds` and `controlBounds` member variables with the start point from
the constructor.
There is also an autotest to verify that the top left of the
boundingRect and controlPointRect are at the same position as
elementAt(0) when the start point constructor is used.
[ChangeLog][QtGui][QPainterPath] boundingRect() and controlPointRect()
now use the start point from QPainterPath(const QPointF &startPoint).
Pick-to: 6.6 6.5
Change-Id: I7bf30364406c14ed60f75d24b78a9a5535f75d93
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit a4f44e06988e91c21c85e0e9f29d656d61f9c68e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the QtWindow constructor, creation of the layout and setting
the parent window were posted on the Android UI thread, leading
to them being called at a later point. If QAndroidPlatformWindow
did not have a parent at the point it was created in, but
setParent() was called shortly after, the QtWindow.setParent()
call with the actual intended parent got invoked before the
Runnable posted in the constructor got ran, leading to the
parent being overwritten with the null one passed to the
constructor, essentially leaving the QtWindow as a top level
one, while the QAndroidPlatformWindow was a child window.
The above would happen more often with foreign child windows,
sometimes causing hang ups when the parent of the foreign
child window was shown.
Creating the QtLayout outside of the Android UI thread seems
to be safe, as long as we only modify its view hierarchy inside
it.
Task-number: QTBUG-116187
Change-Id: If1ed1983f5d6ba56e625148ee6a61771234a2aa1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 8df46c8890a843a651c86d198540d6318dbaa9a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This partially reverts 4ecbe42ff44ace881ed4962744e9cd6c8fa65dab .
The discussion is still ongoing to decide whether the new overload
should take a QBAV or QAnySV. See
https://codereview.qt-project.org/c/qt/qtbase/+/514588 for the details.
For the time being remove the new overload from the API so that this can
be backported to 6.7 (while keeping both dev and 6.7 in sync to ease
future backports).
Change-Id: I4a279653d1941faeafd95dde7a8c741009c00c72
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b3441b4127813148a701b7d538453bfdbe2315a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QHttpHeaders uses QASV for the header name field, and this aligns
these functions with that. Furthermore having QASV as a parameter
will allow a wider range of string types to be passed as a
parameter (convenience).
Resulted from API-review
Amends: 56bb4ac484adb544925b6d7b58e4fd1d77d49503
Change-Id: Iff42b75393b6470a2c34a1913dbe615bf21238db
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8feb41e4462c9879a831d1c753d4200c3287e557)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 104a0a9ecdb18d65e4d9075d87e8860c6c9d8335.
Right now it's no problem for the only two places we use it, but it
could be a problem if someone accidentally forgot when using the macro.
Pick-to: 6.6
Change-Id: I5dd50a1a7ca5424d9e7afffd17ae0a09dc7dd8c1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit c1266c36353629e2253aa897dfc96d4fbbc8c5a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QDialogButtonBox::layoutButtons() rebuilds the focus chain based on the
button layout. It relied on the fact that the last button in the layout
would point back to the first button. That is not the case, if
- a focus frame gets inserted in the chain, and
- the default button is not at the layout's first (=left) position.
In that case, the chain stops at the button left of the default button.
The default button can not be reached by tabbing forward. Back-tabbing
still worked.
By not "closing" the focus chain, the focus proxy was set to the first
button found in the layout. That is wrong, whenever the default button
is not at the first layout position. When the box got focus for the
first time, pressing "Enter" could lead to a non-default button being
triggered. A Yes/No message box would have No as its default button.
On Linux, it would pop up with "No" being highlighted, but "Yes" having
focus. Pressing Enter would trigger Yes, instead of No.
tst_QMessageBox::staticSourceCompat() heuristically defines the
button expected to be triggered by Enter. On Linux/KDE, it would pass,
when the wrong button was fired.
=> Always "close" the focus chain, by linking the last and first
buttons.
=> Make the default button the button box's focus proxy.
=> Change tst_QMessageBox::staticSourceCompat() to always expect No
being fired by Enter in a Yes/No box.
[ChangeLog][QtWidgets][QDialogButtonBox] Default button becomes
focus proxy of a QDialogButtonBox. This ensures that Enter triggers
the default button, instead of the first button in the layout.
Fixes: QTBUG-118489
Change-Id: Ic626d3d0fe7ba8b924c21734332e98532f11c80e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d4f38a363251fcb5cdfb24d7a1aceb7b630f7e8f)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
showNewMessageBox() shows an "old" message box, if a default button
argument was passed and the buttons argument doesn't contain a default
button. It passed the int value of defaultButton to showOldMessageBox,
where it was interpreted as a normal button.
The StandardButton::Default flag was not set on the default button.
This relied on the QDialogButtonBox owned by QMessageBox to show the
expected default button by co-incidence. As this was not always the
case, tst_QMessageBox::staticSourceCompat() even tested wrong expected
results.
=> Add the Default flag to the default button, before passing it as an
int value.
=> As a drive-by,
- replace c-style casting with static casting.
- add braces to multi-line if clause.
Task-number: QTBUG-118489
Pick-to: 6.6 6.5
Change-Id: I9cf93c8f93d6ab80e7be5ab25e56bc59d3d6209c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d71b73c145a35a84547918abe4b0916a7ced6a1e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To accommodate the deduplication and non-owning changes
in previous commit.
Resulted from API-review
Change-Id: I61eb071503d6714c7fd42b3fe533698a8dcd2e27
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
(cherry picked from commit 26d1e0e83e8467b292fd0abb0a563bb914b9b609)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To accommodate the deduplication and non-owning changes
in previous commit.
Resulted from API-review
Change-Id: Ie1c4e9959c1ba7e8ed2be6607d9f6497ae15af39
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit efa178d42c5e9e8c6dc526430f201f16a67149c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Note: documentation will be updated in a follow-up commit
This commit makes QRestReply and QRestAccessManager
classes lighter, non-owning wrappers. Furthermore their
APIs don't duplicate the wrapped QNetwork* APIs.
This makes it easier to use / opt-in to these helpers
in pre-existing applications which are based on
QNetworkAccessManager and QNetworkReply.
Since APIs are no longer duplicated, the QRest
classes are more obviously a convenience _wrapper_,
as opposed to being an alternative vertical stack.
In practice this change consists of:
- QRestAM never instantiates QNetworkAccessManager,
but accepts it via constructor. It does not take
ownership of the QNetworkAccessManager.
- QRestReply accepts QNetworkReply via constructor. It
does not take ownership of the QNetworkReply
- Signals and most duplicated functions are removed
from both QRestAM and QRR.
- QRestReply is no longer a QObject
- Since QRestAM doesn't have much to report anymore,
the debug operator is dropped.
Resulted from API-review
Change-Id: Ib62d9cc2df41cac631396a84bb7ec4d2d54b0c8c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 9ba5c7ff6aa42c5701cf950d2137467a2d178833)
Back when we set the guard and _then_ destroyed the object, the
atomic_thread_fence was correctly placed between the guard setting and
the dtor invocation.
We know nothing about the payload type. For all we know it could be
some fancy lockless data structure. So in general we need the acquire
fence to synchronize the reads done by the dtor with stores performed
to the object in other threads. The acquire fence did that for us.
But when we reversed the two operations, the fence has moved to after
the dtor call, leaving the dtor unprotected. Move it back to before
the dtor call.
That leaves the store to the guard unordered w.r.t. the execution of
the destructor. To fix, make it a store-release instead.
Amends e3e2674100b1ecbad7117f15c7aa13a704a7d34e.
Pick-to: 6.6 6.5
Change-Id: Ic7adbe17c8b474e82af4e84950c0109984b495d1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b6537a9513d274866da2f46827f54e6004196097)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the line width is negative, then we might exit the layout
loop before consuming any text, and thus the loop will never
finish. This is a side effect of a change for maximumWidth:
991c056438b311566bc4ea543af0f33dfd5dffbb.
49a63d375972079ae3000c8b7d512d58d4de32bb fixed this issue for
QTextLayout::setFixedSize(), but I forgot to do the same in
the overload of QTextLayout::setNumColumns() which includes
an alignment width and therefore sets the line width in addition
to the column count.
Basically, we just make sure the line width is never negative so
that the width > line.width condition also means the width > 0.
Pick-to: 6.6 6.5
Fixes: QTBUG-115459
Change-Id: If904bfc64cd74e819a0864db55fa9555073d0781
Reviewed-by: Vladimir Belyavsky <belyavskyv@gmail.com>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit be6c651be4ccfa4f70009bcbb51bef39638e0fba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Small rearrangement to make diff on later variant/union commit
more readable
Task-number: QTBUG-119002
Change-Id: I3f6120b5dcd324b6493072d2eb58209866fb7dc6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit f757662486f2b44cc7cab702c7e89edbc594f4ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Markdown support in Qt has always been symmetrically including all the
features to the best of our ability: we can write all the same features
as we can read (including github extensions like tables and checkboxes),
except that we standardize the output (so it's not always identical to
what was read: headings always have hashes, not setext-style; code
fences and thematic breaks are regenerated, so we don't keep the same
style as the original; and so on), and we probably still have a few
bugs. And in fact QTextMarkdownWriter does not (yet) have logic to
restrict itself to CommonMark, even if it's requested by means of the
QTextDocument::MarkdownFeatures ctor argument. (Of course if
QTextMarkdownImporter reads a document with CommonMark-only restriction
applied, and then you rewrite the document with QTextMarkdownWriter,
presumably you would not have any GitHub features in the output.)
So the existing output from configure -list-features was misleading:
texthtmlparser ........... Kernel: Provides a parser for HTML.
textmarkdownreader ....... Kernel: Provides a Markdown (CommonMark and GitHub) reader
textmarkdownwriter ....... Kernel: Provides a Markdown (CommonMark) writer
textodfwriter ............ Kernel: Provides an ODF writer.
Amends e4079eca49adce16e31dac2a18d49d7a55817891
Change-Id: Ic2d9664388bbf17cef41ca0eaad600485a1bb7ec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3bcfd55cb3bc45c92345cc69b361030534ddb140)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add rbeing/rend overload, relevant typedefs, and decrement operators.
As a drive-by, add noexcept to begin/end functions.
Found during header review.
Task-number: QTBUG-119952
Change-Id: I32d9a7d50a1f03550944c2247516c455d4822fe7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit cc5251ed59ea6ecf0cc666ae5321be6de5383e90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Augment test case. Found during header review.
Task-number: QTBUG-119952
Change-Id: I326395397167edb05ff1f45f7151614c02b7e7eb
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e5074cd3540e165f771aa5bfea36d09553eadc77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Java still only can handle arrays of at most 2^31 entries, and the JNI
API for working with arrays is using types that are essentially int.
Assert that the container passed in is not larger than that.
Found during API review.
Task-number: QTBUG-119952
Change-Id: Ia0cbdbf098cf5b2c8ec50f0dd24dadf833bf40d0
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 23fb1c50eecaed2f5a3ebfe95e72892c054e4414)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QJniObject is not prepared for being subclassed (no virtual destructor),
and doing so is formally UB.
Instead of making QJniArray(Base) a QJniObject subclass, give it a
QJniObject member and make it convertible to/from QJniObject. Existing
code still works with this change, even though it removes all the
inherited QJniObject APIs for accessing fields and methods. However, as
the Java array classes have a very narrow and well-defined API anyway we
could, if needed, add those as C++ member functions instead of going
through calling-by-string.
Found during API review.
Task-number: QTBUG-119952
Change-Id: Ic4437116eed5e15226449bdabe48ab657cb14dc3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 101ab278913e3bacc7c0596ae0a5bf3c0fa2f922)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The implementation calls a const member function on the QJniObject
passed in, and no move happens. And the parameter is not a universal
reference either.
Found during header review.
Task-number: QTBUG-119952
Change-Id: I9479df798178b089277aa230f50f4e73f38ceb2c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit a6151e2d35b67e628eb1a6932bec39e100a2d692)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add missing nested typedefs for both the QJniArray container and
the QJniArrayIterator. Expand test case to make sure that some standard
algorithms (such as std::distance and ranged for) work with those
types.
Found during header review.
Task-number: QTBUG-119952
Change-Id: I96f348215c6f1e0e1ce777d9bdd2f172d7e52974
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8f04615bcddbe4d8d00f2f7e977e13f93f90fddb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Version 883ced078a83f9d79a98933145425c221a5e51f0, fetched on
2024-01-25.
[ChangeLog][Third-Party Code] Updated the public suffix list to upstream
SHA 883ced078a83f9d79a98933145425c221a5e51f0.
Pick-to: 6.6 6.5 6.2 5.15
Task-number: QTBUG-121325
Change-Id: I95e82b5c351218c1641e11e7a166ae21be2c5ad6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit a17c10a63b3a86c71ebe6df54e56c9bce3ed5f18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QCalendar is not a trivial type, so using it as a default argument in
various fromString() overloads introduces an extra overhead.
In this case the function actually always needs a QCalendar object,
and a default-constructed QCalendar reproduces a valid gregorian
calendar. But getting rid of a default argument still gives us the
benefit of constructing the object only in the library, not at every
call site.
So, split each overload into two - with and without a QCalendar
argument.
Amends 41f84f3ddb780ec751e3fc706dd242fc4a99de7a
Found in 6.7 API review
Change-Id: I7329276cbda0e5471dc5348af92fc8c9ca4e0738
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 59db912e860ddd045ea779fa579f2915535d0cf7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The mutable operator[] method was marked as inline only at the
definition, not the declaration. This is known to cause compilation
failures on MinGW when the function is used in other inline
implementation (cf. e.g. QTBUG-56459). It's not, atm, but fix the
issue proactively.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: If805122d9f8dbd72641173509c4b860c20fc1cdc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7310d2bd5562d1a88b69a544ab9b88c13cc3f978)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously we had four-ish locations where the CMAKE_BUILD_TYPE was
force set.
Twice in QtBuildInternalsExtra.cmake via
qt_internal_force_set_cmake_build_type_conditionally(), depending on
some conditions. This was executed right at
find_package(Qt6 COMPONENTS BuildInternals)
time.
And twice in qt_internal_set_default_build_type() via
qt_build_repo_begin() / qt_prepare_standalone_project() that goes
through QtSetup.cmake. This was executed only if the relevant functions
were called, rather than directly at find_package() time.
The exact logic of which build type ended up being set was very
confusing.
Refactor the code to decide the build type in one single location
when qt_build_repo_begin() / qt_prepare_standalone_project() are
called, rather than directly at find_package() time.
The actual logic when we override the build type depends on many
factors:
- when an explicit CMAKE_BUILD_TYPE is given, honor it, unless it's
a multi-config build
- when it's a multi-config build, don't set any CMAKE_BUILD_TYPE,
use the value of CMAKE_CONFIGURATION_TYPES
- when it's a qtbase build, compute a default unless an explicit value
was given
- the default is Debug if FEATURE_developer_build is ON
- otherwise the default is Release
- when it's a top-level build, only choose a build type for qtbase
- when it's another repo build, use the original build type unless
another was given explicitly (including in a top-level build)
- when it's a standalone tests build
- if qt is multi-config, the tests will be single config, due to
various CI failure reasons, this hasn't changed
- if qt is single config, use the original unless an explicit
value was given
- when it's a single standalone test build, use the original unless
an explicit value was given
To determine when an explicit CMAKE_BUILD_TYPE was given in contrast
to when it was default initialized, we now have one single function
that uses a few heuristics.
The heuristics are needed because we can't reliably determine an
explicitly given 'Debug' build on Windows, because CMake default
initializes to that.
The heuristics include:
- checking whether CMAKE_BUILD_TYPE_INIT is different from
CMAKE_BUILD_TYPE
- checking what the CMAKE_BUILD_TYPE was before the first project()
call when CMake default initializes
- we save the previous value in the qt.toolchain.cmake file
- also in QtAutoDetect during qtbase configuration
- also when building the sqldrivers project
- honoring the value of QT_NO_FORCE_SET_CMAKE_BUILD_TYPE
As a result of the above changes, the build type will be set exactly
zero or one times, for a particular build directory.
Note that the configure script also has some logic on which
CMAKE_BUILD_TYPE / CMAKE_CONFIGURATION_TYPES to pass to CMake
depending on whether -debug / -release / -debug-and-release /
-force-debug-info were passed. But once the values are passed,
CMake will honor them.
Amends 48841c34d2e86a741ec9992b9704c0fa5973503c
Amends 8c912cddebe544010e7da3f87af5b21f3328d7ec
Task-number: QTBUG-114958
Task-number: QTBUG-120436
Change-Id: I30db14d1e8e9ff9bd2d7ea1d2256cdeb9493ca0d
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 49902cc6ce228c9365c54b0dbe777ae63720310c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A leftover, the class used to have some SSL functionality.
Change-Id: Ie987fe086b3e7e5583a9e69dd80e670b131d2832
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 1ea51e1f2dfedbea306a16b2a2996ed13c29f7fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Means we don't need to allocate it on the heap and optional<> fits the
semantics of an optional object better.
Change-Id: Id02c4847c2357c3033dce94b68787ed37d6ca276
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9a08f2fbc8476111b1d7a42f0b9b9eb4e71deeaa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The definition of iterator_t, and, therefore, of is_compatible_range
depends on this, otherwise say, 0, is being treated as a valid range
and hits a hard error in adl_begin() when trying to call begin(int&).
TIL: decltype(auto) does _not_ SFINAE.
Fix by calculating the return type manually, re-enabing SFINAE.
Pick-to: 6.6
Change-Id: Icacd70554f4050ecaeb396c9ae60bc4f21a220c9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 94e122c594a3697b98dcc99a9e332b0f5e816d2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Wrap the QMetaMethod::invoke() calls in a helper function in
preparation of filtering execeptions as part of QTBUG-66320. Rename
the existing helper function to make the old documentation comment
redundant.
Pick this back to LTS branch in order to avoid needless code
divergence going forward.
Pick-to: 6.6 6.5
Change-Id: I34ae24bf23ea21d7063016257908f925fc087298
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 5e237f1af21af363a395aef09f93115c5882b443)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Tooling can then use this information to find the correct base class,
even absent C++ scoping information.
Pick-to: 6.6 6.5
Task-number: QTBUG-101141
Change-Id: I5350da8d2d9aaf5ec86027357131ebac1eb50372
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 672a824639a927e7e3061e84dfa35e06eb26a7fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On most platforms EWOULDBLOCK is defined to be equal to EAGAIN.
However on some platforms (like VxWorks) it is not the case.
Because of that, error returned from ::write is not handled properly on
such platform.
Since C++ does not allow duplicate switch labels, check if EWOULDBLOCK
and EAGAIN have different values before adding EWOULDBLOCK to the switch
statement.
Task-number: QTBUG-115777
Change-Id: I659cb946f239733f5c57b2000fb4e3d296ed9153
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1d46bb3c920a3e4c9fc4d09f759cd6ffae4080d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The file was added in fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
by a TQtC employee, so the header should mention The Qt Company Ltd.
Change-Id: Ib191d2d63656c42f783db87de489814d387dfbca
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit beebf6450c3720029ba5038b46c6db883504a142)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
GCC has a bug [1] that does not allow to specialize templates
outside of a namespace.
An attempt to build the test results in the following error:
tst_manualqdatastream.cpp:18:15: error: explicit specialization in
non-namespace scope ‘class tst_QDataStream’
Fix it by converting the template specializations into simple function
overloads.
[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282
Change-Id: I7803cce1687ca8ae992f1a57394346eb6fc90c8b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b9c8c57e3f8f2a07c22059d9c8e7210469198200)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This status is supposed to be used when the stream tries to read
or write more data than it is supported by the current platform.
For example, reading more than 2 GiB of data on a 32-bit platform will
result into this status, but it will work fine on a 64-bit platform.
This patch uses the new status in read operations.
Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
Found in 6.7 API review
Change-Id: I675b1ee25fafba174ce8f94c3470dbb7893d6d9e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 36cc9fc54a1b581e5fd9377e0ddbcd1670ab447f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Given a dir A that has some files and a subdir B, when a model is set to
only show files, setting the root path to A, the filters are initially
respected. Setting the root path to B then back to A, the filters would
be ignored and B would be visible in the model.
Traversing the path elements in node() led to dir B getting added to
the bypassFilters hash table, which made filtersAcceptNode() bypass the
filters.
I couldn't find a commit explaining the logic behind using bypassFilters
(the trail goes cold at the 'Qt 4.5' mega commit). The only clue I found
was the "// always accept drives" comment in the code, which hints at
this being useful only on Windows(?).
Fixes: QTBUG-74471
Pick-to: 6.6 6.5
Change-Id: Icb9055524a28990c591e924634a63e29a49835aa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 83e5d74864a8780445db4b34e406afc53b331039)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This was added in 1591a959876bc5a37aacc817e637400c72bf6623 on top of an
older version of md4c, but those casts now exist in upstream code,
which we upgraded to in c29a235833410fde4cb4d502f89129bccd7403f0
Pick-to: 6.6 6.5 6.2
Change-Id: Ia1a939ed69bcd52ac8afd91dbd574767b59032d6
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit bdfe05ecef72a46c7572e37d8506c4256ba83fc9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends commit db9009721a11f482b601a228eb6d0e1658d997b0, which fixed
the *-metatypes.json creation for Makefile generators. User feedback and
the comments in the underlying CMake issue #19005 suggest that all
non-Ninja generators are affected.
Fix this by activating the work-around for all non-Ninja generators.
Pick-to: 6.6 6.5
Fixes: QTBUG-120317
Change-Id: I537ff7be9c658b7053f7f5df6cbced460be43270
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3a4397af2e5076a3425e92d8bbeae37b4267c389)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is needed for proper inet socket address working
on this platform.
Task-number: QTBUG-115777
Change-Id: Icde7ff7baf257762339f5f72a783c92f6b297a46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 09a21c73a03dd9a9604e5e8dc69a7f631b8197a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The moc generated code does a sanity check that NOTIFY signals actually
exist in the parent class when they cannot be found in the class moc
currently runs on.
The logic there was however too simplistic, and couldn't deal with
signals taking a parameter.
Fix this, and take the opportunity to use a proper static_assert instead
of generating a "normal" compile error.
We do not do any checks for the presence of QPrivateSignal, as the whole
point of QPrivateSignal is that it should be private (and not e.g.
protected).
Moreover, we adjust QMetaProperty::notifySignalIndex to take
single-argument notify methods into consideration as well when
encontering an unresolved notify index.
Fixes: QTBUG-115989
Change-Id: I8a056a15777f3132691e207b4b9ab6c2c9b2126d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit ac001bef798b79f4932d7ca8f4fb812159ba75ca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This follows up on commit d59e539b3a1252aa22783c4fdf1e22b35e5a4292,
doing the same for one of its callers. The mapping from windows IDs to
IANA ones is hard-coded (using CLDR-generated data), so the
(now unchanging) availableWindowsIds() list shall always map to the
same list of IANA IDs.
Pick-to: 6.6 6.5
Task-number: QTBUG-120682
Change-Id: I4d610c24110064236b375cab04cde90bbe07735f
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>
(cherry picked from commit 83871413636407f196c2ef7ca4e5b0a846c646ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... by allowing d == nullptr to mean the empty state.
Needed to add a few guards and specialize QESDP::detach() to be able
to detach from nullptr.
This also gets rid of the partially-formed moved-from state. It's now
guaranteed to be empty.
Change-Id: If874d7c69d91eb4babe667ae577f261610d52fd3
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 61130d73d47249fb1106ed86f8da908c96fe11c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a QTextLine consists of multiple different scripts and the
fonts had negative bearing, the background for a script item could
overdraw the previous item's text, causing it to look clipped.
This was because the background and text was drawn in a single pass,
and moving the background drawing into its own pre-pass fixes the
issue.
[ChangeLog][QtGui] Fixed an issue where drawing text from different
writing systems in the same line and including a background could
cause parts of the text to be clipped.
Pick-to: 6.6 6.5
Fixes: QTBUG-121040
Change-Id: I3f79e6d33c09a2a92853bc8752dbe11a0bea2dd0
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit 8be3c9f4867ce7982387b075739b8f55c5c45753)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 922d195020d54d7e599d135f6a5e0338100e08f1.
Another infinite recursion was found in the case of populating
font families for cases where the typographical name is different
from the populated name.
The specific font triggering this had two "preferred name" entries
in its name data. This was one for Chinese (PRC) and another for
Chinese (Taiwan). Our GDI backend does not do matching based on
locale, but will prefer the English if available, otherwise it
will just pick the first one. The font in question does not have
the English preferred name.
For this particular font, we would select the Chinese (Taiwan)
name as preferred and since it had not been populated, we would
populate this. However, on Chinese (PRC) locale, Windows would
report this according to the Chinese (PRC) name. We would once
again translate this to Chinese (Taiwan) and go into an infinite
recursion populating it.
The quick fix is to mark the preferred family as populated before
entering the recursion, so that we do not re-populate it a second
time later.
Ideally, the font database would match the preferred name based
on locale, but since we are moving away from the GDI font database
and this is already handled better with the DirectWrite database,
just fixing the recursion is sufficient here.
[ChangeLog][Windows] Fixed an issue where an infinite recursion
could occur if the system had a font with multiple preferred names
in non-English languages.
Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-118238
Change-Id: I6ded369f1c908e51c0ba2ad9127538faf07e192e
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 11344f57235b5c8149d231c1331f86bcff51bd50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Originally we thought that exposing the string literal through the API
would be useful for people that want to know what icon they will get
when using a specific constant. But since the mapping from platform
independent icon name to platform specific icon name is anyway hidden
in the engine implementation, this is no longer useful.
Based on header review comments, simplify this by making the ThemeIcon
list of constants a scoped enum.
If it's really useful for e.g. designers to know which exact icon they
get on a specific platform, then we could, in a future release, add a
static QIcon::themeIconName API that returns the platform specific icon
string for a ThemeIcon constant.
Change-Id: I231eb98fefb4ac82d38209b4e1257bb3caadeb08
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3042d40be79f28eaa1828474bc8109d0dbe152b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QHttpHeaders::reserve() and QHttpHeaders::isEmpty() instead of
going directly to d->headers. Will help in enabling a nullptr d.
Change-Id: Id530f8922b17058ec47530523ed43e08927c3ce3
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit f5056a0b53bcc3f095efb5664201e4a0daea9c1e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Before calling a mutable member function (in this case,
QList::reserve()) on one of the Private members, we need to ensure
exclusive ownership of our external state, otherwise we have a Data
Race, because QList::reserve() is not thread-safe (only re-entrant).
Change-Id: I1249de9449865cbf6ab519b0d38b3bf4e743f16d
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 119a6b51869b7ffba4fa49bc07e78a243fe4a9ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On RHEL variants, if coreutils-single is installed, ls is a script
that contains:
#!/usr/bin/coreutils --coreutils-prog-shebang=ls
Replace ls with sh, which is supposed to be a binary (or a symlink
to one) everywhere.
Pick-to: 6.6
Change-Id: I2a43ac9e3332a470951bbf3335f2fdf3ae5c698c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1026e2c98c602ec51bcb722a6597bc7a37a4e6ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously we only warned about unsupported cmake generators when
configuring qtbase.
Now we do it for other submodules as well.
Pick-to: 6.6 6.5
Task-number: QTBUG-120602
Change-Id: I9d78db546bcf1238604362b248d41d4516b60b2a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9932f2dd479baefb915ad841c95855d61b764ab6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We should avoid int-based timeouts nowadays, and prefer std::chrono,
or for timeouts where Forever is a valid state, QDeadlineTimer.
Discovered during API header review.
Change-Id: Ia56a67084c7a2f989951755fed5ffc161ed8f79e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 3f2a9523a442e44ef52ebca30da9b5d3188df6bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The only implemented virtual function, convert(), is inline, so the
vtable and type_info for this class were duplicated in QtGui,
QtWidgets, and any other library that may use this.
Fix by exporting the class and de-inlining convert(). The vtable is
now pinned to qmetatype.cpp.
To prevent MSVC from exporting the trivial static helper function and
possibly rendering its constexpr non-functional, make it a template.
We have two macros for this purpose, with different semantics: The
Q_WEAK_OVERLOAD macro is related to overload set management, not to
keeping function out of the ABI, even though it does that, too. And we
have QT_POST_CXX17_API_IN_EXPORTED_CLASS for ABI control, but this
function is not using post-C++17 features, so since both macros need a
comment, and both don't fit 100%, I used the shorter one.
Task-number: QTBUG-45582
Change-Id: I2ce4a7110e09def1a595d717c073df844213611c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8d88f1282bb614ba8fdc0990f733f74639a13cea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found in header review.
Task-number: QTBUG-119952
Change-Id: If98415f7c5115e8d1875f5f03e399b2919bb250b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fcaf9a476f91dd95252dedd2422091420713a24a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Move static assertions for StandardButton and ButtonRole enums from
header to cpp file.
Use qToUnderlying instead of casting and assert types where possible.
Amends 773f9ab0189bbb439c3066695c947b11a20c484f.
Found in API-Review.
Change-Id: Ia52886e6e33a3b94b327d17d1453e18febe6dd50
Found-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Task-number: QTBUG-119952
Pick-to: 6.6 6.5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4cd2baae9abc07200c70cb007ce12b800a786927)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The code did not handle the path where we didn't have a challenge.
We cannot recover from that so we just have to fail the request.
Amends fe1b668861e8a3ef99e126821fcd3eeaa6044b54
Pick-to: 6.6 6.6.2 6.5 6.2
Fixes: QTBUG-121515
Change-Id: Ie39a92e7439785a09cad28e8f81599a51de5e27f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit ffe0271a21e9574d1c9eab5fb9803573e17e0f22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All of the implementations will attempt to perform a filesystem rename,
so the runtime is constant for a single file and possibly for a
directory full of files too.
The macOS and Windows implementations use the OS API so they run with
slightly elevated privileges. That means they don't fail under normal
conditions. The XDG implementation will fail if the file or dir being
trashed resides on a volume which doesn't have an existing trash
location for the current user and one such cannot be created either, or
if the hardlinking/renaming fails (usually with EXDEV).
Pick-to: 6.6
Change-Id: I76ffba14ece04f24b43efffd17abd67e20196f2b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 6d1b4d574021bc2d036e61526b01a2dea5876b5b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QtLoader now calls the correct methods when initializing static classes
and retrieving ContextInfo based on the type of the Context (Activity
or Service). This is done to avoid the need for code duplication when
introducing other QtLoader sub classes that deal with the same Context
types, such as the loader for the use case where Qt is used from a
native Android app.
Abstract methods and their implementations in subclasses
aimed at handling this removed as a result.
Change-Id: I6cda8e4733594a6a3963cf0fd8217de2fbd408f8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 24a0d958a72e94c3e39b3a995ca0b2789b942dbe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use "Constructs" instead of "Construct" in the initializer_list ctor
docs, because it's what all other ctor docs also use.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ie84d208b81a062851d95fb336553e8e7c57d4b73
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 6147b3f5b2da44b26ff736e3ec850f7cd4cd2ccf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 09afa7575276d7b500f17671a1ca9ca677767b44.
It broke Qt Designer, which creates QDrag objects without any mime
format. It's likely that user code does the same to support internal
drag'n'drop.
Pick-to: 6.6 6.6.2 6.5
Task-number: QTBUG-119216
Change-Id: I8b74f2d9b89588cd35bca9ca20973810036a2635
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 97bb0ecfe628b5bb78e798563212adf02129c6f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In md4c 0.4.8, three or more hyphens immediately after text were seen as
a thematic break:
some text
---
But in 0.5.1 it makes the text into an H2 heading (even though this
style of heading would normally have the text fully "underlined" with
hyphens). The CommonMark spec 0.30 says
If a line of dashes that meets the above conditions for being a
thematic break could also be interpreted as the underline of a setext
heading, the interpretation as a setext heading takes precedence.
Thus, for example, this is a setext heading, not a paragraph followed
by a thematic break:
https://spec.commonmark.org/0.30/#example-59
So the new behavior seems more correct. But rather than testing so
deeply, just disambiguate by adding a newline, since Qt may be expected
to work with various versions of md4c, and such minor behavior
differences are not expected to come up often in practice.
QTextMarkdownWriter already adds a newline when writing such markdown.
Pick-to: 6.6 6.6.2 6.5 6.2
Change-Id: I5a4bf8720d994616274eb8534b4d7085399130fc
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 3bd4c1b670b8b973e8a782bcaec7078027f6ea36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add bool QObjectPrivate::moveToThread() which returns the success state
of the attempt to move the object to the new thread. For Qt7 the public
signature of QObject::moveToThread() should be changed to directly
return this value.
[ChangeLog][QtCore][QObject] QObject::moveToThread() now returns a
boolean success state.
Change-Id: I8441c8155a76b804b473ab9c45c2be6840ef1677
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e752c77b35185fa51cdc3684329a9733abe2be3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current implementation of the API accepts only two
arguments, {target} and {qdocconf}. It passes a few
environment variables to build targets, providing info.
about the Qt version being used. QT_INSTALL_DOCS is one
of these environment variables, and it is the install
path for all the Qt module/addon documentation sets.
QT_INSTALL_DOCS is also the path where the global QDoc
configuration files are available.
If a project uses the qt_internal_add_docs to create
the build targets for the documentation, and the Qt
version used to configure the project is a pkg installed
using the qt-online-installer, the QT_INSTALL_DOCS path
is always wrong. Such projects should either maintain a
CMake setup for documentation or configure and
build Qt from source with the correct QT_INSTALL_DOCS
path, which is then passed to qdoc.
This change enables passing additional indexdir
and other arguments to QDoc, which is useful. For example,
if QDoc cannot find all the cross-module link targets,
you could either pass extra indexdir argument to resolve
the links or turn off the link errors.
For example, if your qdocconf has the following depends
entry to enble linking to other modules:
depends += qtcore qtmultimedia
And the documentation for these modules are not part
of the Qt installation used to build the projects, you
could pass additional index dirs to enable cross-module
linking.
qt_internal_add_docs{target_name qdocconf
INDEX_DIRECTORIES /absolute/path/Qt6/Docs /one/more/Qt6/Docs /another/Qt6/Docs)
Change-Id: Ieac271ddf92990d722602487c41af7f18546d096
Done-with: Topi Reinio <topi.reinio@qt.io>
Task-number: QTBUG-121457
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit c024af0d12e35891e19752c1f7cd6fb3371d09b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QT_INSTALL_DOCS is configured with incorrect path sometimes,
especially while configuring qtbase with QT_HOST_PATH,
which also lets you build documentation for the essential modules
such as QtCore, QtGui, and so on. If the default QT_INSTALL_DOCS
path is wrong, a way to override the path would enable building
documentation for the essential modules without having to build
parts of qtbase.
Change-Id: I686e0bc103f9722aa98f3c02d2a5af9e645cc9d9
Done-with: Topi Reinio <topi.reinio@qt.io>
Task-number: QTBUG-121459
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 5f6f4903a63976fce6468098008318ebeca15cb3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't export both, the one is just calling the other, so make it inline.
Give parameters descriptive names that match the documentation.
Found in header review.
Change-Id: I48b221a4fcc476483fee2842ec0a5cadd628b803
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 703f922b18110ed90018bd05526661937c3067f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 7c5cf8cae054954975a3e262f7fe3cd9897d67f4, which
removed the old function that didn't have any parent parameter
from the API, and added a new one with the parent parameter in
its stead.
However, to make sure that the new function is source compatible
with existing code, the parent parameter must be defaulted to
nullptr (which it already is in the new version of
saveFileContent).
Found during header review.
Change-Id: I3e734905be9788ae1b206c7a65328e604667f5e4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit bed7788402fe0cab9eb36d37e9fff9e65b3fbfe6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When using one of the non-Unix makefile generators ("NMake Makfiles JOM"
or "MinGW Makefiles") then it possible to trigger an error when running
qmltyperegistrar: ..._metatypes.json: illegal value
We create the metatypes JSON file initially empty and then "fill" it
with a custom command. This command is not triggered when using Makefile
generators. See CMake upstream issue #19005.
Our work-around for that issue was only triggered for the generator
"Unix Makefiles". Now, it's triggered for all makefile generators.
Pick-to: 6.5 6.6
Fixes: QTBUG-120317
Task-number: QTBUG-121472
Change-Id: I329cb0d3e9ba0997d618821e7bcbc20284561419
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit db9009721a11f482b601a228eb6d0e1658d997b0)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Iterators are required to be default-constructible and
value-initialized iterators must compare equal.
In a const_iterator, the pointee should be const, not
the iterator itself.
Found during header review.
Task-number: QTBUG-119952
Change-Id: I036c0a62ade8c59dc5d62c0823b375223719af3f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 100071af82963e712cb055e5d98795376d89e65c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... not in qmetaobject.h.
Don't include more than we need.
Found in API-Review.
Amends b856790d67ad25f5cd8e374cb299a129acbea2ff.
[ChangeLog][QtNetwork] The enums in namespace QSsl are now Q_ENUMs.
Change-Id: I67ec107ce5ab266cfad8a628e7ba3496d2484766
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 93a4478c5f71d7705c2da5957660219508aef769)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Wrongly used QStyle::PM_ExclusiveIndicatorHeight, which is height of a
radio button indicator instead of QStyle::PM_IndicatorHeight, which is
height of a checkbox indicator in pixelMetric() calls for checkbox
subcontrol of groupbox.
Pick-to: 6.6
Change-Id: Ifbf7783fd4494d1e00ee28c27fa5f62b319b8787
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit b820aa7a04be0308b00c32b0e884421fbbb89269)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This ioctl was introduced in kernel version 4.18 and before that it was
used for btrfs alone. It is currently (kernel v6.7) supported by:
* btrfs
* ext2/ext4
* f2fs
* gfs2
* xfs
See man ioctl_fslabel(2)
This means we won't need to list the /dev/disks/by-label directory if
you only have mounted filesystems like the above or tmpfs (which doesn't
support labels).
On my system, there are still two cases that cause the listing:
* a mount point not readable by my user, such as /.snapshots and /root
* a FAT32 filesystem mounted on /boot/efi
Change-Id: I76ffba14ece04f24b43efffd17ab3dced74ffd2c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 14115da183d2271dbc25446e4f9eda478722eff8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and not just for Qt 7.
Found in API-Review.
Amends dd50d58af267bd3b79d1ca31b920d72b925d5a37.
[ChangeLog][QtNetwork][QHostInfo] The lookupHost() static function now
takes const QObject* receivers (was: (non-const) QObject*).
Change-Id: I22b11e06cfba4e96975239cabed8b379cf3f4fa4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 4b3d6be5f5a175a4c66b527eb2df49d62dc30056)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qtgraphs defines a target in one directory, and then calls
qt_internal_extend_target with NO_UNITY_BUILD_SOURCES in another
subdirectory scope. That in turn calls set_source_files_properties
but only for the latter subdirectory, and not the main target
directory.
Because CMake has per-directory-scope source file properties, the
'no unity sources' option was effectively ignored.
When using CMake 3.18, make sure to specify the TARGET_DIRECTORY
option so that the source file properties are added to the scope of
the defining target.
Pick-to: 6.6 6.5
Change-Id: I4190d4073a2955aa7053b5faaaa57f683bc768a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 081e50d768114aeeb8f0d284989986d4debc6ec3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For better consistency and git changes tracking add trailing comma at
the end of the last value of an enum.
See also code-review at:
https://codereview.qt-project.org
/c/qt/qtbase/+/528392/comment/663ba25a_51ed514b/
Change-Id: Ibcfcfb1ba1a8ba4b59297bf17103181a0ee6eafc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit afa6cbed649add8abcef7f07e97e83b16983ff16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the user:
- has a non-developer-build -debug-and-release Qt
- and tries to configure the sqldrivers project with
-DCMAKE_BUILD_TYPE=Debug
our build system discarded the user request, and defaulted to
'Release'.
That happens because CMake sets CMAKE_BUILD_TYPE_INIT to 'Debug' by
default on Windows-MSVC, and we have no marker to differentiate
that the 'Debug' value was user-specified.
We have such a marker
- via the
__qt_auto_detect_cmake_build_type_before_project_call variable
when configuring qtbase / top-level qt
- via the
__qt_toolchain_cmake_build_type_before_project_call variable when
configuring via the qt toolchain file (although that doesn't apply
when configuring a multi-config build for obscure reasons, which
should be addressed).
A conservative fix is to add a new variable / marker called
__qt_internal_standalone_project_cmake_build_type_before_project_call
which the 'sqldrivers' project will set with the build type that is
detected before the first project() call, and use that to decide
whether to override the build type, similar how we do with toolchain
file variable.
We could reuse one of the previous variables, but I figured it's better
to be explicit with a new one. And hopefully we can clean up the whole
logic in a follow-up commit.
Amends 48841c34d2e86a741ec9992b9704c0fa5973503c
Amends 8c912cddebe544010e7da3f87af5b21f3328d7ec
Pick-to: 6.6 6.5
Fixes: QTBUG-120436
Task-number: QTBUG-114958
Change-Id: I37e3d8041088fe6084a9976ecc80ddd62d73ef81
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5b5fa7b75a2465e085c7df61c64755bb65b51f1c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
IMPORTED targets obviously have nothing to sync. So we should ignore
them when collecting dependencies for header sync.
Pick-to: 6.6 6.5
Change-Id: Ief68ff5eb2eb13a3fe1608445e8f5e6abb5971b4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 868e91474c085bd3bf8c5635fc069731afc2e44a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the redundant template parameter. As a drive-by, swap
pointer members using qt_ptr_swap instead of std::swap.
Found during header review.
Task-number: QTBUG-119952
Change-Id: Ibed9c7e7866672401b9dd87ff6e33db8f61e7282
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 3fd49e95a9db3f4c6805c7fcf85fbebe1d6463d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were assuming that QWidget was in full control of QWidgetWindow
destruction, via deleteTLSysExtra(), and that we could limit any
cleanups to that function.
But in some situations QWidgetWindow is destructed from other code paths,
in which case we were left with dangling pointers to the QWidgetWindow
in both QTLWExtra, as well as the backingstore.
This can happen if there's a child widget hierarchy where there is not
a 1:1 mapping between QWidgets and QWindows, for example if the window
attribute WA_DontCreateNativeAncestors has been set. In this situation
our normal recursion into children in QWidget::destroy() stops at the
first widget without a window handle. When we then delete the top level
QWindow, the QWindow destructor will delete any child QWindows, which
includes our leaf QWidgetWindow.
We should probably fix up QWidget::destroy to continue looking for
children, even if we don't destroy the current child. But independently
of that we should make sure the QWidgetWindow cleans up when it's being
deleted, regardless of how it ended up there.
There's further room to clean up the deleteTLSysExtra() function and
friends, but that's been left for a later time.
Fixes: QTBUG-120509
Pick-to: 6.6 6.6.2 6.5
Change-Id: Ib691df164d7c9c83cb464c0a6bf3bc2116e8ca43
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 12203e94f5a34b59b6a7389402c854e823135a35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix build of the test by removing the reference from the
container type before accessing the nested typedef.
Change-Id: Ic35f312bac70b8f8f80149a3432329070c8c8c7d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2c9525a501a33b880e49b57a7c5fa5f11d70bc0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've already done a lot in 59600a514ba99ed62b46237d8f160dea84474190,
but we can do more:
Thanks to std::exception_ptr, we can drag the handling of unexpected
exceptions completely to out-of-line code, leaving only the catch(...)
as inline.
As a nice side-effect, we no longer need the nested try blocks in
QVERIFY_THROWS_EXCEPTION to work around GCC -Wexceptions or MSVC C2312
complaining about two handlers for the same exception type (which can
happen when exceptiontype is std::exception itself).
This may not handle __cxxabi::__forced_unwind correctly, but it
doesn't need to: Tests should not need to call THROWS_EXECPTION on
code that could emit a pthread cancellation; tests are controlled
environments.
Keep the old qCaught() function for BC. We don't promise BC in
QtTestLib, but it doesn't cost much.
Change-Id: I1e1627c6341b09197a8a79669fde061c47e6ba47
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit f0dcbb66e8c54d497d5d118a13a7a0b4fc1b3d94)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There are a couple of possible runtime errors that could happen before
the state was changed to QProcess::Starting. This aligns the Unix code
with Windows, which has the state transition at the top, and with the
documentation which says we will enter QProcess::Starting state.
Complements commit 956b2495285251e4840ec32885ffa2cfbb7bd79c, repeating
what it did for Unix (removing the overwriting of the error message that
openChannel() sets) on Windows. We also need to ensure cleanup() is
always called.
Pick-to: 6.6
Change-Id: I76ffba14ece04f24b43efffd17aafdd47f908bf1
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 79e1389fb9ea4e43e61ab35e41ed275cb76eedbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's a lot of variation in the benchmark graphs for QHash
presumably caused by variation in seed.
Optimally we would set deterministic seed for all
benchmarks, but we don't know whether or not it is
one until the macro is reached.
Pick-to: 6.6 6.5
Change-Id: I4e412e4d4e2cc65eada94ed123243ed0047dd9cf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit aec39bd136defe9e6646b9edfcdd2f02d62471f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The doStat() function was too simple. Plus, we can now avoid having to
come up with an non-zero-but-unused device ID for some corner cases.
Change-Id: I76ffba14ece04f24b43efffd17ab3a79e54e636d
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 96e5d0d5c19c09a2b0db5bd067deac06232a48ed)
With MySQL 8.3 mysql_fetch_field() was removed which was used in
QMYSQLDriver::record(). There is no real replacement function so we
use 'SELECT * from table LIMIT 0' to retrieve the schema information.
Additionally mysql_stmt_bind_param() was deprecated and needs to be
replaced by mysql_stmt_bind_named_param().
[ChangeLog][SQL][MySQL] Fixed compilation with MySQL 8.3.
Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-121183
Change-Id: I149836bd5674d0784255baf416d437c424992f20
Reviewed-by: silverqx <silver.zachara@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 41c842d3f7eecdf736d26026427033791586c83a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
initRootPath() may fail, so let's make sure we do extract some
information from the FS even if that does. Issue introduced by
3e330a79ec8d273630660eefae42995018421c0c ("QStorageInfo/Linux: rewrite
the label retriever to use device IDs")
Task-number: QTBUG-121140
Change-Id: I76ffba14ece04f24b43efffd17ab2df71af8c4e0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 264b7a67330fb1a3fd0f896603e75ada46326875)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Export QHttpNetworkConnection and QHttpNetworkReply classes, this is
required to use the freshly introduced QHttp2Stream.
Change-Id: I4920d342af943b393afa78a187b562549fa919e0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 0047affafb3d1b6086c0fc59c50ea9f3b46effe7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a window's parent is set to null, remove the corresponding native
view from its previous parent layout before adding it to the layout
for top level windows. If the removal from the previous layout is
done after adding the window to the screen, an exception will be
thrown due to the view already having a parent.
Fixes: QTBUG-121232
Change-Id: I1c065b5158d32150042d25fb64f10cf48f83f9f4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 1062373b8e2f8ecf63b7a60a34ca9d0b83466de3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Changed section titles to sentence case.
Added or removed commas as required.
Simplified language were appropriate.
Varied terms to improve engagement.
Corrected resultant text to within the 80 character
width, so there will be whitespace change warnings.
Fixes: QTBUG-119553
Pick-to: 6.6
Change-Id: I5f40605fde4639a6dfcdb3816f32ad7599572fae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
(cherry picked from commit ef01f32388ad2eb69aa58879b56a7891a492619b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The apple test logger did not include the failure location in the log
output, because the assumption was that the structured logging would
report the file and line separately.
Unfortunately we can't do that using the os_log machinery just yet,
so we bring in the manual location printing as in the plain text
logger.
Change-Id: Ief0a6a6e04d628c98ed09c09334b694504cbff2c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 08ddf846aed3a14c485aa1d68bc3157e2420f316)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
and an older CMake 3.22, which is shipped by default on Ubuntu 22.04.
If for some reason there's a static openssl library lying around in
the default sysroot (or any ssl search path), like in
/usr/lib/libssl.a,
then CMake's _OpenSSL_test_and_find_dependencies
will try to find_package(Threads) because it assumes it has a
dependency on the Threads package.
Because we do qt_find_package(WrapOpenSSLHeaders) in
qtbase/configure.cmake
and we do qt_find_package(Threads) in
src/corelib/CMakeLists.txt,
we would create the Threads target in the root directory scope, and
then try to promote it to global in the corelib subdirectory,
which fails with
CMake Error at qtbase/cmake/QtPublicTargetHelpers.cmake:260
(set_property):
Attempt to promote imported target "Threads::Threads" to global scope
(by setting IMPORTED_GLOBAL) which is not built in this directory.
Call Stack (most recent call first):
qtbase/cmake/QtFindPackageHelpers.cmake:211
(__qt_internal_promote_target_to_global)
qtbase/src/corelib/CMakeLists.txt:4 (qt_find_package)
Newer versions of CMake's FindOpenSSL actually try to determine if
the Threads package is really needed.
To avoid the issue entirely, just look up Threads before we look up
the OpenSSL package.
Pick-to: 6.6 6.5
Change-Id: Ia3cde93e26ba004f64105a5b457098e1b9870885
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 85c462855be95afd2afebd345cb4655c00f9824e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The private QLocale::FirstTwoDigitYear constant, which is used as a
default value for the parameters in some methods, causes troubles for
Qt for Python Team, because they need to use the default values in the
binding code. It also potentially create some inconveniences for the
users who want to write functions wrapping these methods.
The name is also confusing, because, when read out of context, it
implies that there might be SecondTwoDigitYear, etc...
Rename QLocale::FirstTwoDigitYear to QLocale::DefaultTwoDigitBaseYear
and make it public.
Now when the constant is public, we can use it in QDate, instead of
introducing another constant, so do that.
The qdatetime.h header already includes qlocale.h via qcalendar.h,
but, rather than relying on this transitive include, add it
explicitly.
As pointed out by Thiago [1], the static constexpr members of exported
classes need out-of-line definitions, so add such definition to
qlocale.cpp.
Amends 41f84f3ddb780ec751e3fc706dd242fc4a99de7a
Found in 6.7 API review.
[1]: https://lists.qt-project.org/pipermail/development/2024-January/044888.html
Change-Id: Ib3c6f1d5b181968bf311fd0435173e025a369865
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit cde7d5d3ff56fdf219771c65bf93f3f08757f154)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use a more precise view center for views with odd width/height
* Use the QPointF version of mapToScene to avoid rounding
* Round instead of truncate when setting scroll bar values
These changes increase the precision of AnchorUnderMouse, which is
important when for example wheel scrolling is used to change the scale
of the view. Without these changes, the view shifts slightly with each
change in the transform.
[ChangeLog][QtWidgets][QGraphicsView] Increase precision for QGraphicsView::AnchorUnderMouse and QGraphicsView::centerOn
Pick-to: 6.6
Task-number: QTBUG-96879
Change-Id: I8199196c671e4aa96732f382e8057468f676b8d7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit d99b0cfed21e05f6e84b97fe8edb68271a34deb2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We need a way for users to consume the complete contents of
QHttpHeaders.
Until now, the only way was
for (const auto &name : h.names())
use(h.value/combinedValue(name));
which is quadratic.
Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.
So we added nameAt() and valueAt() functions in previous commits to
enable efficient indexed iteration without the need to expose a
value_type. Having added those, we can now remove names(), which had
the wrong value_type (QByteArrays are by definition UTF-8 in Qt, while
header names are L1), and is no longer needed to facilitate iteration.
In QNetworkRequestFactory, temporarily use toMultiMap() because we
need the combinedValue() of all headers here. The fix will be to make
QNetworkRequest QHttpHeaders-aware, but that's a Qt 6.8 thing, even
though we should still de-pessimize this code for Qt 6.7 with private
API.
Resulted from API-review.
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit fd6dc2e9e7ce12d73e095a70b3259ea649f4a62d)
Change-Id: I7b52e7df4444487f865ebfb7c9d94227f470829d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
We need a way for users to consume the complete contents of
QHttpHeaders.
For now, the only way is
for (const auto &name : h.names())
use(h.value/combinedValue(name));
which is quadratic.
Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.
So add nameAt() and (in a previous commit) valueAt() functions to
enable efficient indexed iteration without the need to expose a
value_type.
Return by QLatin1StringView, not QAnyStringView, because that
statically encodes the actual encoding used (and required by HTTP
specs and promised by the class documentation, so it won't need to
change). For the setters, we want to be accomodating QString,
QByteArray, etc, which is why those take QAnyStringView.
Resulted from API-review.
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 196594003742f0bf1c075ed5b2ec93e06f237206)
Change-Id: I0af34c6da06dad1d14b2d25e9230a1c04b4e7c23
We need a way for users to consume the complete contents of
QHttpHeaders.
For now, the only way is
for (const auto &name : h.names())
use(h.value/combinedValue(name));
which is quadratic.
Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.
So add valueAt() and (in a follow-up) nameAt() functions to enable
efficient indexed iteration without the need to expose a value_type.
Resulted from API-review
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4bb12dab6a13c6deee713a77efa9ce996adc97a9)
Change-Id: I2ee509d89e6f9080c17a4cef947f80f312d75180
gcc warns about using uninitialized variables in
QFontEngine::getTrueTypeGlyphIndex. The warning is bogus, because all
variables subject to the warning are initialized by passing their
pointer to qSafeFromBigEndian().
Initialize them anyway to silence the warnings.
Pick-to: 6.6 6.5
Change-Id: I25e062f25e2b06701af5edca27a9e56b939daa79
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit e957ed97e0a7f6974db7d9f7ea52d94785464880)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Regression fix, introduced in:
7199498fb9cbfb5afc043ddb0e630c8ffad5240b
QPushButton with a menu will have a sunken state, QStyle::State_Sunken,
when the menu has been closed. Expected behavior is that the sunken
style is to be removed when the menu is closed.
A boolean called "menuOpen" is never set to false after being set to
true in the popupPressed() method. When this boolean is true, a sunken
state is painted.
Fixes: QTBUG-120976
Pick-to: 6.6
Change-Id: I3e721da5dfbb6db200aa2de7366ac5dc73c873e0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 343551ffae66048599e5360085d1b77f64b9336e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 329722a322a80d5ea8d6f9aa993c2fc4995b08a4 ("QMimeBinaryProvider:
manage m_cacheFile with a std::unique_ptr"), which added the
std::unique_ptr<CacheFile>.
This is required because in C++23 std::unique_ptr's destructor became
constexpr and is therefore instantiated more eagerly. The type must be
fully defined (not forward-declared) when the std::unique_ptr member is
initialised in the QMimeBinaryProvider constructors.
Fixes: QTBUG-121204
Pick-to: 6.6
Change-Id: I76ffba14ece04f24b43efffd17ab9a861aff89b8
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c8db469fd584cfd2bee34b572601b19bfb2cd921)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 1cd6c6c69e9813c791f8bebb6c0c9214ce765060.
Btrfs can have subvolumes and each one of them is assigned a device ID
when the filesystem is loaded into the kernel. But subvolumes don't all
have to be a mountpoint of their own: if we insist on matching device
IDs, as initRootPath() was doing, we'd fail at finding the mount point.
Fixes: QTBUG-121140
Change-Id: I76ffba14ece04f24b43efffd17ab39f503000dd7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 987abb92538f8657d861611b1ced4e7eaa660adf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is notable when dynamic linking fails, because that happens before
the first line of main() (or equivalent) of the child process, so even
banners printed by that function may be missing.
Change-Id: I5201966b308e48989c06fffd17aa9837156e23f4
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
(cherry picked from commit 458a9d288a14abed6ee0573e6574a9e99f4f7f58)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Windows, process creation is synchronous so we will always emit
either started() or errorOccurred() before QProcess::start() returns.
This condition doesn't currently happen on Unix systems, but we could do
that because we're now using vfork() on most platforms, so the child
process has either successfully execve()d or _exit()ed before
QProcessPrivate::startProcess continued.
Drive-by reorganization of the code to remove the one-line \note in the
middle of the docs.
Pick-to: 6.6 6.5
Fixes: QTBUG-120968
Task-number: QTCREATORBUG-30066
Change-Id: I4d0668e0fae5299551ff91480828a68e62fdacec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 8e1f9169cac78b0df4dab17ed05765fdab842d07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When we are embedding a QML view to a non-Qt Android app, there are a lot
of functionalities that are shared with the refular Qt Android app, but
some are not. We should not, for example, try to control the hosting
Activity.
Create a base class that both the QtActivityDelegate, used for the
standard Qt for Android app, and the delegate for the embedding case
can extend.
In this commit, the QtEmbeddedDelegate is very simple, the
biggest difference to QtActivityDelegate being it does not create
a QtLayout or instantiate a QtAccessibilityDelegate.
It does start the Qt app, without waiting for a layout, and register
to listen for changes in the state of the Qt app.
Taking the embedded delegate into use, loading the embedded QML
views and their handling is added in a follow up commit.
Task-number: QTBUG-118872
Change-Id: Id390a2b35c70b35880523886bf6fcf59d420cb42
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 06d2aa91eb4faafc0e52faafeb184d6d3da671ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simply stripping away the first six characters does not work on Windows.
Amends 2d87c4d881b74619fef966ffb0d7a00cb4ccea50
Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-120577
Change-Id: If48ba026785cab784f46109e34ac80e39a990b79
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 52a41bac775bea9057acbc4344a29bb7e63297e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test function casts QMessageBox::StandardButton variables to
integers, to pass them as arguments and verify expected buttons.
In case of a test failure, this makes it hard to figure out, why a test
was failing.
Add a local macro to cast int values back to the enum before calling
qCompare(). That way the enum keys will be displayed in the logs.
Task-number: QTBUG-118489
Pick-to: 6.6 6.5
Change-Id: I23e766d5026cff3e4775db56e58f808809709e4c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fd710fbba3d24f6192625f586eea57309630f8ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were reporting the correct url, but saving to the
root of the file system.
Change-Id: I3e1fd63efb77dd75ccf7a8f44a3211965fe11be8
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 5b53f9b3f8e5f0b642e9e9c48cd7574f23e77233)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
getOpenGileContent() takes a parent now, and the compat
API is behind a QT_WIDGETS_REMOVED_SINCE(6, 7) which
the manual tests can't access.
Change-Id: I81784baed178bb8efd1a848d32c9ee4510971e26
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 63a00ef2c09f11c9aec291cf1ab0f01d13b840bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Verify that the file is saved correctly to the local
file system by loading it and printing the sha1 of
its contents.
Also add indents in order to improve legibility. The
output lines should now be correctly nested.
Change-Id: I698c016253656aef29f04129da5f01a9dc35191e
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit a2294287ad3edd729f165280a71b8dd7a5345b1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The XDG trash bin code in 6.7 onwards doesn't compile because VxWorks is missing the POSIX at-file system calls and we're working with WRS to find out more. Currently there is ongoing request to add this and more POSIX system calls.
Task-number: QTBUG-115777
Change-Id: I83fd2ab7130362c06c694195e7b33b6ba8011101
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9735b105588d74c47d4195d367bcac89d3472643)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The function definition at the location of the documentation is not used
on Q_OS_DARWIN, so qdoc cannot tie the documentation to it, leaving
broken links and qdoc warnings when building the documentation on
macOS.
Fix this by explicitly specifying the function that's being documented.
Change-Id: Icf2ad1eba9e9ec8cbeea3818b414f740fa31083f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
(cherry picked from commit f63e5318261de755dfeb3d8faedc52333a37c96d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test renders QCalendarWidget, which ends up in the QStyle code
eventually. On macOS we use a CGContext to draw the native style,
into the test's image/paint device, but CGBitmapContextCreate does
not support QImage::Format_ARGB32. It needs either a premultiplied
alpha, or no alpha at all.
The unification of the palette for the calendar, as is done for
Windows, is also needed on macOS.
Change-Id: I5b26e5434b84e4b14eb8784875b76810e0a14230
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a5292ad2f58252f392ad272f8c99a31c43d175a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In Prepare mode, "buf" is a null pointer. We never dereference it, but we
still compute an offset from it to obtain a pointer to a (then unused)
QMetaObjectPrivater.
clang's UBSan complains about this, so initialize the pointer to nullptr
instead when in Prepare mode.
Pick-to: 6.6 6.5
Change-Id: Id9d78058f72bb1b44440d07f565374f3eb3c20fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d3d224f546d933acef53f7592fea7d69072f7d55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's a shared list that, in theory, can be written to by multiple
threads. Protect it with a mutex.
To make the change in a clean way, move all the .contains() checks
into a separate function so we can simply hold the lock in there.
Pick-to: 6.6 6.5
Change-Id: I99ff185346d52e43a3f59f2910a7b2fa6031e3e4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit c60db318836cf22b0f00b78ea189ba33fcf7b1c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Update m_active early during DPI change to make scaling
calls made during the DPI change use the new value.
The existing call to updateHighDpiScaling() in QGuiApplicationPrivate::
processScreenLogicalDotsPerInchChange() is supposed to
take care of this, however that call is made after
the geometry change event is crated (with incorrect
geometry)
Change-Id: Ia0f6006c90355ec69ef92b88a020089ab21e072d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 454068232eae457c8f62f94b70e17b0ef8b7a74a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As described in Apples documentation, own methods which are added to
existing classes should be prefixed to avoid category method name
clashes. This prefix was missing from the function
currentFirstResponder() which caused issues when closing the virtual
keyboard on some iOS devices.
(see https://developer.apple.com/library/archive/qa/qa1908/_index.html)
Pick-to: 6.6 6.5
Task-number: QTBUG-119601
Change-Id: I82fb8a8beeb0a3234594357f1e1db67b0ae3da36
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e51b2d70de65f2ac674afb9c7da2a10c7067f142)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The compiler knows how large the array is, so pass the size and drop
the terminating null.
Change-Id: I5795c89834b8395f04d1777d737d080f19be2a21
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
(cherry picked from commit a73f10aee422bbbee22c63ff1c436cb3193938e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the USE_XCB_<component>_STATIC switches that force using the
static versions of xcb components if necessary.
The xcb components needs to be built with -fPIC option, to make the
static linking possible.
When Qt is built staticaly USE_XCB_<component>_STATIC needs to be
passed to the application command line, since in static case xcb
libraries are resolved and linked when configuring application, but
not when building Qt.
Pick-to: 6.6 6.5
Task-number: QTBUG-120769
Change-Id: I274e9cf4a6a111dc87ad84bb7f49cad76a3d364a
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 6ce6ff1c529a7a4a09f211980cc749c2b3aa0dab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Silences clazy-copyable-polymorphic.
The Q_DISABLE_COPY_MOVE() disables the implicit default constructor,
so bring it back with =default.
Amends aa8393c94fea01a4806b204fd3aa343a4e90666b.
Pick-to: 6.6 6.5
Change-Id: I44f0b19208d3865fb84e277bcaf65d7f4541d368
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b211d8a8c0196a96b2aa324c9e3d991ae378c7f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix the coding style to match the current Qt style.
Fixes: QTBUG-68661
Fixes: QTBUG-120909
Change-Id: I314ca9da8a03727e3e0336a23fce1ce9d065d3a4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 2690822428deec4f0c08f4d118d69a7c6036369e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][QtWidgets][Deprecation Notices][QCheckBox]
stateChanged(int) has been deprecated in favor of
checkStateChanged(Qt:CheckState).
Found in API-review. Amends 5a96d13bb5abd5339cf21dd1de7a17152c71f0fc.
Change-Id: I6ff4aa38c2f43622ba4b127420aff83790785455
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3512fb1ec5ff088772170540c4e91b1886fbea45)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The problem with the QTestPrivate::testAllComparisonOperators() and
QTestPrivate::testEqualityOperators() functions is that if they fail,
they point into the helper function, but not into the actual test that
called the helper function. This is specially annoying when some test
calls the helper function multiple times.
This patch introduces the helper macros QT_TEST_ALL_COMPARISON_OPS and
QT_TEST_EQUALITY_OPS that wrap the respective function calls together
with the QTest::currentTestFailed() check. If the test has failed,
the macro generates a meaningful debug message with the original file
name and line number.
This patch also applies the new macros to qtbase.
Task-number: QTBUG-119433
Change-Id: Iad709de45e5bf53c82e7afa8e9f51e9275c1e619
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 1353c6f85757ad9d9f77bc754bf16c7fb185df00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When qfloat16 uses float as an underlying type, the operators cannot be
constexpr, because operator float() is not constexpr.
However, operator NativeType() is, so we can make the relational
operators constexpr when we are using a native 16-bit float as an
underlying type.
To avoid code duplication, introduce new temporary macros for
constexpr and Q_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE.
Extend the tests to verify that the operators are constexpr when
native float16 type is used.
Task-number: QTBUG-119433
Change-Id: I001b087d78c398c71b71a504b65c316199dd4792
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit cfc385ce3fc674d48ea2bfbaac6d3f907795b1a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've previously used the zip-file form, but that's not been published
for CLDR v44.1 - the advice on the list was to use github
instead. That, however, has ↑↑↑ as a special value for fields, meaning
to inherit from a prent locale. So special-case that value. I have
verified that v44 from the zip file produces identical results to v44
from github, with this minor fix. As it happens v44.1 also produces
identical results.
Pick-to: 6.5
Change-Id: I6eb0aedda7556753cdc83bb9d76652fbb68dc669
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
(cherry picked from commit bcdd51cfae24731a73d008add23d3c1e85bbd8d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The constructor and update() method for the system locale were using
GetUserDefaultLCID(), where query() and the fallback locale first
checked the LANG environment variable, leading to inconsistent results
if the user set the environment variable to something different from
the system's configured locale.
Break out the logic of parsing %LANG% into a static helper, replace
the existing parsing with a call to this and add a helper to get the
right ID to use, possibly via it, using GetUserDefaultLCID() as
fall-back. Drive-by: initialize substititionType in its declaration.
Also look up %LANG% each time we want it; it's not that expensive,
given how rarely this code is called, and client code could change its
value at runtime. Partially inspired by a patch from Wladimir
Leuschner <wladimir.leuschner@qt.io>
Pick-to: 6.6 6.5
Fixes: QTBUG-120961
Change-Id: Ie706c7089bd2b3757a3eab627723ec34a5e2b07f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fcd2a219c4c222309152f1ea2a3124ddc17d4ea5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This flag should be set in order to opt out of that Qt Quick Layouts
takes implicit (built-in) size policies into account, a feature that was
introduced in Qt 6.7
Task-number: QTBUG-117597
Change-Id: I206cd61534b2103b2c3a9b4abc97fec8c88799d1
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 4ae537e67c99160f5dcac99f40d03a7921456556)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
4c60a11d8f935abb762a83b0ab99cefa6db3060c had to be reverted, because it
broke restoring the state of hidden, floating dock widgets.
Extend tst_QDockWdget::hideAndShow() to test this functionality.
Blacklist test function on Apple, because Apple machines on CI show
dock widgets with the main window.
Task-number: QTBUG-120191
Change-Id: Ibc6121a99f15f33d62ca0a9376dbe9fafbe20290
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3195e34742731406a923b545bd85a5a33e970a42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This partially reverts eb0abd9789062d95bc62dbbc29b2038dc40472b1 so we
depend on __SIZEOF_INT128__ in this structure, not on QT_SUPPORTS_INT128
so the Id128Bytes union has a quad-word integer as a member at all
times, even in QtBluetooth's removed_api.cpp.
That's required because on some ABIs, the presence of this member causes
the type to be passed differently, usually in registers (we fixed the
stack problem with the alignas(16) in that commit).
The "Itanium Software Conventions and Runtime Architecture Guide" did
the same back in 2001; section 8.5.1 says integers from 65 to 128 bits
are passed "Next Even" and so are aggregates with alignment of 16 bytes.
This rule seems to also exist in the AArch64's AAPCS64[1], which says,
in rule C.10, that the type should be passed in even registers:
C.10 If the argument has an alignment of 16 then the NGRN is rounded up
to the next even number.
(NGRN = Next General Register Number)
It's unclear whether this applies to the union type as a whole or to its
individual members. If the latter, then Clang may be buggy.
[ChangeLog][Important Binary-Incompatibity Fixes] The QUuid::Id128Bytes
type had a loose definition that could cause it be passed incompatibly
between functions, in some architectures, depending on whether GNU
extensions were allowed. This is now fixed, but may cause code compiled
with Qt 6.6.0 and 6.6.1 to fail when recompiled with 6.6.2 or later.
[1] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#682parameter-passing-rules
Fixes: QTBUG-119248
Pick-to: 6.6
Change-Id: I6e2677aad2ab45759db2fffd17a86a208f788cb7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 6f9db71154662a648f19a86ca86585eddbe2f9ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QDeferredDeleteEvent was declared in qcoreevent.h, it
had Q_CORE_EXPORT. After moving to qcoreevent_p.h, it changed
to Q_AUTOTEST_EXPORT. The correct macro should be preserved.
Noticed that this change was needed to make GammaRay work
with Qt 6.7
Change-Id: I6fab494d9f60b1261edce6f326a3b96467ff7da1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit bc3b18764aabf95a50a65e090863c54b6ac57e3e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a function template defined inside a namespace, `static` makes
no difference here.
Change-Id: I2eb52b4fb4432c269b2449ae37550bd0be0dbbce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 85108e1938fad7b6ca1ce267fb10cda5933dbc50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The static function appeared in two places, and in a unity-build
this fails quite visibly.
Change-Id: I60000d01194a2c79ca9c101f2a6d3f77f469f1a7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com>
(cherry picked from commit a3a48815cc9430d6f5c736a312ea4ea5c0895205)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit ca2f46c04c26ed4649cb6c2c62d3b2e52cd8d5ad.
Reason for revert: <BIC in 6.6 found by Marc Mutz>
Pick-to: 6.6
Change-Id: Ia5b8849e55ebccb514bc753ce1d31855d91e2406
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit b148a362c36a9b34b0c21c60530353d6bf6b92cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A QMultiMap is used, while only qset.h is included.
FTBFS w/o precompiled headers.
Include qmap.h as well.
Pick-to: 6.6 6.5
Change-Id: I5f6e1d204bfa94cc6a81f6883c7a7b0ee1e9963c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 84b792fa98b3a21119f16b0cd9443f90b1ad504d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The CHECK_SINGLE_OPERATOR macro is used inside FOR_EACH_CREF macro,
which, like all other FOR_EACH_* macros in Qt (see qdebug.h or
qmetatype.h), expects its parameter to have a scope or a semicolon.
All other CHECK_* macros are *not* used inside FOR_EACH_CREF, so
they can follow a more traditional approach with the
`do { } while (false)` scope without a trailing semicolon.
This allows to use them in the code like:
if (condition)
MACRO(args);
else
OTHER_MACRO(args);
In the example above, if MACRO ended with the semicolon, adding
one more semicolon would have discarded the else part of the
conditon, leading to compilation error.
Amends bfb237d19a5319bfa020ad0cefaff72e8d94a9be.
Task-number: QTBUG-119433
Change-Id: I9a7f17416ba7c37a50f022f685b54e2643e4a9e2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit ecafbc4d5d9a4c12f44de856dec544404c633a6e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Apply some documentation improvements that were suggested before FF.
Task-number: QTBUG-119433
Change-Id: I9b1d83c69821e25ae4cd8db0cbf3fa6d6330a6dc
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit aae6cf8d15837c9a29503d5fdeceb2a4b5befc55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CMake has a built in file extension list for "Source Files", that does
not include qml files. We can't extend that file list with a regex,
so we need to add qml files individually as a finalization action.
We also stuff generated files (both auto-gen as well as other generated
files) into a separate source folder, to focus the project on the user's
files.
Change-Id: Ic9a4d9daad088b1874bcf81e75c776537f3ff531
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 06ea3e3994b38e5fe9ac4f33044b0efa1f1be294)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It doesn't always pay to be explicit about SMFs. In the present case,
clang-tidy complains that the move ctors of the class aren't
noexcept. It's a false positive, but just removing all the =default'ed
SMFs makes it go away, too.
Amends 0dba3f6b713a657eb3bf2037face72d16253eb92.
Change-Id: Ib641d4eed9e214b41c143b60494e82790da6fda8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit fab57c25e22239516dec737f2d42a7fccae9d37f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We do have special macros for this case, so use one of them!
Amends c2956f8f7685b624d7693ff644125d0f594c585d
Found in 6.7 API review.
Change-Id: I205966d6f7363abf1a26f59b04555b1a48a4e696
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 26b8e99b1ce616a063fcbd0d67f44ba9e7712f23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 4b6f757020382ed157bf6beb572549f05e881359
Found in API review
Change-Id: I9154c6ad0236776054816bcdde03737290a633ad
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit edf92b8e33f896c764c8aac549385f6e46571a0e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously we would more or less wait for the first connection to finish before
initiating more connections. This was just happening by virtue of
calling startNextRequest when a request was finished.
Since we have already determined the preferred network layer, let's just
try to start more connections. In case we are using https this doesn't
make a difference because we will try http2 upgrade first before allowing
multiple connections. Unless, of course, http2 has been disabled.
Fixes: QTBUG-120619
Pick-to: 6.6 6.5
Change-Id: Id3c3be59fd07120bff574d63481119e5ed9eb88a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 88f5fc47ebf558fa72b7b447f8394a0d44b6bf9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Spell out some API names in enum.
Some functions are now protected.
Remove property for autoRenderTarget.
textureFormat -> colorBufferFormat.
Used "fixed" instead of "explicit" and follow
the above naming, so that explicitSize becomes
fixedColorBufferSize.
Change-Id: I2fd6ad46033313a3febbb8846146021d5dd11010
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit acebb97b58807d1d5910c79209664b21e741a9c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Says clang-tidy:
destructor of '(unnamed struct at qmetatype.cpp:966:14)' is public and non-virtual
in file:src/corelib/kernel/qmetatype.cpp line:966 col:14
static const struct : QMetaTypeModuleHelper
Yes, these classes are polymorphic (because the base class is). Yes,
the destructor is non-virtual (because the base class' one isn't, but
it's also protected, so fine).
But these classes are not used as base classes, so suppress the
warning.
Pick-to: 6.6 6.5 6.2
Change-Id: I75be86bca36a4a0e93d72acb1a0d2fe0dca1c505
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 11d153ae1ce3ce75e76a1fcac7bf99e4cff05716)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise clicking an existing file in the dialog will not populate the
full file name, which is what you'd expect for a filter allowing all
files.
Change-Id: Ib9a014352d5e567e54f95414e744566615d735d8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit c53955eaa085b14ef8e5348e951f8cd2cbfa4ea5)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We can not guarantee 128bit alignment on 32bit windows
Change-Id: I16bd3bded16bd29f4cb84b0cdf2671e4d9a19601
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0e8086887a2c931dc687b3c344ab5004749fa3eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QWindowsFontDatabaseBase::invalidate() was defined inside an
the declaration was not.
Since the font file loader is only protected by
QT_CONFIG(directwrite), we move it out from the previous block
and add an #if for the contents instead.
Change-Id: Iedc02cceb15fe3d25d21b49af1486659a4d6373b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0d1ac449bbc38aee4341dd47189de901860d7870)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All that is required is that we write the declaration as if they weren't
inline, like we used to for C++98 non-constexpr static members. Amends
090991123dd82796fe956e4153bc26ace22280ca.
This is required with MinGW and happens with both GCC and Clang: when a
static constexpr variable found in an exported class is used in a
context that requires getting its address, the compiler emit a DLL-
importing statement. For example:
void f(const std::chrono::milliseconds &ms);
void f()
{
f(QNetworkRequest::DefaultTransferTimeout);
}
Emits with GCC:
_Z1fv:
movq __imp__ZN15QNetworkRequest22DefaultTransferTimeoutE(%rip), %rcx
jmp _Z1fRKNSt6chrono8durationIxSt5ratioILx1ELx1000EEEE
And Clang:
_Z1fv: # @_Z1fv
# %bb.0:
movq __imp__ZN15QNetworkRequest22DefaultTransferTimeoutE(%rip), %rcx
jmp _Z1fRKNSt6chrono8durationIxSt5ratioILx1ELx1000EEEE # TAILCALL
Fixes: QTBUG-121135
Change-Id: I76ffba14ece04f24b43efffd17aae1a98071c570
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c09219e946ed3d90349c3638afe304553bf38011)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a QFont is moved to a different thread (B) than where it belongs (A),
and the font cache is then purged on thread A, the last remaining
reference to the engine will be on thread B. When this QFontEngine is
later replaced with one created on B, we end up deleting A's QFontEngine
on thread B.
This caused QFreetypeFace::release() to be called on the wrong thread and
the face would never be removed from the thread-local Freetype cache in
A. Hence that cache would contain a dangling pointer to the freetype face
which we would later end up fetching.
To avoid this, we make sure the thread-local cache itself increases
the ref count of the face. That way, the only time it will be deleted
on a different thread is when the cache has been destroyed because the
thread has shut down.
If the last reference (except the cache reference) to a face is cleared
on a different thread, we keep it in the cache until later. It will
then be in a "deferred delete" mode and will be deleted as soon as
possible. This is done either when the thread shuts down, when a lookup
causes the "deferred delete" face to be returned, or when release()
is called on any font on the thread (at which point we will purge all
faces that only have the single cache reference.)
Fixes: QTBUG-118867
Change-Id: Ifa07a9cb6f4cd3e783e12a73d8b283e70d6fb474
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 5761dd55c824afb7a7809c7a0d3ce3050b03fe7b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use the QT_SUPERBUILD procedure when configuring the qtbase
documentation-only build. This only makes sense for qtbase since we
disallow building it using existing Qt installation. Other repositories
should be configured using qt-configure-module script from the existing
Qt installation and simply run 'ninja docs'.
Fixes: QTBUG-120485
Pick-to: 6.6 6.5
Change-Id: Iafed5c17bea5c61edc239f08045922497215fb73
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 02a556674f0b3f04de5ab09dca53ed8e86a8ba06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QSystemLocale is setting the global window.onLanguageChanged
property which may cause conflicts in cases where there
are more than one Qt app instance on the same web page.
In addition the QSystemLocale destructor never runs,
which breaks also for repeated QLocale instantiations
on the same page (for example for the QLocale auto-
test)
Change-Id: I85af0587527b2922804fc866c83864f677700e6d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 3f74e2a633a809a27e8e66346e052dea48c4369e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For use in QtGRPC.
There is some duplication between this code and the code in
QHttp2ProtocolHandler. But let's not change the implementation of
the protocol handler after the 6.7 beta release. Nor do I think we
should do it for 6.8 LTS. So let's just live with the duplication
until that has branched.
Fixes: QTBUG-105491
Change-Id: I69aa38a3c341347e702f9c07c27287aee38a16f2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 0dba3f6b713a657eb3bf2037face72d16253eb92)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We map QFileDialog name filters to NSSavePanel.allowedFileTypes, for
example turning "Text Files (*.txt)" into allowedFileTypes = @[@"txt"].
In this case, the NSSavePanel will automatically add the extension to
the user's file name, if they just type "foo".
When a filter allows all files, we reset the allowedFileTypes to nil,
but this does not reset the automatically added extension, so if the
user switches from one filter (*.txt) to another (*.*), the file name
will still have a .txt extension.
This is problematic when the save panel's file name field does not
show the extension to the user, which can happen automatically if
the user types an initial file name without an extension, overriding
what we've asked by setting extensionHidden=NO. When that happens,
the user is shown "foo", but the actual file name is "foo.txt".
To mitigate this confusing situation we do a round-trip via the
UTTypeDirectory content type, which is a valid type without any
extension. This forces the save panel to remove any extensions
added automatically by previous filters.
Change-Id: Ia17a8c2734eff656116ef77a9813113a5076e9cc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 40506954979fa7cdd34da8251f179557eb9be4f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Multi-part extensions such as "tar.gz" are not natively supported by
macOS, e.g. one can not create a [UTType typeWithFilenameExtension:]
for such an extension, and this goes all the way down to Foundation.
As a result NSSavePanel gets confused when assigning a multi-part
extension to allowedFileTypes, because it's using NSString operations
such as stringByDeletingPathExtension or pathExtension, which also
lack support for multi-part extensions.
We've worked around this in the past by reducing these extensions to
their last component, e.g. "tar.gz" reduced to "gz", but this results
in the save panel turning the input file name "foo" into "foo.gz" if
the user doesn't provide the full file name.
Various attempts at working around the lack of multi-part extension
support by breaking allowedFileTypes into ["tar.gz", "gz"], or doing
selectively toggling of allowedFileTypes in panel:validateURL:error,
have all proved to have corner cases and shortcomings of their own.
As a last resort, we now treat multi-part extensions manually, by
disabling the allowedFileTypes filter, and doing our own validation
in the panel:validateURL:error callback.
This requires us to also manually handle automatic extension for
file names without extensions, as well as overwrite confirmation
in the cases we do add an extension manually.
The overwrite dialog and error messages for incompatible extensions
have been modeled after their native macOS 14 counterparts, using
translated strings from AppKit.
Task-number: QTBUG-109877
Change-Id: I6b7ce3c44b4c3b24802aa1f66f4593457ae4c929
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit d651cdb9885353af1ea0647733f0c002bf2d168b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a macro for QML Language Server product name.
Task-number: QTBUG-120980
Change-Id: I8b7196881a1c3777f975079c22ecbeb6f868f5a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 4ec386eeeadfd9b6cd9e64d5907c3c20493a0b68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The panelSelectionDidChange callback is only called when the user selects
a directory in the save panel, as all other files are not selectable.
And when that happens, the reported selection is not the directory,
but the current file name (which may be based on clicking an exsiting
file, but that doesn't cause selection changes).
To avoid this confusing and inconsistent behavior we disable the signal
entirely when showing an NSSavePanel.
Change-Id: If706b8faa7027ca284ec8398f5c6e2a110e01f91
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 942f5b23c2a279499e1e59ab283f5bafc54659e0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Search full icon name from hicolor before dash fallback
Pick-to: 6.6
Fixes: QTBUG-121030
Change-Id: I3e3ee142c33466203639f32857fce3ea1946a9f7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 0534a93ef04f38cf6dfc0d6c03827325d651a64c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fusion style is missing clip region for the title in
QFusionStyle::drawComplexControl().
Without that region, the top line of the frame will be visible behind
the vertically centered title.
Fixes: QTBUG-121041
Pick-to: 6.6
Change-Id: I3daf5854195e28a5ee3cb50343e2dd56e66ed940
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 9b4c35abff94a708139923a32c38a749cbdfd130)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This introduces two new function that cleans up the sanitizer flags
and disable linking of the sanitizer libraries.
The qt_internal_skip_sanitizer function clears the sanitizer flags that
are set in CMAKE_<C|CXX>_FLAGS variables by ECMEnableSanitizers.cmake.
qt_internal_skip_linking_sanitizer collects all targets that are
created in subdirectory and disables linking the asan targets.
The asan target linking can be also disabled by setting
SKIP_SANITIZER on specific target.
Change-Id: Ibbbbec0b4a6bfd37d939b8a55f8d04656f73c536
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6a921b6751ff03a3093dfb279b02ec75e32f4adc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's several ways to compare HTTP headers, and arguably
the need for it is not very high. For the time being users can use
different accessors and compare in ways that make sense for
their use cases.
Consequently since HTTP headers are no longer trivially comparable,
it makes also comparing the request factories more 'moot' because
headers are a central piece of request information. So removed
comparison from request factory as well.
These comparisons can be restored later if a clear understanding
on it's need, and on how it should be best done, emerges.
Resulted from API-review
Change-Id: Idb5ab3710268b52a8e59656db8cc7de82f0ae511
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 89dab8578c10ed4aee4e2f4b51e7c962d618c1eb)
Add the test image to the qrc to make sure the image is available no
matter where the test is executed.
Pick-to: 6.6
Fixes: QTBUG-120732
Change-Id: I24de59fd88fdc2a3317c91ac28cf81fd5511455f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 076026fd60dfa399158498e42ee1b5000174c65e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the swap chain is destroyed, we reset the swapchain’s layer
(set it to nullptr). However we were not resetting the proxyData which
would still point to the window’s (NSView) layer. This starts to become
a problem in the cases where the swapchain’s associated QWindow is
closed (NSView gets destroyed) and reopened (a new NSView will be
created) because when the swap chain is recreated again, since the
proxyData already exists and points to the invalid old layer,
QRhi::updateSwapChainProxyData is never called. This led to an invalid
value being assigned to the swap chain’s layer.
To fix the issue, make sure to reset the swapchain’s proxy data when
destroy() is called.
Task-number: QTBUG-113498
Pick-to: 6.6 6.5
Change-Id: I02996ecf69ad9d183cac31c9188717ec36742531
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 948b93a847e1d6b78b5eee039281b3cd078fbabe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
User-facing apps that are app bundles on macOS weren't linked correctly.
For example, for Qt Designer we're creating now an entry like the
following:
.../Designer.app/Contents/MacOS/Designer /usr/bin/designer6
Pick-to: 6.6
Fixes: QTBUG-120487
Change-Id: I3eada15c4c5bf31b9b08829333d3c87f76ede7a2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 2921a70e5d8de5bf3f4b56b90347983aa9b1342b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Initialize surface container type to TextureView to
make sure it's set also for embedding containers.
Additional checks for embedding containers when
setting parent or changing visibility.
Change-Id: Iba07bfbb9e8f16804627efbdfe78559ac2580e41
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 46b86410a9730b099fa350516c3902db0ee01291)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Normally, the app's main library's name is read from a metadata field
in the AndroidManifest.xml file, which is filled out by
androiddeployqt.
Add a protected variable in QtLoader for the app main library name
that can be set to provide the library name without the metadata field.
This is useful in cases where we don't have a manifest file filled
by androiddeployqt, for example when embedding QML to an existing
Android app.
As a side effect, change the name of existing variable for the main
library and the method to access it to make it more explicit they refer
to the library's absolute path.
Change-Id: I869547818f4d0272668a1052d7bc6916b7bf5a98
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 8e9918e476430cc30007f2acf69f0c0fe120a03d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
IBus added the ClientCommitPreedit property to handle
preedit in case.
If this writable property is set,
ibus_engine tells the client whether current preeditText
should be committed or not in the client side when
focusOutEvent.
(Qt's old behavior is always committing in the client side.)
Fixes: QTBUG-109576
Fixes: QTBUG-58005
Pick-to: 6.6 6.5
Change-Id: I6bb78921ce04cdd3197cba9e2fb00376d5e0ac8b
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 84cf0e2be54d9ad183db063fd429b792c67edd18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is useful for example the embedded QML case, where we want to
make sure everything from Qt side is ready before we start to create
Qt windows.
Change-Id: I8148405e35cc8ebb89110f05e07cef06f8ff3709
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 6102ee6dd8f3e6cee3e3bc7544329c5c4b7843f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 4c60a11d8f935abb762a83b0ab99cefa6db3060c.
Reason for revert: Breaks QMainWindow::restoreState(). Dock widget is shown, even if restored into hidden state.
Change-Id: I9808de4e0fd48871c3b234ae9bbaf6c64c8e832d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0ea37300d111beea3bb353f036d6c747f63c88dd)
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
We don't recommend foreach anymore, and have in fact
adapted two snippets already to use for(), but missed
the documentation text.
In any case, it feels a bit weird to give an example
how to iterate over QStringList in each of these methods,
so we might as well just remove this part.
Pick-to: 6.6
Change-Id: If8744e48961661ad518f5f24781c38f371d981bc
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 3b9f6b54b1cda08079ae97956478a4af55133803)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
All we need are the APIENTRY and WINGDIAPI macros, as those are used
in the gl.h header. Define those locally for the time we need them.
Use a QT_APIENTRY macro instead of hijacking APIENTRY for when we
declare OpenGL functions with the stdcall calling convention.
A few build fixes needed in tests that used Windows types without
explicitly including windows.h first, or that (incorrectly) included
one of the sub-headers of windows.h (like winuser.h).
[ChangeLog][Potentially Source-Incompatible Changes][OpenGL]
On Windows, the public qopengl.h header no longer includes windows.h.
Fixes: QTBUG-120687
Change-Id: I3770ac8eaeee5bcf4e7234e5a2539935a8aa5a7d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit b13c610f50c714873987d8c4f30f50953ade9aba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise, Xcode will auto-generate schemes for all targets, including
internal targets such as foo_autogen and build-only targets such as
ZERO_CHECK and ALL_BUILD, choosing one of them at random when opening
the project for the first time.
If multiple targets get a scheme they will be sorted alphabetically.
We could prioritize them by generating a xcschememanagement.plist
file, but that would require teaching CMake about that feature.
This aligns the CMake behavior with qmake, where we also generate
schemes explicitly.
Pick-to: 6.6 6.5
Change-Id: I3756fced37a4ff7792370da10fc49169cc271ae8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 822dc75f1a0be988b25741a8f16ddc2fbeb48e77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Including/excluding plugins of the platforms type did not work, since
windeployqt was only ever looking for 'qwindows'. Keep the default
behavior of deploying 'qwindows.dll', but also allow users to
add/remove platform-type plugins.
Pick-to: 6.6
Change-Id: I4062a71939224d1462896d95a2541e8caced399d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit bca41b1832bf1ce76787109456094149520bc403)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Allows us to hide them in a separate folder in Xcode and Visual
Studio projects.
Change-Id: I5ce7884ce50198c3b0c9654bb188f38a8a679be0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6e215a44c131598c5f75198a443d796f2709ad89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With some HighDpiScaleFactorRoundingPolicy, going fullscreen can end up
not filling the whole screen. In this case, ignore the rounding (only for
the window size, not its content).
Fixes: QTBUG-115954
Pick-to: 6.6
Change-Id: Ie87196358ef28dbe2fcbc180b1740ed9f784b4a0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit da473f3a80798d84d0f1bd9175158024a548ec68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Commit db9fa4a61791794823e570f8aa7f6e5eed8c5f52 excluded
qelapsedtimer_mac.cpp from the unity build. The necessary patches have
been merged, and we can remove this exclusion from 6.6 on.
Pick-to: 6.6
Change-Id: I85b353b202af1fd8eeea43753e5dc5ce18357d19
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 75f5eec2c904b5a3a274d9f1c70e14e687e6fa29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and remove the debug output of the internal QJsonParseError.
This allows users of the function to get the details in
machine-readable form, and to distinguish between !finished and an
actual Json parsing error.
Found in API-review.
Change-Id: Ia237b192a894d692b965f6bedb4c94d3b6537535
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 3a61de282c4740efe4a6fa1672e66efaf7c2b408)
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
QWindows that set Qt::QWindowDoesNotAcceptFocus like QtVirtualKeyboard
should not get focus.
gets rid of message:
requestActivate() called for QtVirtualKeyboard::InputView(0x1cdf130) which has Qt::WindowDoesNotAcceptFocus set.
Change-Id: I649a8cff599769727beaeee11039cf1291fd502d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit e766df030bc1afe7a654baa59efe5165f6b6cda9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make sure to pass the widget to QStyle::pixelMetric() as some styles
might use this (e.g. the new windows styles) to determine the correct
pixel metric.
Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-1857
Change-Id: I5c32f5af8b284749732b610e56b4e3d8c8ed1946
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 43ce457cbd093fc06d99b5ac833c789ef7c893d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It's better served where all keys are handled,
and fixes bug with modifier keys
Fixes: QTBUG-118503
Pick-to: 6.6
Change-Id: Ic53d1b332bd918dbc4fdd27ea4e43ad1e1ecce82
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 75ac9adeda41194e1733c69b3176fc2a368a369e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When windeployqt had hard coded module information, it had
result.directlyUsedQtLibraries, and result.usedQtLibraries. The latter
was meant to add in the modules that weren't defined. Since we now read
available modules directly, there is no need for result.usedQtLibraries
since it should always be identical to result.directlyUsedQtLibraries.
Change-Id: I60e38c176b11626c1ef5a844e80bc701a9eed189
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a05abede682db4ab20a7c1d9eb45a487e91d6a78)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added QDuplicateTracker to keep track of used tags, rather than looping
through QTestTablePrivate::dataList for every added tag.
Removed method `hasRow`, instead calling `QDuplicateTracker::hasSeen`
directly in `newData`.
Task-number: QTBUG-118619
Change-Id: Idaab70d8c94227f75620924e0f1ead477f93b27a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 8a23e3aa323443d2ea958b1213b00031e5b13aed)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Windeployqt has a pull all in approach to plugins. This can require some
modules to be deployed despite being unrelated to the application's
dependencies. An output is added to provide information to better reflect
what windeployqt is doing in this regard.
Task-number: QTBUG-117910
Pick-to: 6.6 6.5
Change-Id: Iabf89e0faca862a90c0fcd46e5675dd43655be1d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 40cff9e93c36edcab49c08fa65760c22dc935992)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix indentation, split too long lines.
Amends f9f1272e7c438b79591032877f2b386af8085c3f
Found in 6.7 API Review
Change-Id: I3e9e3647afbe1a49fe78258177aff5cb878ce030
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5e49fa2739bd43e919863b343821c22b3d583afb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The pdf testing relies on the sips tool in macOS to render generated
pdfs into pngs. In recent macOS updates, that tool has changed
behavior, and no longer produces the desired output. Fix this by using
a custom pdf page size, instead of relying on cropping behavior in
sips.
Pick-to: 6.6 6.5
Change-Id: I9b2e947424774bb4456a6aefe04288b84401a9b7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit ec324fd4afd1bf843ea601447f40c1e375efe659)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If we for some reason can't look up AppKit, or if the table or
string within that table is not found we will end up using the
key as is.
Change-Id: I5d574288e421e586458266899ffdff90eeadec8f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5f15a93f16727824372bfd1a6490754440de942f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't loop over the list of event filters twice, do it once with a
combined predicate.
This code is still has a big impedance mismatch: the removeIf() will
always leave empty space at the back while prepend() needs it at the
front. We should fix this by reversing the meaning of the order of
event filters to mean back()-is-applied-first, so new filters can be
append()ed, but that is for another patch.
Done-with: Jarek Kobus <jaroslaw.kobus@qt.io>
Change-Id: I08324697229a54c8f66c6c320cf7232d707a08f1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit edff6a33a1e3757b9bb4831091a3db8fa99e3219)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We can't have duplicated filters installed,
so break the loop when removing event filter after we
have found the matching one.
Change-Id: Idda87f3090954e020b27bf3fab62677128607f03
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b909b8dfe808ed6bbb9f4353729c8810ee0e95c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Resulted from API-review
Change-Id: I84e880dc6edb9c62fd1ddd50d477347443fd52a7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e2462b09b7dcbd52c4be0df5f01508dacf27cab5)
With ES 3.0 and up the GL_MAX_SAMPLES query is available and is
guaranteed to be at least 4.
With ES 2.0 there is no such query.
While what we report from supportedSampleCounts() has little
significance with OpenGL (for the window's color buffer it is
anyway the QSurfaceFormat that decides, not QRhi), QRhi users
such as Qt Quick may rely on supportedSampleCounts() returning
real values and may, for example, warn if the value attempted
to use is not in the supported list. (even if MSAA is fully
functional)
Avoid getting such warnings on a pure ES 2.0 implementation
with 4x at least.
Pick-to: 6.6 6.5
Fixes: QTBUG-120474
Change-Id: I8a34a8bc9ce37ce951fdf7794247e8db44435d41
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 520d755d324a32c97cb9e25b617e99d0ab93d666)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The UBSan raises a division by zero in getRadialGradientValues. This can
be avoided by calculating the inverse in
qt_fetch_radial_gradient_template as a checker is done to avoid
division by zero there. (Credit to OSS-Fuzz)
Fixes: QTBUG-120332
Change-Id: I798d1efc87ee07df7ca6f401aa476013cdbffe42
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 69bed6cd3f12a3c1b0182c5a3706efa617090cfa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
File extensions with multiple parts, such as as ".tar.gz" are not natively
supported on macOS. Asking NSSavePanel to only allow file types with such
extensions confuses it severely, so we work around it by reducing the
native file name filter to the last component of the extension.
In this situation, we explicitly tell the NSSavePanel to show the full
filename, including the extension, so that the user can more easily
see what the final file name will be.
However, as part of 7f8a80ebf87cccb57da316202e5350eb5eca9d5d we ended
up changing the logic to count the number of possible extensions for
a given file type filter, not the number of parts in the extension.
The logic has now been restored, but moved to init, so that it applies
even if the initial filter is not a multi-part extension.
Task-number: QTBUG-109877
Pick-to: 6.6 6.5 6.2
Change-Id: I244cea1cc2977f8adf7e359ea7116bbfad0e1059
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit fd817c28a03f8b6743ea678c9edf3f8f047db627)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Provides the possibility to read text data as it arrives, instead
of needing to wait until the whole body is received.
Task-number: QTBUG-119002
Change-Id: I64f90148fd41a77c4ae2d5dbd6194a924a9f3a86
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 4da14a67a6157c415f8228a8bae7d6b0f895df7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test was flaky, because of qWaitForWindowActive() after show().
It is not guaranteed, that a window has focus after show().
Use qWaitForWindowExposed() instead.
Task-number: QTBUG-118489
Pick-to: 6.6 6.5
Change-Id: I1eb8a73f2beafec00c4a6f6b34bfd36a8d6e4d93
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 599328845c7e77bc7b4fd5b4f2de000bb463a814)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The macros expand to declarations that end in a private: section, which
means everything following them is private. As Fabian said in the bug
report, this is obvious when Q_OBJECT/GADGET ...etc are used in a class,
but might be a bit surprising when used in a `struct`.
Fixes: QTBUG-120297
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Iacdfc4eb3bab3554cc1142f682b11b32c3868b8f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit eb2db79064bd6e74d0b3485a650e4025d0a39c96)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simplify wording, leave out historical baggage (which
is not really relevant for users that look into new code).
Change-Id: I9be1d42b6d75dd4bf6fccd6ecb47bc7cd6026ed3
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit f23154c05ba0de300d017f1c50910da324414eef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
ColorScheme is used in Qt as a name for dark/light desktop mode
properties.
The enum value was named incorrectly.
=> Fix it.
Pick-to: 6.6 6.5
Change-Id: I2aa72f81e36c0997127dd6de0e23d4773509ba40
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit c4bd6ac4e5a0782d8771af1485a3b78733180785)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Wrap the arguments to \inlineimage in curly braces so that the
describing image text doesn't show on the page.
Fixes: QTBUG-120572
Pick-to: 6.6 6.5 6.2
Change-Id: I00f4befc64c20fb6de1dd5ddcb6ca2573fa7c355
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 5358d7a5fe394a37435a947484f1efb7ce297fa2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Qt 4.8 reference is not relevant. And mentioning that calling the
function more than once is safe, or why that is, is strange, as users
should still treat the object as something that will go away soon.
Change-Id: Icf24aa8ffe079e35351006dd77063df48a596fab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e02dc31fbf3ae460bea2aea068ccc969d6e852fc)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In QOpenGLCompositorBackingStore::resize it is already checked whether dstWin is valid, but dstCtx may also be nullptr at this point.
Task-number: QTBUG-120078
Change-Id: I4a6ad71dd8225b94baff05984275ad1860298dfc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 3f724466374cc34d0aba862f009a417540df81cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found in API-review
Change-Id: Ia41eb91e9e62a252b76c20c67c1c599c0f6a633d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b5665f6fab40232a81a056523608c295c8167bc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Could not connect "org.freedesktop.NetworkManager" to "stateChanged" : Type not registered with QtDBus in parameter list: QNetworkManagerInterface::NMState
Could not connect "org.freedesktop.NetworkManager" to "connectivityChanged" : Type not registered with QtDBus in parameter list: QNetworkManagerInterface::NMConnectivityState
Could not connect "org.freedesktop.NetworkManager" to "deviceTypeChanged" : Type not registered with QtDBus in parameter list: QNetworkManagerInterface::NMDeviceType
Could not connect "org.freedesktop.NetworkManager" to "meteredChanged" : Type not registered with QtDBus in parameter list: QNetworkManagerInterface::NMMetered
These came from the fact that QDBus reimplements connectNotify() to
detect connections to a dbus interface's signals. It was triggered
also when connecting to "normal" signals from the dbus interface
subclass QNetworkManagerInterface, leading to those (new) warnings.
The fix in this commit replaces signals with direct method calls,
given that the two classes are internal and that QNetworkManagerInterface
is only used by QNetworkManagerNetworkInformationBackend (and now
vice-versa too).
Change-Id: Ifef3f65ab8e4e21a2f7fdba7fa5f0fc566153649
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit cb9b46ef70f06c51aea01e83dd07d21a56627a50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(in preparation for the next commit)
Change-Id: I1a6771dc953540dfa63cb80306a48122e97eb600
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
(cherry picked from commit 9468c0e3ca4b145ffadc83170c804db5fbf0895a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As commented in header review, this will make future header reviews
less noisy.
Change-Id: Ia75e51facec100172de7dbb0854830d9981f0552
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit ab6e3c59a35e94a6740ae593b6101144fb65e089)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove a "." after the enumerator names that would end up in the docs.
This work has been kindly sponsored by the QGIS project
(https://qgis.org/).
Change-Id: I6db1e83331552a58f77479166a67b88bb25f2d6e
Pick-to: 6.6 6.5 6.2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit e366a47d65c782055a9e361ad7e18bda6cd33780)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Browser::addConnection is not a slot/invokable, and requires arguments.
What was probably meant to happen is that the connection dialog
opens.
Pick-to: 6.6 6.5
Change-Id: I4e6bffb3e0277ca3deb7111cf4bb47ff188f6f16
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3552afe38a6ba3feebe4fd9ecd561a8c0c2b9717)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The relative path + source path can be tool long for windows
Fixes: QTBUG-120758
Pick-to: 6.6 6.5
Change-Id: I42ed4f3bbf39d31bf37a5bc76eb18f473661346b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit b4246a5c28472de3c4b6a85a3daf4a1d578894ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the painting rect is adjusted within an overloaded
QSlider::initStyleOption() there are some glitches when using the fusion
style:
- the tickmarks are not painted inside the specified rect / it is
ignored
- the glue groove bar is clipped incorrectly
Pick-to: 6.6
Fixes: QTBUG-111314
Change-Id: If140c5348031d869b527c6c4850b4a8d34b395c1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 8594fe1b8dc848d8a2d61197acce67963f5fe20e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
e5d591a0d09 focused on document or tree URIs you'd get from the file
dialog, but we can also get ones via Intents from application-specific
content providers (e.g. opening an attachment from an email client).
Those need to be handled like a single document here, parsing them
like a tree URI results in a bunch of Java exceptions down the line.
Change-Id: I19cb1075fd6a3ccad927543f8bc5a63566f4877e
Pick-to: 6.6 6.5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9d4a34bbbe7ec39ef594b07aae06fc1029cc6e3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A call to QWidget::destroy() will end up in QWindow::destroy(), which
calls QWindow::setVisible(false).
A call to QWindow::setVisible(false) on a widget's window will under
normal circumstances end up in QWidgetPrivate::setVisible(), which in
turn recurses back into QWindowPrivate::setVisible(), via
QWidgetPrivate::hide_helper(), ensuring that the QWindow internal
state is updated, visibleChanged emitted, and show/hide events sent.
Durin QWidget::destroy() we end up in QWindow::destroy(), which calls
QWindow::setVisible(false), but in this case the widget no longer has
Qt::WA_WState_Created, so the hide_helper() call is skipped, and the
corresponding QWindow is not kept in the loop.
To work around this we could have checked for windowHandle() instead
of Qt::WA_WState_Created before calling hide_helper(), but that had
many other side effects, so we opt for a more targeted fix.
Pick-to: 6.6 6.5
Change-Id: I68f80e5f7df9ee811afcd274a7ee4de31a110da5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 5b09d9e6d694045a6cef15f8984bab63cf86402c)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
There's no final ) because there's nothing there to be delimited.
Pick-to: 6.6 6.5
Change-Id: I6e2677aad2ab45759db2fffd17a4ce4aa902e140
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 88e41fd03481d490e7fcf9429849c8fa5a5743e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 3bae65e7d61f85d2942c89e46e913c1056ba2daa.
Reason for revert: This version requires API >= 34 but we have AGP
7.4.1 which was tested against API 33 max, and updating it to version
8.x is blocked by QTBUG-106907. So, this will be re-stated AGP update
is done.
Task-number: QTBUG-106907
Change-Id: I1551ace76392a0532e1ecf431d03afbbd9d4a300
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 91b0f269ba8fc0ae16f96b18327b5aa30718b313)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 60113056bc4c328f62808d1c0fa2a1abec481f78. Calling
d->cond.notify_all();
without the mutex means that another thread could acquire the semaphore
(acquire the mutex, subtract from d->avail, return to caller) and
destroy it. That would mean this thread is now effectively dereferencing
a dangling d pointer.
Fixes: QTBUG-120762
Pick-to: 6.6 6.5
Change-Id: I196523f9addf41c2bf1ffffd17a96317f88b43dd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit 763ab0e6236de80a0b589fc574c75a414d86d374)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The definition in removed_api.cpp is added within the proper #ifdef
block, only the version in the header was wrong.
Amends 8e8815b688684f5b267db1c2d8ac99c8f7f7637a
Found in 6.7 API Review
Change-Id: I0a94bfaae8b3db700c794aa83d9637ec85edffb1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a4518cc706ed9ef8ed7fd79ed3423b64c6d1fb93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The handle was drawn outside of the widget's rect when tickmarks were
enabled (TicksAbove/TicksLeft).
Pick-to: 6.6 6.5
Fixes: QTBUG-83604
Change-Id: Iff3a1a330317576a759e3fd6795d0b4849e2044b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 574692e5ac95e1f2061812a43f14d325c077b7c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QIcon::availableSizes() returned duplicate sizes when there are pixmaps
with a different dpi but same size. This is not useful and therefore
filter them out. Also rearrange the conditions a little bit to bail out
on wrong mode/state early.
Task-number: QTBUG-119915
Change-Id: I9d18c78fc2a149a3a9eaaed67c6110979029705b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c53b91cc12164d779a69c2526d85e3ab9c2841e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The popup size depends on the max visible items property. But the loop
did not ignore the hidden items which results in fewer items in the
popup than allowed.
Fixes: QTBUG-120574
Pick-to: 6.6 6.5
Change-Id: Ic3c503a5272d6839aee158740e096405ca8887d6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 742be5254c9919e8c743b8b489c054d778ee4850)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The feature is needed for screen capturing Qt multimedia in order
to have better performance of getting frames
(avoid recreating fbo). In QtMM, we're going to create FBO
and use it as a hw frame (or just render it to image on the first stage)
Pick-to: 6.6 6.5
Change-Id: Id08a86b76447faa0f341c6967c2dad8f34c84959
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit b96160191fc79514173b202bf6325553a798926d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qt_import_plugins allows to control application deployment on
non-Android platforms. This adds support for the pre-defined plugin list
that is computed using the qt_import_plugins input.
Pick-to: 6.6 6.5
Task-number: QTBUG-118829
Change-Id: Iaa9c3f600533a4b5a3079ab228fabf212d9ce5a5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 438837ce274fdc1457b66179b25df40f33b23a15)
When startOpacityAnimation is triggered and the animation doesn't
finish, it might get leaked during shutdown as shown by valgrind:
```
==133963== 600 (16 direct, 584 indirect) bytes in 1 blocks are definitely lost in loss record 2,326 of 2,356
==133963== at 0x4841FA3: operator new(unsigned long) (vg_replace_malloc.c:483)
==133963== by 0x12698E2D: QLineEditIconButton::startOpacityAnimation(double) (qlineedit_p.cpp:437)
==133963== by 0x1269900D: displayWidgets(std::vector<QLineEditPrivate::SideWidgetEntry, std::allocator<QLineEditPrivate::SideWidgetEntry> > const&, bool) (qlineedit_p.cpp:459)
==133963== by 0x126A1084: QLineEdit::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qlineedit.cpp:276)
==133963== by 0x152D781E: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3935)
==133963== by 0x1269AB01: QLineEdit::textChanged(QString const&) (moc_qlineedit.cpp:447)
==133963== by 0x126A0EF8: QLineEdit::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_qlineedit.cpp:255)
==133963== by 0x152D781E: void doActivate<false>(QObject*, int, void**) (qobject.cpp:3935)
==133963== by 0x126A1A94: QWidgetLineControl::textChanged(QString const&) (moc_qwidgetlinecontrol_p.cpp:273)
==133963== by 0x126A4C35: QWidgetLineControl::finishChange(int, bool, bool) (qwidgetlinecontrol.cpp:736)
==133963== by 0x126A4F05: QWidgetLineControl::internalSetText(QString const&, int, bool) (qwidgetlinecontrol.cpp:772)
==133963== by 0x12698AF4: setText (qwidgetlinecontrol_p.h:251)
==133963== by 0x12698AF4: QLineEditPrivate::setText(QString const&) (qlineedit_p.cpp:277)
```
Note that the line numbers above are potentially slightly off as that
backtrace was recorded on Qt 5.15.9.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ie79744d98d2783e4644e18ec51892c0bc43c1557
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 76845e1d31a61735a0f0261fbc15ed7ea5ff71dc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Warns MingW (or, in general, any GCC 13):
warning: converting to 'QtPrivate::NativeFloat16Type' {aka '_Float16'} from 'double' with greater conversion rank
See also a61d7529511c890aa595110b9320ea0bf53dd623.
Fix by using ints instead.
As a drive-by, make the variable constexpr.
Amends 4b755bc11a8eadd156c65b7474c11e3ce822c6f1.
Change-Id: Ie3f3c51aa7e9323c7ba96c810d2e95247d222fd2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6d005b7c570f2ad25cf2b88329a2f99ab20b8787)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QVersionNumber, e.g., was added for Qt 5.6, the last Qt version that
didn't require C++11. So it made sense that the original documentation
stated that certain functions were only available in C++11 mode.
But already Qt 5.7 required C++11, so these historical anecdotes are
no longer pertient to today's Qt users, so remove them from the docs.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I5c732d3b9b33e1fb6947eff4fac546476c8379f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 4f3142bfce0c64d023299f142d14e60ec577b698)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While the code that checked that exitCode() == 0 was still consistent
between all the callers, when it comes to checking stderr, there were
several competing implementations, incl. checking the exitCode and
dumping stderr to qDebug(), and using QCOMPARE to QByteArray(),
presumably in order to get more detailed output on error. Alas,
QCOMPARE's toString() truncates output pretty early, making it
impossible to see what's going on on failure.
So write a small macro that checks the exitCode _after_ it checked
that stderr was empty (printing it in full if it was not), so we
consistently get the error message instead of a truncated version, or
just "exitCode() != 0" without further details.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ic8547fda3b02c645901962887c6ed7aad01f6ea4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 93af86bad566bf4c2c0a5fa7f64e84daaa20a311)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The vast majority of header fields appear only once, but there was no
efficient way to get that value: values() returns as a
QList<QByteArray> (allocating) while combinedValue() returns a
QByteArray constructed from values().join() (also allocating).
It follows that the QHttpHeaders API is incomplete (lacks an efficient
basis of operations in EoP terms).
Add a value() function that returns either the value or a
user-provided fall-back as a QByteArrayView. Unlike values() and
combinedValue(), this function can be noexcept, greatly improving
codegen for callers.
Found in API review.
Task-number: QTBUG-107042
Change-Id: I2da20815fd46fdd7f150c224f41eee53abed313e
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7897ec88f426773cea38ce8c21091a05718a09e7)
Clean up the C'n'P in the test a bit before adding tests of new
functions.
Task-number: QTBUG-107042
Change-Id: I2da20815fd46fdd7f150c224f41eee53abed313d
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 789cbeacdf1b894cde5e6cd6affc41d154716435)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found in API review.
Change-Id: Ia0a3fa388c13d76c2b12b73d5e760b13021fa072
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3c6320c41869e60a44da85d3d11e18e9914c9ca3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Looking good, because all signed integral qHash overloads are implemented
by casting to the unsigned type before hashing.
Pick-to: 6.6 6.5
Change-Id: I8372eb6d4a57b40c2371db58d1b5aeabe9a3951a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7d1f29df795e3e1635204b656b368582ed6942ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
They have nothing to do with each other, so give QTypeRevision its own
header and implementation file instead of piggy-backing on
QVersionNumber's.
Picking back to current LTS to incur the merge conflict only once, not
per (expected) follow-up change.
Amends ed080c64ae21d22115d16780a5903d7cc4fd1546.
Pick-to: 6.6 6.5
Change-Id: I2fa5d0e68f95864126bc95e3d8154134eee85553
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 37e2aa7698a16fb5bc0d2f74388620d921d977c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This test is resizing window, which is not supported in EGLFS,
so it needs to be skipped.
Task-number: QTBUG-115777
Change-Id: Ie136f6565b4d466bc62c4e2ebe2337488b5003b4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit bb07c4a37be383f27a2473400fbe3cda730eebd3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Without this change, while using EglFS, showIsFullscreen returns false,
which is not true, because EglFS always runs in fullscreen.
This change requires setting QT_QPA_PLATFORM_PLUGIN_PATH
environmental variable.
Task-number: QTBUG-115777
Change-Id: Ie7cf709e002ac70d95fe5e2698d2ee7b52e08094
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b09a70ce614faa8b0beaa86af2acb9b10a25aac8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Disable text painting, when current item in ItemView is in editing mode.
Respect custom set background colors for items in ItemView.
Fixes: QTBUG-119501
Change-Id: I0cc80459e67765b2e648aa438aabc7dc18bef4a9
Reviewed-by: Chris René Lerner <chris.lerner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5d590a38d96206bcf5ad6ffe2b156223dc909fd7)
The docs claim that QThreadPool always creates at least one thread.
However, the user can (usually by mistake) request zero or a negative
number of threads.
The maxThreadCount() function is simply returning the value, that was
requested by the user.
Since it's a public API, it is used in several places in QtConcurrent,
where it is assumed that the value is always positive. This can lead
to a crash if the user sets zero as a maxThreadCount.
Update all such places with std::max(maxThreadCount(), 1).
Prefer this approach over changing the return value of
maxThreadCount(), because its behavior is documented and tested.
Amends 885eff053797d56f2e295558d0a71b030fbb1a69.
Fixes: QTBUG-120335
Pick-to: 6.6 6.5 6.2
Change-Id: Id3b2087cec7fbc7a2d42febca6586f2dacffe444
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 936e72d18075b79c8d29353618dfbd052ae59dae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We used deleteLater(), which was triggering ASAN use-after-free error.
Apparently, what could happen is that after the context was destroyed,
we called deleteLater(), but if at this point the previous future got
finished, we still tried to emit watcher->run() to execute the
continuation. And then the watcher got deleted.
This patch replaces deleteLater() with a plain delete call. This looks
safe, because the watcher is only accessed while holding the lock.
Amends 59e21a536f7f81625216dc7a621e7be59919da33.
Fixes: QTBUG-120302
Pick-to: 6.6
Change-Id: Ia32f20bfe8daea2e2346f3d446c978ae305d2f68
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 11333a097290e4247b27adbfd024d5aa964bed35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QtOrderingPrivate::reversed() in qCompareThreeWay() to avoid
conversions to Qt::partial_ordering and Qt::strong_ordering.
Task-number: QTBUG-119433
Change-Id: Ia42bda518dcf23f5332cac9bb8d50baebef67e55
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 0995358efabc91504f2ede20c724307358f9a276)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add the setting of the layout's size constraint to 'fixed' back to the
snippet, so that the dialog automatically resizes when the extension
gets hidden. The user won't be able to resize the dialog, but allowing
the user to resize the dialog and to show and hide the extension anyway
leads to unpredictable results for the user.
Amends 11da92ba94570e5eec01597fe09f0a9a48acc677.
Pick-to: 6.6
Change-Id: Ie74ca36eaa1a8e9567e0d5826f91f8633e5cbc05
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 51a1dfe72ddd922cd6caf28d532b3311db767989)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port all string-based signal/slots connections to pmf-style connects.
Change-Id: If1075a5a8a4d018e060e7d18ee59c8fc4c0a5207
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 7dd4a7b2133b9a6aa4f67a3ff5760303af68ac54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port all string-based signal/slots connections to pmf-style connects.
Change-Id: I4ebabf1b117f86f39d3875965efa8ee5042bce84
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b71aa162c00ff180cc946b8fd6c9c670d04ec262)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port all string-based signal/slots connections to pmf-style connects.
Change-Id: Ic7ecfd1efb8eb76239598e48f25251357040f814
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit fb58a3aabe8ff9956560dea64c91cd8727da839d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port all string-based signal/slots connections to pmf-style connects.
Change-Id: I7d77c2a10ed0c27422893403dfc9c5a6d43ea798
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e5c40ec5c117376f401c01069f05780046d07094)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port all string-based signal/slots connections to pmf-style connects.
Change-Id: I975232a3fedf82cd3327638a0ee119d1f2a90d84
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bbdc8afa116155a9e8353f1d39af19a2228e3412)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Port all string-based signal/slots connections to pmf-style connects.
Change-Id: I6121e727c2730f9e5947f9f3b7550903bb17aee0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e03e2e9886ad36f7c3cc0eafd75be81a84f955ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Found in API-review
Change-Id: Ib047c79d977ad6870c1e426cd1add994a3634df4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 723ab99b1ac55c8d32a93ea80224d7ffb22f7893)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't depend on transitive includes and forward declarations.
Found in API-review.
Change-Id: I61b9517453f164391abb9254d92e7ea38051e730
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit fbe29fb3684b02bec5f6019755d0a1bb0c94c275)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The json return type and function naming has gone back
and forth. Let's go with QJsonDocument after all, and add new
overloads in future if necessary.
Task-number: QTBUG-119002
Change-Id: I3f9de0e6cba7d5c52d016d252d65b81f345af050
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 1702a37a3955f449210fe3874cfcd35bb08417ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
One might want to add an accellerator to dockwidget titles to be used in
contexts that isn't directly the title, but still uses the title.
Dockwidget title accelerators doesn't work in dock widgets, so don't
show them.
They are still available in e.g. a right click menu on a dockwidget to
hide/show, and here the accellerator might come handy, and also if a
dockwidget is tabbed.
Pick-to: 6.6
Change-Id: I196e1aa92a5c53fed735b598653c267509f788b8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
(cherry picked from commit cc67b25579c1bb5ea9f5c1ca4c9b7997e66f19b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fix allows using multiple executable targets in a single
CMakeLists.txt when building for android. Previously artifacts for both
targes were collected in a common android-build directory, that led to
artifacts overlaping and broke the deployment process.
Users need to set the QT_USE_TARGET_ANDROID_BUILD_DIR to TRUE to enable
the new android-build directories naming.
This change need QtC adjustments that will take a new directory naming
into account.
Task-number: QTBUG-117443
Pick-to: 6.6 6.5
Change-Id: I47568798e2a2e8550ddab1990a33611967183761
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 5f0575256a4af14c1f2f9a846e40cd9490c12b56)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It looks like resource object targets don't need AUTOMOC as well
as other AUTOGEN tools. The only source file skips autogen explicitly,
but AUTOMOC requirement is added to the resource object targets anyway.
This disables all AUTOGEN related properties explicitly for all
resource object targets.
The problem occurs when building top-level Qt with the static library
that uses resources in tree.
Pick-to: 6.6 6.5 6.2
Change-Id: I5c968a3e34c881e7fbc5589626ab02b3b1e53968
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit dd4c14104cfab6330b31937acf2b2f120ef940a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and the getter to isPositionalBindingEnabled() for QSqlQuery and
QSqlResult.
This amends e532933a2a9ff0219f0179880e05c95e0ec5e19d
[ChangeLog][QtSql][QSqlQuery] Add setPositionalBindingEnabled() to be
able to disable positional binding.
Task-number: QTBUG-119952
Fixes: QTBUG-120548
Change-Id: I0a0afb652d0fc9421f5692b0927a66b2a9b7b854
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit b1e5d9275d4cf6152e4e9456b1bc2d585a5512e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Optimize the painting of the tickmarks by collecting all lines to draw
in a vector and then passing all to the painter instead calling
drawLine() for every single tickmark.
Change-Id: Ic75e733a02fbf6143d21d4630f6a6d6de913f16c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 83ab7d21150115fbbe954af7d87f1597bf65d206)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The outline color was modified under some conditions but used afterwards
independently from this condition which lead to a wrong tickmark color.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I45baf9127aea96bfe84a7410dd592a084f14f13c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e9438da42a2ce3c470df01f82245dbfa7901f8db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Do not downscale the icon used for QSystemTrayIcon even though the msdn
documentation states that SM_CXICON/SM_CYICON should be used as the
size to avoid blurry icons in the notification.
Pick-to: 6.6
Fixes: QTBUG-103825
Change-Id: I2d466e895254aa3c41682290cc7864632c57d5d7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 94809cdec004611bdb8531304e6c74761014876b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Sync iconFromWindowsTheme() to use themeHint(IconPixmapSizes) similar to
iconFromMacTheme().
Pick-to: 6.6
Task-number: QTBUG-52622
Change-Id: Id06454b010b1946ee0565190672ee8624cffe2de
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4d2802702e519c7513440ea485b19ff611696fa1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A null QString / QStringView has a null begin pointer stored as its
array beginning (something we hide a little in the QString::data()
function, but not in QStringView::data()). We've been passing a null
pointer to memcpy() every time someone passed a null QStringView for
QString's single-argument arg() call, though not the multi-string arg()
version (which is the only one QStringView offers).
Commit f5021835dfb4b0bf974794b598cbdf9f0f95898d made this worse by
making QStringViews created from null QStrings retain the nullness (as
was intended).
Fixes: QTBUG-120624
Pick-to: 6.6 6.5 6.2
Change-Id: I6e2677aad2ab45759db2fffd17a870639b19340b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d351a97e85e5ed8acd7ad1357ef76dc2e0ad639f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Change the best practices to how-tos, which are categorized
now on a new page.
Fixes: QTBUG-118044
Pick-to: 6.6 6.5
Change-Id: I78dba2a1fde03b346f110ecd54e11485a0869540
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 7372b3ab6748b68f1c5fba1f61df8083ce719bc5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This change updates getOpenFileContent to provide a parent when the
non-WASM fallback to a QFileDialog is created, which avoids issues
where this call is made inside another application. Specifically,
if a QDialog is created lacking a parent to the main window, it will
prevent interaction with that dialog. This patch addresses that problem
with window modality.
This change also updates saveFileContent to provide a parent for
the fallback mechanism, so that both static APIs that interact
with WASM/non-WASM dialogs have comparable behavior.
The new parent argument is updated in the documentation. Documentation
is clarified in terms of usage outside Qt for WebAssembly.
[ChangeLog][QtWidgets][QFileDialog] Adds an overload to the
static methods getOpenFileContent and saveFileContent with a
new parent argument which always no-ops in the WASM environment.
Fixes: QTBUG-118396
Pick-to: 6.6 6.5
Change-Id: Ic59aee386631172d4a29b42fe11e5af318474a1d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 7c5cf8cae054954975a3e262f7fe3cd9897d67f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This test was disabled during Qt5 porting because it was unstable.
According to the discussion in the bug report, a deprecated function was
used to wait for the window to get exposed. This was later replaced by a
more robust QTest::qWaitForWindowExposed() but the test was not
re-enabled again.
Fixes: QTBUG-22544
Change-Id: I3190e38c1f42dc719803a60e66a86c3773cbedcd
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit ce8c81555de31641041730df08be257cf0ddc221)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Promises are registered upon entry to the pool and
unregistered upon exit. If all promises are in a 'pending' state,
new promises can't be processed. Upon completion of a registered
promise, it is unregistered, allowing space for a new promise.
The code path responsible for unregistering promises when they
resolve runs each time a promise's callback is called.
Unfortunately, there's no guarantee that the callback will be
invoked upon the promise's resolution. For instance, promises
registered with only a 'catch' callback may never be triggered
when the promise resolves correctly.
This commit ensures that a final callback is always registered,
even if the user did not provide one.
This guarantees that promises are always unregistered upon resolution
Fixes: QTBUG-118161
Pick-to: 6.6 6.5
Change-Id: Ifea93d692464a6ef40c4bcad60f840ca0cb650c9
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 1e6841245dca3bda5dee050fc841c7129142dd9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Misc style fixes in preparation for the new overloads taking
QStringView.
Pick-to: 6.6 6.5
Change-Id: I3b838543aefd08bf115488e571b1bb6eec8d968d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ddad911f9be71d3a1396e28261ffe386e880aa69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make toMimeDataWithFile() handle writing files to the
in-memory file system correctly: this is an async operation
and we need to collect the files as the writes complete
and then invoke the callback once all files have been
saved. There's then no need for a global static QMimeData.
Use toMimeDataWithFile() for both the paste and drop
handling, however QPlatformClipboard::setMimeData() takes
ownership of the passed in QMimeData and the callback API
must be designed accordingly.
An open question is when we should delete the files.
Deleting them right away (after calling the app event
handler) is predictable, however it looks like QPlatformClipboard::setMimeData() retains the current
QMimeData until a new one is set, so maybe we should
follow that.
Change-Id: Ia9b825eaef1134ff9a554e51ee7e41d1c2ee779a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 0ffe8050bd5b55d64da37f5177a7e20dd9d14232)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some platforms like VxWorks do not support inotify
or any similar solution for file watching.
Because of that, the implementation falls back to polling.
That means that tests that require a native backend will fail.
Fix the problem by skipping adding a test case for a native backend.
Task-number: QTBUG-115777
Change-Id: I0d683e6376a0453bd2fd591302c4f3ef7ceea87c
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
(cherry picked from commit eabef00425083f19b0da0380378e13780d44a199)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also means these mapping can now also handle overflowing perspective
better.
Change-Id: Id506634c445521f1b041ec2e9051aa499c24671b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 1f32345a9a30ec11e9213d87b6b18b56beccbe2c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Use QString as inheader record as the place of definition of both
Qt::Literals and Qt::Literals::StringLiterals. Previously mentioned
headers never exist.
Fixes: QTBUG-120379
Pick-to: 6.6 6.5
Change-Id: I104f73b338a144ef5f296500a9a4368cd3791750
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8081c618827403b2658236d6fefbca0e88517303)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This allows other areas to utilize this
Change-Id: I4bc7e8374289a19afe8b639b2b3b0dc0f8f65a3a
Done-with: Mikolaj.Boc@qt.io
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The default value in the default manifest has been for few
releases, set as minimal, and since Widgets Android style
is not fully supported anymore, we can set this to default
to minimal under the hood as well to avoid needing to always
explicitly needing to set it to minimal.
Change-Id: Id0b2134c572694be1e190347ff75f51ade65f0c4
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit ee4f91fa50fa470b4891318750bd7aad5e508124)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The devicePixelRatio was not taken into account when a standard icon was
requested from the windows qpa which resulted in blurry icons for a
dpr != 1.
Therefore pass the dpr-corrected size to QWindowsTheme::standardPixmap()
and pass this size to SHDefExtractIcon() to get a correctly scaled icon.
Pick-to: 6.6
Fixes: QTBUG-52622
Change-Id: Ia771dd2f93fa133cf2c4429ef59a9c5cb05ad047
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 20cdc663b420a332d16f5f1ca82f352924cd7d1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
An assert is harder to miss than a warning, which makes it more likely
to get fixed. Thanks to Mårten Nordheim for the idea.
Add the assert in inline code so that users compiling their code in
debug mode (or with -DQT_FORCE_ASSERTS) can hit the assert even when
built agaist a release build of Qt (not everyone compile their code with
a debug build of Qt). Thanks to Giuseppe D'Angelo for the idea.
Pick-to: 6.6 6.5
Task-number: QTBUG-115125
Change-Id: I2935d32ea5a2c288d7a836abbae66ac53cb5ab2f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit afddb327bd866ac693e475901d4d10acc6c83757)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This test is resizing top window, which is not supported in EGLFS,
so this test needs to be turned off.
Task-number: QTBUG-115777
Change-Id: Idb81802399fe5bd9af3f342692d2212cd06ead9c
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
(cherry picked from commit 061a2012ad70159ddb28a28344f67637bc965f18)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The function uses external non-cache variable that is set in different
cmake macro. It's better to pass the value as argument.
Pick-to: 6.6 6.5
Change-Id: I282bd506cf2dcd998a0ddd7deaad244fab34a8db
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 0d7cda9cdaeefe8363f44204b0cb7384ec990dc8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QPlainTextEditPrivate::updatePlaceholderVisibility() issued a full
viewport update, when the document became empty and the placeholder text
needed to be shown. No update was issued, when the placeholder text was
replaced by a first text character entered.
That relied on the assumption, that the placeholder text would disappear
with the first text line being rendered (even if it has just one char).
When the placeholder text covered multiple line, only the first of them
disappeared.
This patch adds a boolean to remember, that the placeholder text is
shown. If that is the case and the first char is entered, a full update
is issued, to remove all lines of the placeholder text. The boolean flag
is cleared thereafter, to avoid unnecessary viewport updates.
isPlaceHolderTextVisible() is renamed into placeHolderTextToBeShown(),
because the method returns an instruction, rather than a state.
tst_QPlainTextEdit::placeholderVisibility() is adapted to test the
boolean flag, hence the real visibility of the placeholder text.
That extends its scope to the bug at hand.
Fixes: QTBUG-119808
Pick-to: 6.6 6.5 6.2
Change-Id: I07a7059ae619dc85d0c21247d829120e6afa7115
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 729e23f15f366f013da8e149fa95e618c9a95e13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Replace some more string-based connects with pmf-style to trigger a
compiler error instead a runtime error if a signal or slot does no
longer exists.
Change-Id: Ibc047cc935885a30ea58367fa97e9f962b87ca2c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 9e78256579e8dc704066a98cb4816a1aab0e7e3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends e608bc019232f6956c4520be1a6103a1845c6991 by adding the
implementation of this method whose implementation got accidentally
removed (because it became unused). It's added in removed_api.cpp
because, as the commit said, the cost for creating an empty
QAnyStringView is practically nil.
It's not zero on Windows, because the replacement function has five
parameters, so the last (the options) is passed on the stack. But that
is not enough of a justification to keep separate functions.
Fixes: QTBUG-120309
Change-Id: I6e2677aad2ab45759db2fffd17a29b4ec7728426
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit efaa849023d77dfee82e4d9ff904c3711b4fb611)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Embedding a QWidget in a window container (via its windowHandle())
may cause crashes, e.g. during drag & drop and when the application
goes out of scope.
If a QWidget->windowHandle() is attempted to be embedded in a window
container, return the pointer to the widget instead of creating a
container.
Add an autotest.
Update documentation.
[ChangeLog][QtWidgets][QWindowContainer] If createWindowContainer()
is called with a QWidgetWindow argument, return pointer to the
widget instead of new container.
Fixes: QTBUG-119113
Change-Id: Id052a03be13adce05bbd025d86270d265dfb662e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit b9ee6d3b2e465eb70ba43ea62d2ada5327a138c8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The snippets in the QStylePlugin class documentation show the
relevant bits well enough.
Pick-to: 6.6
Fixes: QTBUG-119974
Change-Id: Iba4a37664d64d86a2946f41d131a201ccdcd723b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 5a0135fafb16203a812163f7ed55c1b981477cb5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
.qmlextra's text color #254117 is too dark. Let it inherit a better
suited text color.
Amends: 436467134e6087ec5a0e360e1837aac4da2ce9ca
Pick-to: 6.6 6.5
Fixes: QTCREATORBUG-30117
Change-Id: Ia9e0567b0b00f2e7c1359ac85f10c72cece3c087
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 7b27a5b137e9b874928cebf2740520a0d98df282)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The adjustment of block length with 'off-by-one' affects content
length during undo operation. The issue occurs when we perform undo
operation for a set of group blocks that have same fragment
position. Since their positions are same, group block change
(QTextDocumentPrivate::documentChange) with respect to insertion
doesn't affect document block length and further adjustment to
'off-by-one' without considering this leads to incorrect document
content change information (such as invalid information with regard
to characters removed).
This patch skips adjustment of group block length during undo
operation.
Amends 8fbedf2196a292fe2affcf83ddc846b9c852772a
Fixes: QTBUG-113865
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I315dcf01ba5b2f4ed6d95e9d6910d82848374aef
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 8a725084396da5872fa020212b3cb09ee40a91df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The function is given a vector of Http2::Frame's and flattens it into
a vector<uchar>. While each Frame can contain a maximum of 16GiB of
data (24-bit size field), one "only" needs 257 of them to overflow the
quint32 variable's range.
So make sure any overflow does not go undetected.
Keep the limited uint32_t range for now, as we don't know whether all
consumers of the result can deal with more than 4GiB of data.
Since all these frames must be in memory, this cannot overflow in
practice on 32-bit machines.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Iafaa7d1c870cba9100e75065db11d95934f86213
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1e6bb61af3ae29755f93b92f157df026f934ae61)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Update screenshot
- Provide some information text on the screen when no images are found
- Add all supported image formats to the file filters
- Minor fixes according to our coding conventions: eg. don't shadow
variables
Fixes: QTBUG-119979
Change-Id: If41adf34f38bfa101f2c5433082828c1a10668b1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 30e6d822327d8105d209af10d077512f21ecc12c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In Qt versions greater than 6.4.2, when using Qt:FramelessWindowHint and
WS_THICKFRAME simultaneously, and handling the WM_NCCALCSIZE message to
draw a frameless window, the right and bottom sides may extend beyond
the drawable boundaries.
This is because in the previous commits, the calculation for margins was
skipped for windows with Qt:FramelessWindowHint set. This is correct for
non-maximized windows. However, when a window is maximized on Windows,
its actual size is slightly larger than the drawable area to avoid users
from dragging the border to resize the window. When window was maximized
, the code for calculating geometry should remove the margins instead of
skipping its calculation.
The fixed code determines whether to skip the calculation of margins and
frame by checking whether the window is maximized during the calculation
[ChangeLog][QPA][Windows] Adding a check for the maximized state of the
window during the calculation of margins. Margins calculation will not
be skipped for maximized windows.
Task-number: QTBUG-120196
Pick-to: 6.6 6.5
Change-Id: I63c8dbc8f65ff28cc581be261acfd3f675b027c4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5f7b4c045f4347b9e47849d15d5932df45626c51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Prioritize CMake snippets.
* Remove unrelated mention to various qmake variables.
* Mention the page for command line configuration and building
and remove the same duplicated command from this page.
* Mention the page for customizing the build from the Android docs.
Task-number: QTBUG-115020
Change-Id: I966c37661e17f6ffb8d25bfa3cd91e92be364e1d
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit 5192de707d34b5ef3bcffdc8370a2f894ef647f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Setting a DefaultProperty is arguably something
more useful to people than the 'made up' version example.
Also add more links to the relevant QML pages.
Pick-to: 6.6
Change-Id: Id967df7ddf81511299f95b9fd24f56af671fb855
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 98ba0d4e95353febd5a4b14fe2eb9cbd4259bf0a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a widget received a DragEnter event that it didn't accept, then the
UnderMouse widget attribute gets set. But the drag manager never got a
drag target, so the DragLeave event was never delivered, leaving the
UnderMouse attribute set incorrectly.
We always need to send DragLeave events to the receiver, even if the
DragEnter or DragMove was not accepted. Otherwise we are not in balance,
and the UnderMouse attribute will remain set.
This is a change of behavior and a very old bug, so only fixing this in
unreleased branches. Test case added to verify that explicitly generated
drag events result in the correct enter/leave events.
[ChangeLog][QtWidgets][QWidget] DragLeave events are now always sent to
the widget the mouse is leaving, even if it didn't accept the DragEnter
event.
Fixes: QTBUG-50403
Change-Id: I5eae49da000fb4fea81f1767f0e73a06a6b78975
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4f95e66f940c3a6c72f51c2428620c09e30bbd0b)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Save captured frames names and add getters for them
Change-Id: I429e1512d6610ade9414f59fee3d081548cbb2ab
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
(cherry picked from commit 564efa3741ccd21b03d95a778e7a37d5bd902e53)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Turn on anti-aliasing, and update screenshot.
The example is still not great and under-documented, but at least it
doesn't look horrible anymore.
Pick-to: 6.6
Task-number: QTBUG-120291
Change-Id: Ie709cb51d64c535d7cd0aa1451b3c5bb901324cb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2b9d021ba5487f7f5f67b958a17160c4cf468561)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The essence of the example was already fully quoted in the
model/view documentation. Move the code into a snippet
source, and update the screenshot.
Fixes: QTBUG-119976
Pick-to: 6.6
Change-Id: Id2f10bb26a650419969bbfa9b76cb74babd3319e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 99eaae4323ff1fda2d8cc0184d824b6d9c3f23ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
9da8d67b3bca1d40ae221a9c6be218fe57759724 has commented out setting the
current index of the combo box container during a mouse hover event.
That has caused a regression.
Amend the patch and enable visual hover effect.
Fixes: QTBUG-120167
Change-Id: Ic12e70f9f70ac2f7b9604580562c35551659c5e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit a5a082406e8a8a14e9d21921e918e36a270939fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The table had the wrong row span making it malfomatted.
Task-number: QTBUG-115020
Change-Id: Icc35df3cd7dcdad2407d4c93d7a2a8d3d1701275
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit ec7b4d547d74ded2e82674ad007f60109d73df29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In QtServiceBase setApplicationState() is being called before
the Qt libs are loaded and that call invokes a native method,
so that leads to a crash/exception for UnsatisfiedLinkError.
Change-Id: I879d120f0cc2985ab49f7402a65f171950451914
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit f292a669042df26d372985b16d4ab50ea6d4dca5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To avoid exceptions if the metadata is a non-string like boolean
or integer.
Task-number: QTBUG-115016
Change-Id: I104e6b2954873e74bc100cb965ee8ea9b6d14568
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 400e7d1a758394df350cbdcbc6cff3683976b789)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To make it more maintainable and keep the docs up-to-date,
define most of the version numbers for various tools used
in Qt Android dev environment.
Task-number: QTBUG-115020
Change-Id: I92aa52398b7700e90a0ffd39a1c40bb7a17c3658
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
(cherry picked from commit eef0d82a4c991e0ac8b2f250b439c48396678c23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
since m_service will not be yet set, m_context should be used here.
Task-number: QTBUG-115016
Change-Id: Ie259e703da1d8aac23117f032b7d146f7060aac2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit fcc8b89ae01eb405c4cfa8fafd7b1b7068a2d033)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otheriwse Qt C++ code will not be able to find it.
Task-number: QTBUG-115016
Change-Id: Id3a2efb1f33cb60a523359e1ad646a394e24397e
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Janne Juntunen <janne.juntunen@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 7996a3fc7f408a2f92b103f6d03d172b1f0d9295)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's two alternative strategies for fixing this:
1. When fetching the preferred sizes from an item, the number is bounded
to a smaller (but still very large) value - not subject to overflow.
In practice this will result in the correct layout, but the
consequence is a small inconsistency: The preferred size of the
layout will be less than infinite despite that one of its items have
a preferred size of infinite.
2. Do not bound the fetched preferred sizes from items, but instead
let the rest of the code handle infinity.
This will result in the correct layout, and also a correct preferred
size of the layout.
This patch uses the second strategy, by applying a bound when needed.
Autotest will be submitted to qtdeclarative, since QGraphicsLayouts are
not affected by this.
Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-116577
Change-Id: I49f79d288370bd93831ac9eda623ce4bbf587796
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 2a95ecf7e81fbdcfad50f8a1dd5c62b120e2ec27)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
One more place were we should only pass the filename instead the full
path to IFileDialog::SetFileName()
Amends 19c701d370512e81d1b934f899b03ae0c2e6953f
Pick-to: 6.6
Task-number: QTBUG-47159
Change-Id: I3ac36eb2b6b6fe84fe6985590da882b1d5733efa
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2643210bd6e07aa1d8ae78c109592bdc2545b074)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This also adds the ability to distinguish between a Pen and a Touch.
Fixes: QTBUG-116989
Change-Id: Iffc5d20c9b46c1746a03c45dd12017d5dd5172a5
Pick-to: 6.6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 0367aace14b61e72433fa7cb7aab18b3def0030c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If there's e.g. an infinite loop during main() that
would previously result in a blank page, but not error
message. The expected case is that we would get a RangeError
exception, but that exception never reaches the catch
handlers in qtloader.js.
Work around this by setting noInitialRun, followed by
calling main manually. We then need to handle the case
where the app.exec() workaround throws, which should
not trigger an error.
Change-Id: Ia8431279308770981316cd168e4316341bfb2531
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit db93cd4f61ec9ad75b2389e5ac1724becfce3a1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This increases the maximum available memory from 2GB
(Emscritpten default) to 4GB, which is the 32-bit wasm
max.
Add QT_WASM_MAXIMUM_MEMORY qmake/cmake option for overriding.
Change-Id: I6257fc919a749412c4ba1e0f939996c6057ce314
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit c6d3b91549ceaafa81cbcedf243f798f1114a467)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We listen to the onExit and on onAbort Emscripten events,
and also handle exit by exception. Make sure we call
onExit only once on exit, regardless of the order and
number of Emscripten events.
Change-Id: I4833a1056fad0a2706bd6c0f0fce98fb052fe8c8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit ac4619a36a54a2168ea5d7a2c7d059781564098c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Perparing for enhanced Darg Drop support
Done-with: Mikolaj.Boc@qt.io
Change-Id: I24ce72570ce0754c8a5c152a92192eebeae5b340
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 585f348f3c8137cec4ab503eecc28296da2798f7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix template arguments in \fn signatures for Qt::compareThreeWay()
functions.
* Fix template arguments in \fn signatures for QDebug::operator<<()
functions.
* Fix \sa links to specific overloads of QSpan functions.
* Fix \sa links to specific overloads of QFileInfo::fileTime().
* Remove references to 'Custom Type Example' (example has been removed).
* Fix linking to 'JSON Save Game' example.
* Fix references to 'Queued Custom Type' example.
* Fix linking to QCryptographicHash::Algorithm.
* Fix linking to Qt Qml module.
* Fix undocumented parameters in qHypot().
Change-Id: If9eb9978a14e147f003672a682972b319454c311
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 96740ea3fed8a7837dc282135661723858fff198)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The length check is hard coded to the length of the string under test.
As the STRINGS match only filters out non printable characters, we've
no guarantee that the characters before the == position are printable
or not. So _pos may be > 1 and then string length check will be broken.
Replaced this by a pattern match to see whether there's something after
the ":".
Fixes: QTBUG-120125
Pick-to: 6.6 6.5
Change-Id: I24971b3bc83ea05841dae21667fbbae3416cfcf9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit e7457ff171255148d92254316433d39ef1bd3d28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While the QJniArray type still is expected to be a QJniObject, we should
still make the QJniArrayBase type non-constructible by making the
constructors protected. Also make the destructor of that type protected
and add explicit default implementations of the SMF.
Name the SFINAE helper and predciate consistently as IfCanConvert.
Change-Id: I7a7c6a320fe9acb0758b53d94832d355c99cb6bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 4a19e97f70994bc8bb67e26533d18266b8a615bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simplify the "responsive layout" implementation. Just use a QBoxLayout
with changing direction instead of repopulating a QGridLayout, and
change the orientation of one set of sliders instead of creating two
sets in a stacked layout.
Simplify the resizeEvent() implementation accordingly.
Update the documentation snippet text to match the code, and document
the resizeEvent() override.
Pick-to: 6.6
Fixes: QTBUG-119977
Change-Id: I73a1bb215c956fa283291ebf0ea45ff9a975c727
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f3fb89ba298e1741320d8bfac9cbd0d503373bff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't subclass QJniObject. It's not necessary, and gets us into UB
territory due to QJniObject not having a virtual destructor. Also,
rename the helper class to JObject, as Object is a valid Java class
that one might want to be able to declare explicitly.
Instead, give the declared QtJniTypes types a QJniObject member that
they forward the calls to. That requires some duplication of APIs, but
at the same time makes it unnecessary to explicitly remove the old
QJniObject APIs that we want to ultimately deprecate.
We need to specialize a few more of the conversion routines to handle
such types now, as QJniObject is no longer a base class. To be able to
do that we need to add a base class that we can test for, and that has
the APIs that don't depend on the template parameter.
Since we now need to know about QtJniTypes::JObject(Base) in the
conversion routines that are implemented in qjniobject.h, we have to
move these base types into that header as well. This reduces the
qjnitypes.h header to the macros for declaring types and a few helpers
for native methods, which is perhaps how it should be anyway.
Change-Id: If2052a79a108fdb62ca71c88f4fa04d9f5ea2c4b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a5d14a9f5cfe41784960fe825609d91b9a18c17e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently, if the cmake program path passed to androidtestrunner
contains space, QProcess will get an invalid program path. To fix
that, quote the cmake command passed to androidtestrunner and use
QProcess::splitCommand() to get the program and args list.
Task-number: QTBUG-105524
Change-Id: Icb665033884127972bff205157ff22aa469c135c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit a1b1759abfce0972a75072893148fc8ed7fa6bd2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This allows to have a full list of up-to-date CMake properties
or variables to be shown in the Android docs.
Task-number: QTBUG-115020
Change-Id: I6a75586432fc374f1b4affe0468cd55bad1a868f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit a5ce49cbeb7a3614d7ddf299933adc183fee1ce5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation about QWindowsIntegration is outdated since ages and
not used anywhere so remove it.
Change-Id: I3addb77f2024bfc8239aa57a866e9bdb8afc8381
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
(cherry picked from commit faf040d307dce583b0f1e8b5b2d9e30c48134d8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a way to run code after qt_deploy_runtime_dependencies has finished
its job.
Motivation: To deploy QtWebEngine-specific assets we must call a
QtWebEngine-specific deployment function that is defined in the
QtWebEngineCore module.
Qt modules (and other code) can now register a deployment hook with
_qt_internal_add_deployment_hook(my_hook). The function my_hook will be
called at the end of _qt_internal_generic_deployqt.
The function my_hook will be called with all arguments that were passed
to _qt_internal_generic_deployqt plus a list of resolved dependencies.
The hook can use this list of dependencies to decide whether to deploy
files.
Pick-to: 6.6 6.5
Task-number: QTBUG-119077
Change-Id: I07ab2f6b3a0ea399b43409b4a0498dbf2f52664f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 21bf313ce65e248793f36363a510539f6e658771)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][CMake] The qt_deploy_runtime_dependencies function gained
the LIBEXEC_DIR argument to set the directory for deploying helper
executables on Unix derivatives.
Change-Id: Icf2b0b439a0e635caa4d9bd2f6950bec74f97c3b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit f355f4fe7ea36c6d2d3a67332a183c9fa7e61b7e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][CMake] Added the deployment variable QT_DEPLOY_LIBEXEC_DIR.
This variable can be used in CMake deployment scripts to install helper
binaries of a project. In particular, this directory is going to be used
for deploying the QtWebEngineProcess executable.
Task-number: QTBUG-119077
Change-Id: Ia2502af696c53943ad13e3944c8debf2dfd8daee
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 12b4085f45317b1f88fb95f3c3a5f45dfc8f8848)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Store the locations of INSTALL_DATA and INSTALL_LIBEXECS in
.qt/QtDeploySupport.cmake which is generated for every project.
This information will be used to locate the helper binary and resources
of QtWebEngine.
Pick-to: 6.6 6.5
Task-number: QTBUG-119077
Change-Id: I2fb6f9b31fd1dcd872365d020c8ac71db426fdec
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 32940a8ea42cb6d6edea662187ebc9146cbc9e29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove an unused ifdef for MinGW < 3 which is no longer needed
Change-Id: Id6a647982c22a1bbf5139e85aace1f37844400a9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 126ae08601b4745dfb9a14bfa06bfa3de70078bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Both the GUI and core version of that test is flaky on QNX.
Pick-to: 6.6
Task-number: QTBUG-119359
Change-Id: Ied7013e04bdd12270a84ab32d2bd4e45c52136c3
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
(cherry picked from commit 240ea74b25469ca00ef39a0a3a00db12e3d387ed)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
According to the specification
https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html#guidelines
1) "the dash “-” character is used to separate levels of specificity in
icon names, for all contexts other than MimeTypes"
2) "the “Applications” context should not use this method of falling
back to more generic icons"
Pick-to: 6.6
Change-Id: Ia3536141158a4b6c1c4f85db8ad890514cf19e84
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e0c435cbfeaf1b82f759910fbf05d13e55d4f95f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When setting the model either directly for the combobox
itself or for the combobox's view, disconnect from the model
signals and connect to them anew. Always set the model for the
view first before connecting the combobox's own slots to the model's
signals. Since slots are activated in the order in which they are
connected [1] and both of them are connected to the
QAbstractItemModel::rowsInserted signal, this ensures that the
QAbstractItemViewPrivate::rowsInserted/QListView::rowsInserted
slot will get activated before the QComboBoxPrivate::rowsInserted one.
(QAbstractItemView::setModel connects its slots to the model's signals.)
Activating these slots the other way around is problematic
as described in more detail in
ecef7046245f3adee9366d3543e4ed2a09f65735 and QTBUG-120121.
(macOS accessibility bridge depends on
QAbstractItemViewPrivate::rowsInserted to
update its table representation, which may be necessary
before activating other slots; ATs or platform a11y caches
may depend on correct event order.)
In a quick test, this commit fixes the QTBUG-119526 crash reliably
reproducible after 5093e517b924074ab6e63658c87237be315a17e6
even without the previous fix ecef7046245f3adee9366d3543e4ed2a09f65735
in place. However, leave that one in place, too, as
relying on the order in which the connected slots are called
is quite fragile (s. the discussion in the Gerrit change
for ecef7046245f3adee9366d3543e4ed2a09f65735).
[1] https://doc.qt.io/qt-6/qobject.html#connect
Fixes: QTBUG-120121
Task-number: QTBUG-119526
Pick-to: 6.6 6.5
Change-Id: If75fef661f7fcfc1e30e90ec851a2555cf25a65d
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 7120859fdb34cb7d80a183f1a8327b88d0fa7e10)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When calculating margins, added a check to see if the window rect and
the client rect are the same size. If they are, we return early, to
avoid overwriting user-defined specific margins.
Fixes: QTBUG-117704
Pick-to: 6.6 6.5
Change-Id: I9947feab4cb900293fb6be6cf09c56268f38d64a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 03a4164206d64151da7e0b0f850063e501bdea57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When cross-compiling a user project from x86_64 to arm64 MSVC Windows
target, during deployment we need to deploy arm libraries.
By default because we use an x86_64 windeployqt, it always deploys
x86_64 libraries.
Make sure to pass the path to the target WoA qtpaths.bat file to
windeployqt, so it deploys arm libraries.
Pick-to: 6.6 6.5
Fixes: QTBUG-119619
Change-Id: Ib3b5498ae906726d1f9e0919333c102898b48ea9
Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 571201603acc731330c9af42a3aca9cda41d38fd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The compile test would fail on certain systems due to usage of
uninitialized variable.
Amends 4a46ba1209907796f4a14f6feb35ed4d70155d7d
Fixes: QTBUG-120141
Pick-to: 6.6
Change-Id: I4ebbd9dcc820a26c4f8cec0460c5dacbd85c4d4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 75964763660cb131a0afe7b0bc051fd901939821)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Mandated by P0792R9 already, but we never checked and P0792R14 has
user-defaulted assignment operators showing up in the synopsis now,
so make sure we don't accidentally break this going forward.
Amends 29b65c98e720056e87334ce88a683969e57efd3d.
Pick-to: 6.6 6.5
Change-Id: Ief9c5ff30895f8bfccec1c24d1777d3dab76c95a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4271114dc6b6c699efe11dc1a2b8946d2bbbb241)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
No functional change, just using the already-existing named constraint
instead of more enable_if fiddling.
Amends 29b65c98e720056e87334ce88a683969e57efd3d.
Pick-to: 6.6 6.5
Change-Id: Idae4962834f14e2a5273099b5611ebcbb2a54447
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 41c41b4ba58ee4a7d5f66d8f03d40b8631ba7547)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Drop the remove_cvref_t (T is already decayed by way of take-by-value)
and apply De Morgan's Law.
No functional change, just fewer templates to instantiate.
Amends 29b65c98e720056e87334ce88a683969e57efd3d.
Pick-to: 6.6 6.5
Change-Id: I0c0f8c4a288145d05636fb053cc260a917fcc4c5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0d0cd1fe2c4f2d90a8184ce88383bdf1ff35b338)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QAIVP has a function named 'offset()' which is hidden by QHVP::offset
variable. Therefore rename the QHVP::offset to headerOffset
Pick-to: 6.6 6.5
Change-Id: Iadb18b8f18197925daa72af243483a044c1d94e7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 15884aba8fc697ce3c2b9b5f7dea14093f037f03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The dragPosition was calculated without taking the scroll offset into
account as it's done within QAIV.
Amends 787b4c1506aba7e83d861e178329a18c6ec34322
Pick-to: 6.6 6.5
Fixes: QTBUG-120055
Task-number: QTBUG-113573
Change-Id: I0e20065f797a1a3f7df07583fccfa029b636fead
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 64a283a98894705fe51c9423812bbeb634138850)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When calling QFileDialog::selectFile(), the file is passed as QUrl to
the underlying functions. Then this url was converted back to a local
file and the full path (with wrong path separators on windows) was shown
in the filename edit box in the native dialog. There was already a
comment to use QUrl::fileName() but it did not exist when the code was
written and later it was forgotten.
Pick-to: 6.6
Fixes: QTBUG-47159
Change-Id: I478dfd0e4943277c0ac78ebf4e138257e7ea8662
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 19c701d370512e81d1b934f899b03ae0c2e6953f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QFileSystemModel uses a QFileInfoGatherer, which is a QThread, to
populate itself with the data from the file system. Some of the system
calls we make for that might block, e.g. on Windows a disconnected
network can easily result in 10 minutes of timeout.
Destroying the QFileSystemModel destroyed the QFileInfoGatherer class
member instance, and the QFileInfoGatherer destructor, being a QThread,
had to wait on itself to avoid QThread asserting when being destroyed
while still running. This means that shutting down a Qt application that
was using a QFileSystemModel, e.g. through the non-native QFileDialog,
would hang practically indefinitely instead of shutting down.
To fix this, explicitly manage the life-time of the QFileInfoGatherer.
Manage it in QFileSystemModel through a std::unique_ptr instead of as a
direct class member so that we can control its destruction. In the
QFileSystemModel destructor, signal the gather to terminate and wait
one it for one second. If that fails, schedule the gatherer for later
deletion through deleteLater(), and release it from the unique_ptr.
The QFileInfoGatherer instance might then be alive with the
QFileSystemModel destroyed. When it receives the DeferredDelete event,
try again to abort the process and wait on the thread, this time for
5 seconds.
If that also fails, then we have to make a choice. We cannot destroy
the QThread object while it's still running, so we have to either
wait indefinitely, terminate the thread, or accept a memory leak by
ignoring the deferred delete event.
If the QCoreApplication is shutting down, then we terminate the thread.
To make this safe, explicitly control when termination is allowed in the
thread - disallow it while the thread is holding a mutex, allow it while
the thread is performing I/O operations.
If the QCoreApplication is not shutting down, then we connect to the
QThread::finished signal, and delete the object in response to that.
This might or might not happen, in which case we have to accept that
there's a memory leak.
Pick-to: 6.6
Fixes: QTBUG-120062
Change-Id: I1e4243265879d61cf406b4eeb0b11b9d59b006ad
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 0786c17bbc556a0f494fc825af47c604a9dc0241)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While it is the itemview's responsibility to keep the accessibility
bridge updated about changes in the view's structure and size, we
have experienced a number of assertions getting triggered when that
wasn't done correctly.
Instead of an assert (or hard crash in release builds), recreate the
table representation in the accessibility bridge when a cell that is
out-of-bounds for the current representation is requested. Emit a
warning message to inform widget authors, and improve the debug
message with information about the column count as well.
Amends 52c2b82082b535123c0eecafe1ec1e4e4190df2a.
Pick-to: 6.6
Change-Id: I19c20a932153268a5176d7378c485277088f10bf
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit c81e31461fd5a5bd2fe959f26b2e6d134b9a71e9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This patch is specific to the return type of updatePtrSimd function as boolean to avoid the bug of GCC 9.2.
Fixes: QTBUG-112920
Pick-to: 6.6 6.5
Change-Id: I21cb1f6dda34448b2290ab72ec280b6b2a3732c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit b404930e122013e76ba8fe165f3432288c051438)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
tst_qstylesheetstyle revealed an unbalanced call to save/restore within
drawPrimitive(PE_IndicatorSpinUp/Down) due to an early exit. Therefore
add a RAII-helper class to make sure QPainter::restore() is always
called after a QPainter::save().
Change-Id: I1b3851836b36d75357ed8c4532f7d2e44136159e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 531aeeefb545189a0eb2918a04e5b961ea52ed7d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The tool tip content size uses an incorrect content margin, when it's
constructed. This content margin has been reset to correct value when
tool tip is positioned using placeTip(). But after that, the content
size not been recalculated.
This patch triggers updatesSize() to calculate content size with
updated content margin values.
Fixes: QTBUG-119752
Pick-to: 6.6 6.5
Change-Id: I454c8528505686f2724b897e4002f78f3049149a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e977a629277796880d1557e4841f731d1ef27c06)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For some reason when building a user project in Release mode, when Qt
was built with -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo;Debug on
MSVC, will result in linking of Debug object libraries into the user
project.
This does not happen in the same configuration on macOS.
My guess is there is a difference in the logic on which configuration
to choose between the platforms, perhaps based on package lookup order
or something else.
This was observed with qtgrpc's
ProtobufWellKnownTypes_type_registration object library (which is only
built on Windows as an object library).
The issue can be fixed if we explicitly generate per-config imported
location information for object libraries, just like we do for regular
libraries.
That way we'll have uniform build type information for all target
types.
Pick-to: 6.6
Fixes: QTBUG-119708
Change-Id: I9020b7743cea65bbd92cadd5f570b7e38e999bd4
Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io>
(cherry picked from commit 3b71f9dc297f73d140f3c185c67476df5e0266a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The condition was checking if excluded_genex variables is not an empty
string.
But when the EXCLUDE_FROM_ALL property was unset, the value of
excluded_genex would be "excluded_genex-NOTFOUND" which would fail the
condition, and would end up always adding the generated code block.
Instead of checking for an empty string, check if it's a truth-y value.
This ensures not to add the code block when the property is unset.
Amends 7540b4bd5634c9104a99f9b219531b1e3dd7942d
Change-Id: I126c745e2e6eccad34171456c052a14cad9d887d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io>
(cherry picked from commit cab76abc613b94c70121a1bc3b7f403dbd12af9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't add \n when using qDebug()
* Trim testAppArgs of extra space at the end.
* Don't print get-current-user command by default, that value
is not that useful to be always printed.
* Update outdated bit of the help printout to reflect what the
test runner does.
Change-Id: I998bafc3aef524b368654f7b35a2a8e084d17542
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c697e19c167d1a7b80068ba8e348e33060d7c1d1)
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
To make the code more uniform.
Change-Id: I84cc9c6169e9eb5a4ba4909b6a7178206eb57c4d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c0b0cdcb61e5e8b5a0770a5c311b9fa38afbdeda)
Provide class template specializations for each supported JNI type (and
also covering the equivalent C++ types), and implement generic call-
helpers using the type-specific JNI function.
Remove the now unused static-assert helpers for unsupported types.
We'll get compile time errors when the functions are used with
unknown types.
Change-Id: I8ae848bb9de60b536df64318c8a65560d8f70acb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 85c36ef1ac0695b276f9fe583926a17d685982a6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add null checks to cover the cases where
QAccessibleTableInterface::cellAt returns
nullptr (which happens e.g. when called with
invalid indices via AT-SPI) or where the
cell object doesn't implement the
QAccessibleTableCellInterface, which
would previously result in crashes.
Fixes: QTBUG-119167
Pick-to: 6.6
Change-Id: Ieb42617b32ca829af09ae1d54f5de9ec029e3ab2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit d91d53c951144255349e5d246353b598179ce967)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The example uses QTreeWidget when it should use a QTreeView with a
dedicated item model, primarily shows how to use item views (and very
little about QSettings), and is generally not useful to show how an
application could or should use QSettings to store settings.
Turn it into a manual test instead; it's useful for that as it supports
ini and plist files, and settings in different scopes.
Fixes: QTBUG-119978
Change-Id: I7ce039f6391c41c679d126d90a251eee60327c39
Reviewed-by: Ed Cooke <ed.cooke@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bddf27cd5a5412c8282fab43111e7319874ca44e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
`QSystemSemaphore` used by `QSharedMemory` class, when failed to acquire
native sem by calling `sem_wait`, will check the reason of failure and
if it is because the semaphore is no longer valid (destroyed by some
other `QSharedMemory` object accessing the same data) will recreate it
and repeat. However, the same is not done when `QSystemSemaphore` is
calling release.
Add this functionality also for release.
Task-number: QTBUG-115777
Change-Id: Ic5d2438c93db318b993becff930b480fd3177532
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 03ef30d97502e692556924315e149122b9f981ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Edited the text based on MS Style Guide, added a few new sections
under Detailed Desccription and a link to the Line Edits Example
topic.
Task-number: QTBUG-119552
Pick-to: 6.6
Change-Id: Iecaa142628019118e271e392a3e332841a7b5af2
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit f6566dd4c6aafa60c134fa40e2c48c6706724363)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On macOS, we don't deliver a press event for the first press on the
track pad (Qt::WA_TouchPadAcceptSingleTouchEvents is not set by default,
so Qt doesn't deliver a single-press on the track pad as a touch event -
that makes some sense or at least maintains compatibility). Because of
that, point 0 is never added to the finger-mapping hash.
When point 0 is then released, we didn't check if we found a valid
iterator for that point ID, and the example crashed.
Fix this by checking that we have a valid iterator before dereferencing,
and by handling Stationary events in the same way as pressed (add the
point to the mapping if it's not already there).
Pick-to: 6.6 6.5
Fixes: QTBUG-110266
Change-Id: I32337b801aaabf9b821a97ddc15ad78747b5e6a2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 9d8473cdf63537dee65e9c235249b4e4901baa1a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This contains test specific variables like pid, sdkversion,
isPackageInstalled and isTestRunnerInterrupted which don't strictly
fall under 'Options'.
Change-Id: I7c4a3422813f464b407d9b2be98c5b4a807c4f1e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4b0f774e3b0b7ccbdec44175c661f1b4a0b60dac)
When the qt-cmake-standalone-test root project is configured in-source
in the source directory of a test A, where test A ends up being added
via add_subdirectory(A), this causes the SUBDIRECTORIES property of A
to contain itself for some reason.
Recursively iterating over the root project's subdirectories thus
causes an endless recursion.
Make sure to remove the currently processed directory from the
retrieved SUBDIRECTORIES property when the function is called
during qt-cmake-standalone-test configuration.
We limit it just for that script, so that we don't accidentally
increase the configure time when building all standalone tests, and
call list(REMOVE_ITEM) too many times.
Upstream issue filed at
https://gitlab.kitware.com/cmake/cmake/-/issues/25489
In a way, amends d08fa86e63448377dde4297bc94680a9d7daaaeb because it
exposed the issue.
Amends 1c82e92202c8c359872c08095670c121602094b8
Pick-to: 6.6 6.5
Task-number: QTBUG-119998
Change-Id: I6f92a07be105cde74ac4946523967791db7bf301
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 04a327f00a84b0c13cb4a4a6715b2ce86ea9f61a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Pass the correct device pixel ratio to QIcon::pixmap() to make sure the
correct pixmap is returned on high-dpi displays.
Fixes: QTBUG-92016
Fixes: QTBUG-94203
Change-Id: I6809ae63b2c99bb60c705f6d78caa2b48f2c7473
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8f539ac85a19b6b96c3757ba59197a34315cfb01)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the commit of data to a model index result in that index getting
filtered out, then the editor will be removed as part of committing the
data, and the index that the editor is associated with becomes invalid.
The subsequent call to closeEditor() will find that the index for the
editor is no longer valid.
This should not warn, and it should also not abort the clean-up process
early. Instead, identify that the editor that we want to closed is
already hidden. In that case, skip the warning and most of the cleanup
process, and proceed directly to the EndEditHint handling further down.
Add a test that simulates the two scenarios where this can happen:
either the committing of data results in the index being filtered out
by the existing filter; or the filter changes while editing, and the
index being edited gets removed. In both cases, we don't want to see a
warning, and the state of the item view should be reset correctly.
Pick-to: 6.6 6.5
Fixes: QTBUG-115765
Change-Id: If247172fdac9a1a9279dae96c078d32553d4ee5d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io>
(cherry picked from commit 04415264489cd96a4a542a2ae7db1c14558397a5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
WM_CHAR doesn't send the native virtual key in wParam,
but it sends the generated UTF-16 code unit, so no assumptions
can be made about the pressed key.
lParam still contains the scancode.
Fixes: QTBUG-117903
Pick-to: 6.6 6.5
Change-Id: Iedc5936118936009db8f6b0c1ce6147db2739422
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit d53e42d974c90797d28511470d0b188dcab134fe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A copy without pixel ratio was made, but color table not set.
Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-119902
Change-Id: I328f3faa70d7a1263061cbe51921999393e30801
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 15051e205facddd8bc3f290c65ad854ec1b25091)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There were a couple of problems with synthesizing boldness on
Windows: For the DirectWrite font database, this was not implemented
at all, so this change adds support for it.
For the default GDI font database, the font engine is correctly created
for a font with synthetic bold, but the function that retrieves the
contours from the font does not apply the transformation. So when
generating the distance fields for Qt Quick, we would get the
unemboldened contours. The fix for this is simply to fall back to
using DirectWrite for fonts that require any synthetization. This will
later become the default anyway.
Pick-to: 6.6 6.5
Fixes: QTBUG-119995
Change-Id: I5b4e3b19d0d71c6599746172da0bee41e8fb3940
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 05de036a8855adbdd882942d2fb61c231b02bf5a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Because we may be able to use the other side's storage and apply the
operation in-place. We reuse the storage of the one that can be
detached: even if we have to grow the buffer, QBitArrays are usually
small so there's a good chance it's just to the extra space QArrayData
usually overallocates or a simple, non-moving realloc().
Disassembly with GCC 13 and Clang 17 show the vectorisers did kick in
for all four functions (inverted_inplace included). I think a
hand-rolled version could squeeze a few more cycles, especially in the
tail section, but I don't consider its maintenance cost to be worth it.
Change-Id: I85b3fc2dd45c4693be13fffd1795bfb1b296caa6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 948fa2a427dbcdc2784abdcf87efc914417a0028)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Now that the assignment-bitwise operators can reuse storage, we can make
these operators also be capable of reusing storage.
Change-Id: I85b3fc2dd45c4693be13fffd1795b893de65a5b8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2b7908ac3ad437c209485dcf00d1e53c98d78cb3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of creating a temporary copy of one of the two sides (which will
share QByteArray), create one with the correct target size such that it
is already detached.
Drive-by move them to hidden friends.
Change-Id: I85b3fc2dd45c4693be13fffd1795b74eeaf3be71
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 54c373faa4f9582fd09a802727821fd544a7b2c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Avoid some calls to detach() and use std::array instead raw c arrays.
Change-Id: I95cbfb130b6fe2509e5d87184c6612718b90dd63
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 51e682d5af955a2c1380f7f1c7014b091a577241)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't leak, but clang-tidy is printing this warning. Possibly because
it sees a new with no matched delete in the same context, ignoring the
fact that the pointer was gifted to the called function.
Fixes: QTBUG-119972
Pick-to: 6.6 6.5
Change-Id: I6e2677aad2ab45759db2fffd17a06c57c3a463ba
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a337b8360f149313f5bf37dc5867413d846a3a97)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With 6.5 we try to use the native message dialog if we can, but we
didn't account for the style sheet. This restores pre-6.5 behavior for
QMessageBox.
Other dialogs will continue to be native, even if a style sheet is in
use. While this is inconsistent, the other dialogs are substantially
more functional, so switching to the Qt version because of a style sheet
being active would be a significant change of behavior.
Pick-to: 6.6 6.5
Fixes: QTBUG-120054
Change-Id: I07eae609bc360140e096c5eb7ad004ffa4422123
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 1b71e2d894c2be7052518cdcb96020c9950e2dc7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also port from qMakePair() to just braced initialization and CTAD.
As a drive-by, de-duplicate some code around a lower_bound(), and port
from `typedef` to `using`.
Task-number: QTBUG-115841
Change-Id: I3e907ad3bb10b5ca169422ad90d3a65b1b33f926
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 0d09b4f6b9cae84b78d59cecab6d6feb993b112a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
...and mark QtCore as free of QPair.
Task-number: QTBUG-115841
Change-Id: Ic6009d3cabbf72b3b3fe966e47d48a80a328b499
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 31f437e658c25523c284a404ac7be153e6e347c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also port from qMakePair() to just braced initialization and CTAD.
As a drive-by, use auto instead of various const QMetaType::*Function*
so statements fit on one line again, and port from `typedef` to `using`.
Task-number: QTBUG-115841
Change-Id: I6bd9747fb9eb34da08053927507f2008d9bbfb86
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 1a1735a7cf02d83cef58be41f68cec4a2764e890)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A splash screen is usually shown during initialization, before the main
window is shown. At that point, an application might not spin an event
loop. The documentation therefore recommends to run processEvents()
periodically, in order to ensure that the splash screen is actually
shown. Async window managers (e.g. XCB) might require more than one call
to processEvents() for the splash screen to be shown. It can't be
guaranteed, that a specific number of calls to processEvents() make the
splash screen visible. Calls to processEvents() are not considered
good practice in application code.
QSplashScreen::finish() uses a copy of QTest::qWaitForWindowExposed(),
to automatically close the splash screen, when the main window is
shown.
=> Re-write the static inline waitForWindowExposed to wait for the
widget's windowHandle()->isVisible(). That ensures visibility to the
window system.
The previous version waited for isExposed() to become true. That
ensured exposure to the application, but not visibility.
=> Intercept QEvent::Show and process events, until the splash screen
becomes visible.
=> Remove references to processEvents() as a requirement to show the
splash screen from the documentation. It remains a requirement for
processing mouse and keyboard events.
=> Re-activate tst_QSplashScreen and test visibility in the constructor
test function.
Drive by:
- implement switch in event override
- factor out paint event handling in a function
- update documentation about calling processEvents() to enable mouse
handling.
Fixes: QTBUG-119225
Pick-to: 6.6 6.5
Change-Id: I07910705246b4e3234e01cc4896f5bc4b2c56772
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7835f9e60157987b4aafc9b860f925d775151b7c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When using QKeySequence::DeleteEndOfWord or
QKeySequence::DeleteStartOfWord in a QLineEdit with an existing
selection, the selection was ignored which resulted in unexpected
behavior (see bugreport). This is fixed by only setting the selection
if none exists yet.
To prevent an entry in the history when the input is empty, the
selection is checked before calling del().
Fixes: QTBUG-120006
Pick-to: 6.6 6.5
Change-Id: I2e803c5eff1f0e289e93a77c58ecd78299241da7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1d953b2fbc3deccad6eb2a5ebe39b24908dbcf3e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the .ui file and write the equivalent implementation.
Replace the outdated star icons with new star icons. 5 empty stars
are now provided and filled in depending on the rating. The new stars
are SVG, however, we do not use an SvgRenderer as we cannot use the
QtSvg API from QtBase directly. It is safe to assume the SVG image
loading plugin is present, the worst case scenario would be empty icons,
but it would still build. We instead use QIcon.
For the rating, draw the star icons in a combobox, replacing the old spinbox.
Update the layout by moving the table view to the bottom, and
arranging the input fields at the top.
The scrollbar policies have been set to Qt::ScrollBarAsNeeded for the table view.
Fixes: QTBUG-118476
Pick-to: 6.6 6.5
Change-Id: I27c13534ab06e17531d155469a1cc6e7e05197af
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 76b2852b7cff183ba31d6b09b00cbabdffb9ba71)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old image was from windows xp so a new one from windows 10 should
not hurt.
Pick-to: 6.6 6.5
Change-Id: Ia78f556e8603517d9e7339f0af2330bc2d4182d3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f5d192818dea30f1fbe53adc5211ff44563c16aa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The example has a lot of code and documentation, but in essence shows
how to use float-based QPainter APIs and how to set a render hint. That
is two lines of code, which we can show as snippets.
Update the screenshot of the example with a higher-resolution version.
Pick-to: 6.6
Fixes: QTBUG-119983
Change-Id: Iafcb813dff6ab8c269176f7994c95947ebf5e559
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 33254fb41f29b510d3d74dbaab60f0a67ef56d46)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The qt_feature calls are for "jpeg" and "png".
Pick-to: 6.6 6.5
Fixes: QTBUG-120036
Change-Id: I43e69d9fd1e08383b5ddfbfe194eaa2f2ae52f50
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 8646010223c7a103fc53ff0705dece8904ee268c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QDockWidget::isFloating() returns true for single, floating dock
widgets. It returns false, if the dock widget is part of a floating
tab (i.e. it is a QDockWidgetGroupWindow child).
=> Clarify documentation.
Pick-to: 6.6 6.5
Change-Id: I3c5a4a86b89dcb001e7561de7dcc604bae0d9cee
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 92b5992a29e6a5463200157ab9934fae9a3ec8cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Emscripten documents that preRun should be an array
of functions, but also accepts setting it to a single
function.
qtloader.js was accidentally using this feature, which
works as long as qtloader is the single user, but breaks
if other code expects an array. A typical error in this
case is:
"Module.preRun.push is not a function"
Fix this by creating and maintaining preRun as an array.
Pick-to: 6.6
Change-Id: Ie1382695f3f25839cb971ab4adc81984fc8c53ca
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit bf39bd8e06e9d66bfb9f01e83c743420e812b630)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also port from qMakePair() to just braced initialization and CTAD.
As a drive-by, use emplacement instead of appending pairs explicitly,
rewrite typedef into `using`, and remove the qpair.h include from the
.cpp file (cannot affect other TUs and <utility> is considered
included in qcompilerdetection.h).
Task-number: QTBUG-115841
Change-Id: Ia985520dfce6b77b1c0fe7669fc92d2df97e1b06
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 91d341e560e9a54d201279d53701ff071256ad6c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
CreateCursor() expects a ddb and according the docs a ddb must be
word-aligned but we created a byte-aligned ddb which results in a
wrongly rendered cursor later on.
Pick-to: 6.6
Task-number: QTBUG-82434
Change-Id: Ie847865a0d868043571faf4b7f4fdf6a92fce448
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit af0edfbc7c33261d11b559cb4842045457adc4a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
During drag and drop operation, we used to get window under mouse and
process events for that window after the patch set
9ff5b886fade489b7cc268626f518145650f6b2c. But this sometimes cause hang
issue in GetMessage() when the respective window doesn't capture mouse
event and we are required to process mouse events.
This patch fixes this issue by considering whether the window under
mouse has capture.
Fixes: QTBUG-115260
Pick-to: 6.6 6.5 6.2
Change-Id: I748936e4ce23e60abce51d34c1326cfb105b06cb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 6ef62f7dc4d6cb690fc297954b3cfcd1de415910)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Before this, when trying to build iOS tests, CMake could not find the
`LaunchScreen.storyboard` in the source directory, and therefore the
configuration was failing.
In addition, QtPublicFinalizerHelpers module was missing in QtBuild,
resulting in another configuration failure when configuring iOS tests.
Change-Id: I592121892a2716973a92ec044414fa729fd3b15f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 0c3892bb261f0eebebdff4cf42169f49729956a9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The SurfaceView class is not the best option for when we
have multiple windows, as the created Surface can only
either be below the window or on top of it, it is not a
part of the view hierarchy.
Replace the SurfaceView with TextureView when there are
more than one window. This way the surface will be a part
of the view hierarchy, and will respect z-ordering.
When there is only one window, keep using the SurfaceView
approach to limit the effect on existing apps, as well
as enable some of the benefits SurfaceView has for e.g.
game and multimedia apps, such as HDR ability.
Move touch handling from QtSurface to QtWindow, so
touches are handled also when using TextureView instead
of QtSurface aka SurfaceView.
Task-number: QTBUG-118142
Change-Id: I37dcaf0fb656cfc1ff2eca0a3bfe7259f607411c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cca81a663661ef1fce5f4a9f4c5a5f5fd1381325)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a helper method to tell whether the app is a standalone Qt for
Android app, where also the Context is created by Qt, or whether Qt
content is embedded as a View into a Context created by the user, i.e.
a "native" Android app.
Change-Id: I618ba1c8cb40c9b132fc12a7ee6d54c071efa983
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit c1a79b442ce0a50e176f72f3c738ea1263e8dd98)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the touch dispatcher methods, all events were routed for the
top level window at the position, which lead to all the events
being delivered for the parent window.
Since the JNI methods already have a parameter for window ID, take
that into use and determine the window to deliver the events to
by ID.
Change-Id: I07ad7851c32a3e633ee748036d6818b6d0fa5588
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b2e44a2d1d1fa109bb2971177a4fda1210637410)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the case when our foreign window is created to act as a parent for
embedding Qt content into a native Android app, we need a more "hands
off"
approach. If the foreign window represents an Android view which the
user
has created outside of Qt, we should not try to reparent it since it
already has a parent in the view hierarchy. Neither should we try to
remove it from the hierarchy, or set its visibility.
Change-Id: Iea496578a40f45ebdd73947a1bb0e46a7131108c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 5ba91c9decb4d13d7f7176bc7ce29b40007a19c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously, winId() returned a simple integer ID, incremented by one
for each window, instead of a handle to the underlying window.
Note, if constructing a QWindow with fromWinId(), the passed jobject
will not be the same one returned by winId(), as the passed jobject,
assumed to be a View, will be wrapped inside a QtWindow to ensure
child windows can be added to it if needed.
Change-Id: I9d5d977eeb08d4cc3594f7339660fe94c3a55864
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 4376467169979ce6886d6f58944a2f50dcf77e51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a foreign window becomes or loses focus window status, we should
let QGuiApplication know about it.
Task-number: QTBUG-119287
Change-Id: I550d72fa13e1c38c9b89880857db9f9cbd7f6568
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 75a5605151d203fb4c2269001dddfd3db121ea2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... with properly-named members.
This is in preparation of adding a new member in order to fix
QTBUG-101141 (namespaced base classes).
Pick-to: 6.6 6.5
Task-number: QTBUG-101141
Change-Id: I2309e425ac94ad275b54a898fd33a2891e5d1453
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit cbb4aea2132fc59cd1086ba42cc221d12b5ce9e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This code never worked:
For the comparison with max() - 32 to trigger, on 32-bit platforms (or
Qt 5) signed interger overflow would have had to happen in the
addition of the two sizes. The compiler can therefore remove the
overflow check as dead code.
On Qt 6 and 64-bit platforms, the signed integer addition would be
very unlikely to overflow, but the following truncation to uint32
would yield the correct result only in a narrow 32-value window just
below UINT_MAX, if even that.
Fix by using the proper tool, qAddOverflow.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I7599f2e75ff7f488077b0c60b81022591005661c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit ee5da1f2eaf8932aeca02ffea6e4c618585e29e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also port from qMakePair to just braced initialization and CTAD.
Task-number: QTBUG-115841
Change-Id: Ifd7220ae88b101351e91d1488ce18715eb4880e5
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 95c7f88132646489bc17b8ea32facd76a19e19fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also port qMakePair() to just braced initialization and CTAD.
Task-number: QTBUG-115841
Change-Id: I9eafb20ebc63bd33eb52661f4f14ad2db9fc0f00
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 4be8755151e3433357de6479d5c70582f83485e6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It was forgotten when we originally fixed the hardcoded 1_1 version.
Pick-to: 6.6 6.5
Change-Id: Iff3148d79466dac2830fe9a63d954aead96fb0ac
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 46923f2648ba99b3d070ea077f04047172ba4923)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a non-raster widget is inserted into the widget hierarchy, widgets
switches into using RHI for flushing its backingstore, matching the
window's surface type with the non-raster widget that was inserted.
This happens for example when inserting an QOpenGLWidget, which switches
the surface type to QWindow::OpenGLSurface, or a QQuickWidget, which
switches the surface type to that used for Qt Quick.
In these cases, there might still be child widgets with their own
window handle, and as long as these child windows have the same
surface type as the window owning the backing store these child
windows are flushed through the same rhiFlush() code path as the
top level window.
For child windows with a different surface type, QWidgetRepaintManager
chooses the pain QPlatformBackingStore::flush(). Unfortunately, the
implementation of QRhiBackingStore::flush() bails out when flushing
child windows, so when we were using QRhiBackingStore on macOS for
non-raster surfaces we would end up not flushing these child windows.
The way to fix this is to use QCALayerBackingStore for the case
where we know the client of the backing store (QWidgetWindow) is
going to call rhiFlush() explicitly for non-raster surfaces. That
will lead us into QCALayerBackingStore::flush() for the child windows
with a non-matching surface type, typically QWindow::RasterSurface,
and we'll flush those child windows by setting the layer's contents
property.
Fixes: QTBUG-119309
Pick-to: 6.6 6.5
Change-Id: Ia7052b9e651d575d8e34942a25e17ab5a1f5ce05
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit f16f31ba3093f35134ceff6a784ad99c1867bfee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This patch replaces the QBasicFutureWatcher that was used for
continuations with context objects with a smaller QObject-based wrapper
that works directly from the actual continuation.
The idea stays the same: In order to run continuations in the thread of
a context object, we offload the continuation invocation to the
signal-slot mechanism.
Previously, we've hooked into QFuture with QFutureCallOutInterface to
emit a signal and trigger continuation invocation. However, it is much
easier and robust to emit that signal from the continuation itself.
This sidesteps the locking issues that QFutureCallOutInterface handling
presents. QFutureCallOutInterface basically requires any consumer to
only access the QFuture after all events have been posted and the
internal mutex unlocked, i.e. on the next cycle of the event loop.
Continuations do not impose this restriction; runContinuation()
explicitly unlocks the internal mutex before calling the continuation.
This fixes a deadlock when using QFuture::then(context, ...) where
the paren future is resolved from the same thread that the context
object lives in.
Fixes: QTBUG-119406
Fixes: QTBUG-119103
Fixes: QTBUG-117918
Fixes: QTBUG-119579
Fixes: QTBUG-119810
Pick-to: 6.6
Change-Id: I112b16024cde6b6ee0e4d8127392864b813df5bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 59e21a536f7f81625216dc7a621e7be59919da33)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The clear() will not preserve capacity, since the QList has been
copied into proxy_intervals already, so is shared. But then creating a
new QList is just as efficient, or more so.
Change-Id: I7ffd91bae8ded5ac28d58bcc545c479f6edc7c90
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b6fdef44e46b97cf4dc5fee750f50054c65bf5ef)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Putting the variable on the LHS of a relational operation makes the
expression easier to read. In this case, we find that the whole
expression is nonsensical as an overflow protection, because if
name.size() + value.size() overflows, the result will exactly _not_
be > max() - 32, because UB will have happened.
To be fixed in a follow-up commit.
As a drive-by, add parentheses around the RHS.
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I35ce598884c37c51b74756b3bd2734b9aad63c09
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 658607a34ead214fbacbc2cca44915655c318ea9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Leave a log message to know when the test runner timed out or the test
finished.
Pick-to: 6.6 6.5
Change-Id: If56ecaa5b0e3af22b3e26480a584e2d52ac97553
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit f8724b9b7eb22b9abace1a67f652c0b6fc6c683d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... from CMake so that Coin doesn't end up killing the whole VM if aRows
test gets stuck and instead allow androidtestrunner to cleanup and fetch
the logs so we know what happened, and even potentially ending up re-run
the test and succeeding if it was flaky.
Also, since CMake sets the timeout during configuration time, coin needs
to set COIN_COMMAND_OUTPUT_TIMEOUT under the build target where tests
are configured, so this moves the setting of that env var from the test
target to the build target.
Pick-to: 6.6 6.5
Change-Id: I9883ea1e98c93f79a088067518d09ca8acd5fdfd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3ee2ecd6bfdf3320e66628afa5d017783df2ee91)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the test runner was interrupted, stop waiting for the test
to start or to finish, go fetch the available test results
and logcat and uninstall the test app.
Also, set CMake TIMEOUT_SIGNAL_NAME to SIGINT and
TIMEOUT_SIGNAL_GRACE_PERIOD to 10 seconds to allow enough
time to fetch the logs and uninstall the test app.
Task-number: QTBUG-106479
Pick-to: 6.6 6.5
Change-Id: I4820cfe58f05d15179b4af819caa92e475881634
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 4a3936c33cb2ab9fee2e93cbe99d31daf1cd0cc8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since version 6.7, QDoc requires accurate definition of template
arguments in signatures passed to the \fn command.
Qualify the 'if_compatible_callback' template with the class it's
declared in.
Change-Id: Ifd4618071c950e812c4df9a2e4e212317a6c9118
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
(cherry picked from commit 3861b92ed9669e61b29e88ddc17154f620c92ee2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The Qt::WindowState enum is documented to specify the current state of
top-level windows, and does not make sense for child windows. It's up to
the client code to ensure any sizing of child windows/widgets, e.g. via
layouts.
Many of our QPA backends bail out on QPlatformWindow::setWindowState()
for a child window. Ideally we would do this at a higher level, in
QWindow, but that's a bigger task, and the semantics of what happens
when a window is moved from being top level to child or back are not
fully clear.
As a first step, we ensure that the default window state when showing
the window via show() is Qt::WindowNoState.
Unfortunately, the QPlatformIntegration::defaultWindowState() API only
takes into account the window flags, which sadly do not have a way to
reflect whether the window is a child window or not (Qt::SubWindow is
not a child window, see QTBUG-115729).
We don't want to pass a QWindow to this API, as it would mean QWidget
would need to create a window when requesting the default window state.
Instead we hard-code the opt-out for child windows/widgets.
[ChangeLog][Gui/Widgets] Child windows and widgets are now always shown
in their normal state by show().
Change-Id: Ie8caf2df2d854194b9985c9427a9eac1312aba65
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 3472aa6e28469ffd23cfa24e3933541f295e9e1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Added a return type where it was missing as Clang would otherwise fail
to parse the command.
Qualified certain non-type template parameter that were based on a using
declaration inside the QSpan class.
An `\fn` command is parsed as a fake out-of-line definition. In that
context, the unqualified name will not be able to be solved by Clang,
resulting in an inability to match the element.
Change-Id: I929ab5e8df4f7a6ef5d913266b584cd0393074e3
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 8d008b2cf48c961fbd7462813ca3ac4875c55995)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Properly delete the handle created by CreateDIBSection() with
DeleteObject() in case of error.
Pick-to: 6.6 6.5
Fixes: QTBUG-18057
Change-Id: Ibf40f6afb255bc5a7d7bf39939f5eb3dfcd19f84
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b37b8eb7ea0a809c6e96189e8f9e834d6763e170)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When QFileDialog::DontConfirmOverwrite is in the false state (default state),
it requires QFileDialog::AcceptMode to be set to QFileDialog::AcceptSave.
This information was not stated in the documents and this fix adds this
information to the docs.
Fixes: QTBUG-49720
Pick-to: 6.6 6.5
Change-Id: I1017252980810e712f2710751c8852dd12eaeef7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 76a1c7690fd9f8e747a2bbdd5d910bebd6ef162c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends 58907dfa812de8ce6c63295589f644bdf4257d15,
which tried to make sure we select a color variant of a
character when combining it with the VS-16 symbol, the
emoji selector (and vice versa with VS-15).
This is something which is not well-handled in Qt, and
the original work-around assumed that any font supporting the
conversion of Unicode characters to color glyphs would include
the VS-16 character in its map. This was true for the symptomatic
font on macOS, so it solved the problem there.
However, if you manually select a color font and then request a color
glyph, the font system should just pass it on and accept this. No
need for any magic adaptation. Same if you select a non-color font
and use VS-15.
To avoid regression, we detect this case and disable the behavior
introduced in 58907dfa812de8ce6c63295589f644bdf4257d15 when the existing
font selection is already meeting the criteria.
This is admittedly very hacky, and the plan is to do a larger refactor
where sequences of emojis are separated out ahead of time so that the
font selection can pick from a curated emoji font list for these.
But to fix the immediate regression, this will basically just return
to previous behavior for some cases which are currently prone to break,
so despite the added layer of conditions, it does improve the situation
temporarily.
Pick-to: 6.6 6.5
Task-number: QTBUG-111801
Fixes: QTBUG-118642
Change-Id: I1a3ca711426a042b22003b887883646132335a9f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 35266dc3080dc13641616ed20e257d7b4c57778c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
1b96c75661f678632485513d1323166bc6d74e5c reduced event noise by
dropping accessibility events if Windows UI automation has not been
activated; however, this did not take into account that some widgets
(e.g. QMessageBox) rely on accessibility event processing to emit
certain system sounds.
Change notifyAccessibilityUpdate() so that system sound related events
are processed regardless of accessibility activation.
Pick-to: 6.6 6.5
Change-Id: I22f1516e8fbb3727b065ecc2c30b272b2d6fd1c0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit ce5aaf1e434b6e2e482347b40524edeccecb1665)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 32edae5e268b968aff82f0713612eff2feffb4e1, after which we keep a
copy of the restored state if the state couldn't be applied yet. Since
making a copy of the entire state results in multiple copies of layout
item pointers, we might end up with dangling pointers if the layout
structure is modified while we keep the copy. This can happen if methods
such as tabifyDockWidgets or splitDockWidget get called; e.g. tabifying
dock widgets will destroy the layout items that were added for them.
Unfortunately, the layout items do not have a pointer back to the layout
they live in, and the items in the stored state might not yet live in a
layout anyway. So we cannot remove the items from their layout in a
QDockWidgetItem destructor implementation.
Instead, we have to forget the stored state. Add a helper function that
writes the stored state back to the actual state, and deletes the stored
state afterwards. Call this function when the layout might get modified
programmatically.
Add a test case that reproduces the crash without the fix, and passes
with the patch.
Fixes: QTBUG-120025
Pick-to: 6.6 6.5
Change-Id: I8f7e886f3c4ac38e25f9b8bc194eea0833e5974f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 9ea9e2476d72ae67178d55df99419f202b36131f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Creating an icon engine is a potentially expensive operation involving
many file lookups. In the case where neither QIconLoaderEngine nor the
engine from the platform theme is valid, QIconLoader tries to unsuccesfully
find the icon in all theme directories, the theme engine is constructed
potentially doing some expensive operation and finally a new
QIconLoaderEngine is constructed which does all the file lookups again.
Instead keep the existing QIconLoaderEngine around if it was already
constructed.
Change-Id: Iace9a3f904730064f44939b2269316484ac6da2e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 620373e1ad47affbf7e63b73b8f634fbb273da99)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the __FILE__ preprocessor macro that contains the full path to
the current source file. This is needed for reproducible builds.
The macro was only used for two debug messages. It's enough to mention
the file name - if at all.
Fixes: QTBUG-96281
Pick-to: 6.6 6.5
Change-Id: I7940ec090b570ec0105196a881e4c73c279bd248
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7cc55822fb94dcbba4e686664ebfca233513b20e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QMultiHash doesn't inherit from QHash since Qt 6.0 so we can't use
QMutableHashIterator anymore with QMultiHash.
Pick-to: 6.6 6.5
Change-Id: I9e755899e0a1e331f452a618b6d8a127715c54d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 1c592199afa77247df84d66fc92a8455dd6ce988)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QFlags header came in via qpair.h and broke when we tried to
remove qglobal.h from qpair.h.
Pick-to: 6.6 6.5 6.2
Change-Id: I335b84cc1d73303f8f2497427a21fba255ee11f9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b2288de7cdb32e622da09163d4c373439760b221)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The _q_data() function was removed before 6.6, but the docs
remained. Presumably qdoc doesn't care about non-existing \internal
\fn's.
Found while hunting for QPair uses to eliminate.
Amends eac30fcb827e9bb1372e46290c060c833bd8ea67.
Pick-to: 6.6
Change-Id: I73fdfe69d4158977a6a80eb2a5e790ada09fe85a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 04d0c4e81cef0bb649ae839b6a9b290745408d95)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also port qMakePair() to just braced initialization and CTAD.
Task-number: QTBUG-115841
Change-Id: I46ee214ab47513375a6e28e3b439c7b060581235
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 87361727ffafbee460970cdb8e72056653fd2443)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The original is in qcontainerfwd.h these days, so just include that.
Change-Id: I1d0adaf528f158c48caf47d65b20d09eff06f57d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 714cbf82558399e0e32d0e2e226783c9ece53a9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also port from qMakePair to just braced initialization using CTAD.
Task-number: QTBUG-115841
Change-Id: Ib0ad55d7110521e34004dc9050022f9c0046722e
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 0d1575828015f99a495af84fb7de3746c7f61717)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QPair _is_ std::pair. It's confusing that debuggers consistently show
the real name, std::pair, while the API and docs continue to maintain
the illusion that there is such a thing as QPair.
Use std::pair everywhere.
Pick-to: 6.6 6.5
Task-number: QTBUG-115841
Change-Id: I009e2fc415a79a74b583a13cf11e4ff9483a7f6b
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit ec67d0c942a7756afbb6e21c76e835efd3557427)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends commit a0bcad39033bddd9b9d14a524b829513105913d3.
Delayed signals emitted by the previous commit may have
invalid parameters if the source model was updated several
times before entering the event loop. This commit fixes that
by evaluating the section range immediately before emitting
the signal. This commit also ensures that the signal is
emitted only once after entering the event loop.
Fixes: QTBUG-119155
Pick-to: 6.6 6.5
Change-Id: I9e84703cca26fde8464a6b9a414bb7462cbb9abd
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 734354c0bae543795222a47cca2a013352d49745)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The NSWindow becomes the "key window" when it's the window that currently
receives keyboard events. This happens when switching activation between
windows of the same app, or when the app is made active, restoring the
key window status.
Since the keyWindow property only applies to top level windows we were
skipping child windows when processing the event callback, but we then
proceeded to pass the top level window() to handleFocusWindowChanged,
instead of the QWindow of the key window's first responder (the view
that receives key input sent to the top level key window).
To fix this, we let each platform window send its own focus change
event, if it's the first responder, instead of relying on the top
level window to send it on behalf of possible child windows. This
decoupling ensures that we also send focus changes when we're not
part of a view hierarchy Qt controls.
Task-number: QTBUG-119287
Fixes: QTBUG-119054
Pick-to: 6.6 6.5
Change-Id: Iac06fe800291e243432335169c52db7685e173df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit cf9b143cb3076a5d3ad8beec8ecf5175be925ae9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends a7f227f56cfe562280e89d3c73040f7e8384129e.
It doesn't support that anywhere except i386, and even there it has a
different syntax than what we're using here. This code assumed ARM was
only ued with GCC-like compilers.
qglobal.c.obj : error LNK2019: unresolved external symbol asm referenced in function tst_qYieldCpu
tests\auto\corelib\global\qglobal\tst_qglobal.exe : fatal error LNK1120: 1 unresolved externals
Note: if we're getting here, it means the _YIELD_PROCESSOR() generic
macro was not used, which means there is no ARM YIELD being emitted for
MSVC on ARM for C code (for C++, the macro appears to be working). This
is likely to be a performance issue, which will need to be fixed by
someone who has an interest in improving performance on those
conditions.
Fixes: QTBUG-119881
Change-Id: Ica7a43f6147b49c187ccfffd179f04e1ab643302
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 91478930711c99c876f0df9475c056445eea96b6)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
As the comment says, this allows us to skip the check for non-detached
strings and for null ones. We know that the one we've just created isn't
either, so long as len != 0. All QConcatenable::appendTo() calls do
nothing if len == 0, including not calling memcpy() at all.
Moreover, because it no longer references the QByteArray::_empty
variable, the GCC -Warray-bounds warning should be gone too.
Task-number: QTBUG-116763
Pick-to: 6.6 6.5
Change-Id: Ica7a43f6147b49c187ccfffd179eba2897ce2aff
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 06c724881c4227acf308e54ebd3db8235bb6b740)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the current item in an item view has changed,
only send an accessible focus event when the item view
actually has focus.
Sending a focus event when the item doesn't actually
have focus is incorrect and breaks focus tracking in
assistive technology, like the Orca screen reader.
With this change in place, the focus event for the
newly selected item/child still gets sent when
changing the item using the keyboard or
by clicking on it using the mouse (since the item
view has focus in those cases), but not
when it gets changed programmatically
while the keyboard focus is somewhere else.
Fixes: QTBUG-118800
Pick-to: 6.6 6.5
Change-Id: I5540cdfce6d0ed076d4bb871e5862fddcdf05941
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a149b3fd533525d0b260893019b41b300a554f8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
No functional change, yet. Just dissociating the data name from type
name, so we can add tests for FP types in a follow-up step.
Pick-to: 6.6 6.5
Change-Id: I98fdebb49cca614ab27db146c4bacafd190e7d9b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit f25804b3955d0b621ac8ff26470f950dbd1e3337)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
std::string is a nice value_type for when you want to track short
strings (because of its SSO). Check that it works, incl. in case
the implementation falls back to QSet in the absence of std::pmr
support in the stdlib.
Pick-to: 6.6 6.5
Change-Id: I2406258355295c2b1300c4ae8001cead59bb27d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fe8c8e0fceec09b6ac6f358d522aeae9a5550bd0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This allows us to use it in QTypedArrayData<T>::AlignmentDummy, which is
used in __builtin_assume_aligned() as a hint to the compiler. This
increases the value we were passing as the compiler hint from 4 to 8 on
32-bit platforms and from 8 to 16 on 64-bit platforms. We actually do
align to a bit higher than even that, but that's not an ABI guarantee
we're making.
However, it looks like GCC on 32-bit platforms is buggy, so we work
around it. Commit r240248 ("Make max_align_t respect _Float128.",
63012d9a57edc950c5f30242d1e19318b5708060 in Git) increased
std::max_align_t to 16 bytes on all platforms, saying "Such an increase
is of course an ABI change" and "I think glibc malloc alignment should
also increase to 16-byte 32-bit x86", but such a change to glibc was
never implemented. Moreover, there are systems that don't use glibc,
such as when using GCC on other OSes.
This is not a change in Qt behavior anywhere. i386 does not (usually) do
alignment checks, so most code wouldn't notice this at all.
Change-Id: I79e700614d034281bf55fffd178fa0aee2344307
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4d57b30194f31865132312c67abf796cb58a0f8f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This makes the two most-often used QTypedArrayData::allocate() -- the
ones for char (for QByteArray) and char16_t (for QString) -- go to
specialized versions, which have much simpler code. After all,
multiplications by 1 are quite trivial.
I didn't check whether an LTO compiler was const-propagating the sizes
in inlined calls from qstring.cpp and qbytearray.cpp. But not everyone
uses LTO, so this benefits everyone, in a very hot path, for minimal
cost.
Change-Id: Ifa1111900d6945ea8e05fffd177dd1ce659b3fd5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 4d7864f0517679ebe70a2a96afdae5dc4f5a2d62)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Should be qint128, not quint128.
[ChangeLog][QtCore][QtEndian] Fixed return type of qbswap(qint128)
(was: quint128).
No tests for this exist, so no wonder it fell through. Added them.
Amends befda1accab417ce5f55cb11816e6ded51af55e3.
Pick-to: 6.6
Change-Id: Ibf87724b1d500081caca46af1c598975964e04c0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 7a829eaf51853e0852db28b8b8223e1a62a3db0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
With the new provisioning scripts the QtSql plugin for Mimer SQL can now
be built in universal binary mode on macOS
Fixes: QTBUG-111219
Pick-to: 6.6
Change-Id: Iefc45b510bd17822aa7782a2c42860941eb19fc8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit d557718d68184f6b56b17a3b5b54d1d5511a5294)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Unfortunately we can not rely on the file dialog panel for this,
via the directoryURL property, as that property has not yet been
updated during a panel:directoryDidChange: callback, resulting in
the directory reported to the user being the previous directory.
Since we already have to store the current directory for the case
where we haven't yet created the file dialog panel we re-use this
variable as the single place to store the current directory.
It's not clear whether we still need to normalize the strings
we get from the NSSavePanel, but the code has been left in,
even if the old callback code didn't normalize the path that
we then emitted as directoryEntered().
Fixes: QTBUG-119371
Pick-to: 6.6 6.5 6.2
Change-Id: I379a47053302e73d5e06a2b941f40365c17390d5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit a81395f2c604c84cd0e6f18165c766419f26b7ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For some directories, such as the 'Recents' entry in the native file
dialog, the panel:directoryDidChange: callback will report a NSNull
for the NSString path, which results in an exception when trying to
compute the length of this null entry.
Pick-to: 6.6 6.5 6.2
Change-Id: Ic9cddb54ea713b8fbdcaf0f4fb506ac96e90c9fe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3bf7e0693ec1df01d2d27e28ab38f553beaa9c82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is a "regression" (voluntary, known) from commit
c27d2a57a441f9a1ce760e71635bd4c96882249d which changed
QAbstractProxyModel::itemData() to call the source model's itemData(),
so our data() reimplementation is no longer used.
Of course this only matters if itemData() is actually called, which
isn't the case in Qt itself. People will likely skip this if they don't
care - but if itemData() is used in the project, then this shows how
to reimplement it correctly.
Pick-to: 6.6
Change-Id: I3acea16c05d30d7526bac32fd6cce42b5ad4b617
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit abc739600447af06befaca8ae616dd607b99b184)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If qtpaths cannt be found windeployqt should complain about that fact.
Previously it complained about "Unsupported platform".
Pick-to: 6.6 6.5
Change-Id: I4db954633c31ceac69c4d3c0e55cbe942c3272fd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit bf2f4678b0c1a17ad8d18809335cfb69d2c6527a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-11 14:07:28 +00:00
3664 changed files with 115877 additions and 51704 deletions
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
Unicode Data Files include all data files under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and http://www.unicode.org/utility/trac/browser/.
Unicode Data Files do not include PDF online code charts under the directory http://www.unicode.org/Public/.
Software includes any source code published in the Unicode Standard or under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and http://www.unicode.org/utility/trac/browser/.
NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that either
(a) this copyright and permission notice appear with all copies of the Data Files or Software, or
(b) this copyright and permission notice appear in associated Documentation.
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder.
set(PostgreSQL_INCLUDE_PATH_DESCRIPTION"top-level directory containing the PostgreSQL include directories. E.g /usr/local/include/PostgreSQL/8.4 or C:/Program Files/PostgreSQL/8.4/include")
set(PostgreSQL_INCLUDE_DIR_MESSAGE"Set the PostgreSQL_INCLUDE_DIR cmake cache entry to the ${PostgreSQL_INCLUDE_PATH_DESCRIPTION}")
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.