It had been noticed that sometimes the Android emulator in our CI took
several minutes to fully boot. It turns out that this behavior can be
reproduced locally by removing the image files under $HOME/.android
especially the "userdata-qemu.img.qcow2" file.
Then the emulator goes through several reboots until fully booted with a
full set of packages installed. We discovered that the property that
signifies it is finished is dev.bootcomplete=1. So we now check for this
flag and remove the other heuristics we had.
We also disable the debug output to avoid hundreds lines of
logs. Instead we selectively print the values that the emulator returns,
every second until full boot is detected.
We increase the Coin timeout for the shell script, from 5min to 10min,
since it has been measured that it takes about 2.5min on a good day, and
the script itself retries several times to restart the emulator in case
of failure.
Finally we adjust the coding style a bit to be more consistent.
Pick-to: 6.3 6.2
Fixes: QTQAINFRA-4681
Change-Id: I77062dceb91477e957696c89bfacb4ebabc34c1f
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Do not build and run tst_QIcoImageFormat when QT_FEATURE_ico is
disabled. This test was failing on webOS since there is no
imageformatplugin for .ico when the feature is disabled.
Fixes: QTBUG-99633
Pick-to: 6.3
Change-Id: I410b351f773639c0c29e09d4d0b5bc6da13df1d9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Add '-bigobj' for MSVC and '-Wa,-mbig-obj' for MINGW to the
PlatformCommonInternal compiler options.
Pick-to: 6.3
Change-Id: I706b83d189a116a3ab6f93d59593e237e66b0e2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Send the full QShaderVersion down the line, not just the version number.
Change-Id: I895d552fc47e0eb4ca92f32f117cd5a1d4d9015a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This allows Qt Quick Dialogs to accurately check whether it should
select the first file in a directory when a file dialog is opened.
While we're here, fix an incorrect version on the last theme hint
that was added.
Task-number: QTBUG-98562
Change-Id: I08cc8a0fbed28a42d1212016c6ee7fc5459578bf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Windows mount points are marked as symbolic links by CMake. So switch
back to the REALPATH based check for Windows hosts.
Amends dcc2704d17
Pick-to: 6.2 6.3
Task-number: QTBUG-99416
Change-Id: Ic996db1fac5c0b5edc18728535240e272dd435e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
QString::utf16() needlessly detaches fromRawData() to ensure a
terminating NUL. Use data() where we don't require said NUL, taking
care not to call the mutable data() overload, which would detach,
too.
Task-number: QTBUG-98763
Change-Id: I7075a8f18ab1f82ebbcf8cfab1643e8ab7f38d51
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Iterators model pointer, so const must be shallow.
Pick-to: 6.3 6.2
Change-Id: I90494c98762f1494efcca4965ee739540333f5d7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since f19ce3898e we link OpenSSL to
QTlsBackendOpenSSLPlugin instead of QtNetwork itself. In dependent Qt
repositories this leads to the following situation:
QTlsBackendOpenSSLPlugin's dependencies call
find_dependency(WrapOpenSSLHeaders), and OpenSSL_FOUND is set to ON in
that scope. Later, we call find_package(WrapOpenSSL) in a different
scope. find_package(WrapOpenSSLHeaders) bails out early, because the
target WrapOpenSSLHeaders::WrapOpenSSLHeaders exists.
find_package(OpenSSL) is not called again. The check for OpenSSL_FOUND
fails, because the variable is not visible in the scope of
FindWrapOpenSSL.cmake, and we don't create the WrapOpenSSL::WrapOpenSSL
target.
Fix this by checking for the existence of the target OpenSSL::SSL
instead of the OpenSSL_FOUND variable.
Pick-to: 6.2 6.3
Fixes: QTBUG-99623
Change-Id: Idd0e8a60fabd0c7772413d557442c0012b0b436c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We use nextEventMatchingMask to look for future momentum scroll events
when the non-momentum scroll ends, to continue the scroll uninterrupted
from the perspective of client code. But we're not guaranteed to find
a future momentum scroll event, as observed on macOS 12.1, so if we
then see a momentum NSEventPhaseBegan we need to treat it as a scroll
begin from Qt's perspective.
Fixes: QTBUG-97841
Pick-to: 6.3 6.2 5.15
Change-Id: I412abe0891660eda32a42a08d7dc7dee9eaa73aa
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QtBase/2526df506bda99f9497e83a4e6820557a722660e has
resolved what the comment said.
As a drive-by, remove the unused QSystemLibrary include,
which is forgotten in 2526df506b.
Amends commit 2526df506b
Pick-to: 6.3
Change-Id: Iab5c7d00e22d306be63d7588ea44bf73d377793d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
And added some later Windows Server versions.
Change-Id: I81415f1044d11458a4b4d19b01ce90e357f9d111
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As these are QList and QHash. All existing usages are based on this
anyway, no value in being able to indicate "not available" - an empty
container fulfills the same role.
Change-Id: I8059025fa7a4acb6fc674cd98b16fcafa19ed85d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The 'persistentPoint' reference is never used as a QMutableEventPoint,
so don't cast to it (which is UB).
Pick-to: 6.3 6.2
Task-number: QTBUG-99615
Change-Id: I7fdfb2427a09d691242bf1fa28e202ba326ea678
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
We want an ordered list item's number to be rendered with default char
format, like the others in the same list, even if the list item's text
begins with a span that has a different char format. So insert the
list item's block with a default char format first, then change the
char format of the cursor to suit the text that's about to be inserted.
In HTML interpretation, it means the <li> does not have a style, but
contains a styled span.
Fixes: QTBUG-92445
Task-number: QTBUG-3583
Task-number: QTBUG-99148
Pick-to: 5.15 6.2 6.3
Change-Id: I7eb58a8d1171c16503cac01c8cce109d9f12e1af
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
It happens that the android emulator supposedly "finishes" booting and
getprop shows bootanim=stopped and boot_completed=1. But sometimes not
all packages have been installed (`pm list packages` shows only 16
packages installed).
After around half a minute the boot animation starts spinning
(bootanim=running) again despite boot_completed=1 all the time. After
some minutes the boot animation stops again and the list of packages
contains 80 packages, among which is also the "development" package.
Only then is the device ready for `adb install` of custom packages.
This should be the last time we see the message:
Error: Could not access the Package Manager. Is the system running?
Just for completeness, we also properly disown the emulator process and
its file descriptors, since the parent shell dies but the process stays.
Pick-to: 6.3 6.2
Fixes: QTQAINFRA-4681
Change-Id: I2b9d4bdc3dac0f10d09d4f09c83b4028ebc31f48
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
For Direct 3D, Metal, and Vulkan this is natively supported. (and
makes no difference in particular for D3D and Metal because they do
not have the legacy combined image sampler concept anyways)
With OpenGL it will work too, but this relies on SPIR-Cross magic and
is still using a combined sampler (e.g. a sampler2D) in the GLSL
shader. The GL backend walks back and forth in the mapping tables from
the shader baker in order to make this work, which is presumably
slightly more expensive than combined image samplers.
Do note that combined image samplers (i.e. sampler2D in the shader and
QRhiShaderResourceBinding::sampledTexture() in code) continue to be
the primary, recommended way for any user of the rhi for the time
being.
Change-Id: I194721bc657b1ffbcc1bb79e6eadebe569a25087
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It might print useful messages, even though they might come mixed with
other test messages.
However we can't leave stdout/stderr as is, because Coin agent hangs at
the end of the shell script, waiting for them to close. So we just
redirect them to a file.
Pick-to: 6.3 6.2
Change-Id: I797af78786b7df31131b3c3261e1c1fc00e5d460
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
For historical reasons, QTextDocument[Fragment]::toPlainText replaces
nbsp character (U+00A0) with a normal space, and U+2029, and U+2028
characters with a line feed character.
This behavior differs from native (plain) text editors. It also creates
an asymetry, because the characters in question can be pasted into the
document, but not copied out of it.
Use the newly introduced QTextDocumentFragment::toRawText()
to avoid this conversion.
[ChangeLog][QtGui][Drag&Drop] Special characters like are now
preserved in the text/plain part of the clipboard when copied from
a QTextEdit or QLineEdit.
Fixes: QTBUG-99572
Change-Id: If01a5dd98127a59be15a425dc029c7303bce18f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Like QTextDocument::toRawText(), QTextDocumentFragment::toRawText()
does allow access to the raw string without normalizing nbsp,
line separator, paragraph separator unicode characters.
[ChangeLog][QtGui][Text] Added QTextDocumentFragment::toRawText() function.
Task-number: QTBUG-99572
Change-Id: Ia74150a3870ea0e6326fdcda4d9d0410019124ae
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
TLS backend has become plugins since Qt 6.2.
QtNetwork does not need these links anymore.
Also removes unnecessary condition since openssl tls backend is enabled
only if OpenSSL is enabled.
Pick-to: 6.2 6.3
Change-Id: I4cc0422531d567ad015f9648fbb2bcd51f634cb9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Don't bother with exposing the IDXGIOutput6. Instead, report the values,
just the ones that matter for tonemapping or transfer functions in a
cross-platform way that's also prepared for Metal's different way of doing
things.
Change-Id: I28c7b6144f8267a9d3d44eff1e40697fb543385f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This makes it obvious that the code in init() is only called from the
constructor and its m_icu handling doesn't need mutex protection (to
be added in a subsequent commit).
Since the input to the ctor is the result of a virtual function,
factor said virtual into a static function and call that instead.
Pick-to: 6.3 6.2 5.15
Change-Id: I7c49f2e865201a2ce2b2d86b19dae29c6d337e0e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The m_icu member is a mutable QSharedDataPointer, which means that
only the non-const API subset is accessible, and so any access to it
will always detach, in 5.15 even a check like if (m_icu), which the
code luckily doesn't use (Qt 6 added a operator bool() const).
We don't need detaching behavior here, though, since, once set, m_icu
is never changed. So just use a QExplicitlySharedDataPointer instead,
and never call detach() (which would do the wrong thing). Just in case
someone does add a detach() later, instantiate
QExplicitlySharedDataPointer over QIcuTimeZonePrivate directly. This
requires making displayName() overloads from QTimeZonePrivate visible
in QIcuTimeZonePrivate. Add an assertion that QIcuTimeZonePrivate is
final, with instructions on what to do if it fails. Finally, hold a
pointer-to-const to avoid race conditions in the pointee.
The code still contains a data race, due to the lazy initialization of
m_icu, but now we have at least a fighting change to fix it.
Pick-to: 6.3 6.2 5.15
Change-Id: I32c343822dac43f96d9fbc4c759fa44138861eae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Qt 6 uses Emcripten’s default of not exiting the runtime
when main() exits. Make qtloader not transition to
the “Exited” state when main() exits with code 0, since
this would hide the app canvas.
(The app state tracking code in qtloader is by now
outdated, and should be revisited.)
Pick-to: 6.3
Change-Id: Ib47898f1dd93d87b2675f20cd39f96ac3cb681a7
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The compositor was posting update events and flushing/redrawing
using a zero-timer. Change this to use the request_animation_frame
API from Emscripten, which makes sure we flush window
content at the next native paint event.
This has the additional benefit that hidden canvases
(e.g on hidden tabs) won’t get frame events, and then
stop painting.
We support both well-behaved QWindows, where the window
calls requestUpate() and then paints/flushes on the
following deliverUpdateRequest(), and also less well
behaved windows which paints at any point during event
processing.
Pick-to: 6.3
Change-Id: I747d6f7ace86ceddaa18ab86b6a0ee833f98991b
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This is how the old implementation did it: the Type member was a member
of Holder, but the guard was set to Destroyed in the HolderBase
destructor, which ran after. I find the way I implemented in
commit81a31beeb25eaf14d5c5f42fe26aa49d6ef29bf8 to be more natural, but
it caused regressions at runtime for code that attempted to reenter the
global static on destruction.
Not unit-tested because I don't know if we want to keep this forever.
Pick-to: 6.3
Fixes: QTBUG-99192
Change-Id: Ib42b3adc93bf4d43bd55fffd16c09d7f835d121e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
For RAII objects, it's natural to have move semantics enabled these
days. So if a RAII type does _not_ offer it (and, as in this case,
cannot be made to offer it), be explicit and disable moves, too.
Change-Id: I5636a0c7ff2fc51982ce9a406f975b07d51af01a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The header only uses std::destroy(), which is in <memory>, not
<algorithm>.
Doesn't change anything, because <algorithm> is still transitively
included via qcontainertools_impl.h.
Pick-to: 6.3 6.2
Change-Id: Ib6a94ea56d5819f916c80a2e307c99b328f3d61d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
All compilers support C++11 unrestricted unions in Qt 6.
Gets rid of another instance of to-be-deprecated-in-C++-23
std::aligned_storage.
Pick-to: 6.3
Task-number: QTBUG-99122
Change-Id: I5e6dc025893c79d0c516fc2d3801ec071615b9cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also add explicit, where missing, and use NSDMI to simplify default
ctor implementations.
For the ctors, this is just about code hygiene. The classes are
exported, so de-inlining the ctors prevents them from being duplicated
in other libraries.
Ditto dtors, except in the case of dtors, being virtual functions, we
also avoid duplicating vtables, which has its own set of problems (see
bug-report).
Task-number: QTBUG-45582
Change-Id: I11536844b751f2e81269a5637153f84c8874ab10
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QUnifiedTimer is declared as a friend using an unqualified name that
hasn't been forward-declared before. In this situation, the friend
declaration declares the name. This is subtle, and while it's ok here,
in other situations it can actually lead to two different names being
declared.
Fix by adding the missing forward declaration.
Pick-to: 6.3 6.2 5.15
Change-Id: Ie9f5165578f1d88c6bee1afa23ef43847755a0eb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
When creating proxied models, make the source model a QObject child of
the proxy model, so the source isn't leaked when the proxy is deleted.
This drove asan nuts.
Pick-to: 6.3 6.2 5.15
Change-Id: I0f7fc9ab8e99d030c941cfb336ee4e2323b362ae
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>