CMake MR #10626 doesn't consider the MSVC compiler as valid assembler
anymore, thus unconditionally requiring ASM breaks with CMake > 4.0.1 on
MSVC.
Enable ASM only on non-Android Unix.
Remove the ASM language where it's not needed.
Pick-to: 6.5 6.8 6.9
Change-Id: I5df71edfce0f4920e39262f722e4bf95a735f31b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The location of the input field was wrong leading to empty space
inserted in the user interface.
Fixes: QTBUG-136233
Pick-to: 6.9 6.8
Change-Id: Ic8c9faf5c4dbb8cec43a43c25c1cce8d7809f140
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
In order to properly show a popup the Wayland QPA needs a parent window.
Currently it has to guess the parent, which might not work in all
circumstances. To address that explicitly set the widget as transient
parent of the popup.
Fixes: QTBUG-130474
Pick-to: 6.9 6.8
Change-Id: I99ea14a1a9ec25ee8a929cf61a6744957a850374
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This reverts commit be93c06758260b1e0738ab17a2ecc4ee8f90e87e.
The assumption was that using a QVarLengthArray was equivalent to
the existing C-style VLA, as we initialized the QVarLengthArray
with defaultStackSize as the Prealloc template argument.
However we failed to take into account that we adjust the stack
size via Stack::computeSize(), by adding space for our memory
guard, so we would effectively always end up with the user-main
stack on the heap.
This caused problems for Qt Quick's V4 engine, because it checks
for C++ stack overflow by comparing the current stack pointer to
the base and limit given by pthread_get_stackaddr_np and RLIMIT_STACK,
resulting in "RangeError: Maximum call stack size exceeded." errors
and failure to load the QML.
We can't tweak what pthread_get_stackaddr_np reports for an already
started thread, so in practice we can not put the user-main stack
on the heap, so we revert back to the use of C-style variable length
arrays, which should be fine for this specific use-case.
Change-Id: I05a4bd32697abee71aa9e70f9f5a011cc338f915
Pick-to: 6.9 6.8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This is necessary to have correct focus handling on webassembly/ubuntu
without this change tabbing from text input to f.ex a button would
not work.
Change-Id: I78eaa6202d8bdb87b1195d5c38a3f73570a49c90
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
qfuturesynchronizer and qresultstore both rely on QFuture. Guard
their autotests accordingly.
Task-number: QTBUG-136101
Change-Id: I84680fd3383ceaa486bff53ad04b4a39e9e20d51
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
Clean up QWindowsVistaStyle::standardIcon a little bit by using
separate icons for SP_TitleBarMaxButton and SP_TitleBarNormalButton
Pick-to: 6.9
Change-Id: I876d41f0373268a0a8888f00392a8e32d0f413a1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The correct define to check for MariaDB C Connector is
MARIADB_PACKAGE_VERSION_ID, not MARIADB_BASE_VERSION (which is a string
describing the server version the c connector relates to).
Pick-to: 6.9 6.8
Task-number: QTBUG-136550
Change-Id: I844900d9b6622fd3a72db63298e5c34de8a2f3dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The last fix for QTBUG-136050 did not set inputMode "none"
which causes the keyboard to be visible on cell phones and
tablets.
Fixes: QTBUG-136050
Change-Id: If8c97fb009c10ff5338ce7e6516ca2c5a992d0d0
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
Reduce the number of activation calls by calling the
observer callbacks on active state change only, instead
of on each setActive() call.
The accessibility backends typically make setActive()
calls on each accessibility event, which can result
in a large number (100k+) of activation calls if there
are many (hundreds) of installed activation observers.
This change keeps the following behavior compatibilities:
- Each observer is called at least once on setActive(),
even if the active state has not changed since it was
installed.
- Going from active to inactive is supported, though
Qt currently does not appear to do this.
As a drive-by refactor, make it possible to activate
accessibility by calling QAccessible::setActive(), by
making it call QPlatformAccessible::setActive().
Change-Id: Iee17160f153b825be032b441923e3529c2f00242
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Make sure to not compile the stylesheet sources when
FEATURE_style_stylesheet is disabled, also don't include the relevant
headers in this case.
Pick-to: 6.9
Fixes: QTBUG-136341
Change-Id: I4fc2de2fcba004b93140809ef79374401209f14a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Use delegating ctor for QWindows11Style and QWindowsVistaStyle to avoid
code duplication.
Pick-to: 6.9
Change-Id: Ia5048d989a1d6556b64a3ffc95da5d05624cd634
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Move the usage of the corresponding QStyleOption classes into a
QT_CONFIG() guard to fix compilation when these options are disabled.
Pick-to: 6.9
Change-Id: I68e791f20bbc8389974878e765b08a97eb347b92
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Remove some unused includes in source files.
Pick-to: 6.9
Change-Id: I5c43fd10fa1a179664ad8cbf4988f9bdb96d8af8
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Replace some QCOMPARE(value > x) with QCOMPARE_GE(value, x) to get
better output on failure.
Pick-to: 6.9
Change-Id: I3f7fc80cf25776adab40cd61c08c58a49f6af0c5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Even though the member is named 'menuBar', it's a plain QWidget. Also
the setter are not guarded so the functionality should not be guarded
too.
Pick-to: 6.9
Change-Id: I5fa19ab955d9794aa3d344ba0cfc8a0a3d22b61e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
In some extreme cases we can return a finite float, and then turn it
infinite when multiplying it to calculate the index positions.
Avoid the whole thing by clamping to a brightness of +-32768 times the
white point standard, which is well within current HDR standards.
Credit to OSS-Fuzz which detected the assert.
Pick-to: 6.9 6.8
Change-Id: If007732a8d59ea27514f17674d318a099a057281
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Missing 'e'.
QHttp2Connection is private API so the API can be changed.
No known external users.
Pick-to: 6.9 6.8
Change-Id: I4f3daab9deff3250ff66066dc3e088edfbbfc5ef
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
The NVIDIA driver may become unstable (including kernel lockups) if
Vulkan API calls continue after a device loss.
Ensure we stop frame processing immediately when vkWaitForFences()
returns VK_ERROR_DEVICE_LOST. Also, don't try to vkWaitForFences() when
calling releaseSwapChainResources() after a device loss.
Change-Id: I2c35a7a7ad07830778b6dc4d40f1ce62535e988a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When QHeaderView was optimzed+refactored a unittest was requested.
However, since behavior didn't change a semantic test of certain
qheaderview aspects was added instead (to compare to old behavior).
It was suggested as a manual test, but it was decided to merge
it into the unit test.
With the risk of testing something twice, these semantic tests have
now been modified to be actual unit tests. Certain aspects of
behavior in QHeaderView may actually be wrong
(also highlighted by these new unit tests)
and changing QHeaderView for the better
would be difficult having these tests.
Furthermore, the changes were motivated by the test having
integer overflow.
Fixes: QTBUG-135201
Change-Id: Iabfaf9b57de5cb11d98ea27f352b17ab0f6cc613
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Prior to 84a5f50c7766c99f62b22bb4388137e0aa8dd13d
QWidgetWindow::handleMouseEvent() did its own synthesis of
QContextMenuEvents. Then we moved it to
QWindowPrivate::maybeSynthesizeContextMenuEvent() and didn't preserve
the code to accept the QMouseEvent if the QContextMenuEvent was
accepted. It turns out that the WASM platform depends on checking
whether the QPA mouse press event was accepted: if not, it closes
all popups, including any context menu that was just opened by a
right mouse press.
Fixes: QTBUG-136241
Change-Id: Ibe01763a6af19d65629dc77eb61ffc1af581efbe
Pick-to: 6.8 6.9
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Currently, configure fails late with
Qt requires at least version 15 of Xcode, you're building against
version . Please upgrade.
Pick-to: 6.9
Change-Id: Ic4f44d37429ac9def785a50909a25b0bcb4b72a5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QDoc generates warnings for images that do not have an alternate-text
associated with it. Alt-text is required for to increase accessibilty
options.
This patch adds alt-text to images in the Qt Network
Fixes: QTBUG-135122
Pick-to: 6.9 6.8
Change-Id: I690f1d381ef5a9052e189dd1f3906243df557da0
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Recent changes to date-time formatting arranged for time-zone names to
be localized appropriately. Teach the datetime parser to recognize the
long names that now implies, as well as IANA IDs, and ensure these
last are also used as a fallback when no localized long name is
available. Discrepancies between the platform time-zone backend and
our CLDR-derived name L10n (where needed, due to the backend lacking
it) make the naive approach to this (find any zone that matches,
expect them all to have the same offset history) fail, so take care in
this case to select as canonical an IANA ID for the named zone as we
can find. Add a round-trip test and adapt an existing test to
round-trip when it can.
[ChangeLog][QtCore][QDateTime] The tttt format specifier now uses the
full long name of the zone, falling back to its IANA ID only if this
cannot be determined. Both forms are now recognized when reading a
datetime from a string.
[ChangeLog][QtCore][QLocale] When serializing a datetime, the tttt
specifier now uses the localized full long name of the zone, falling
back to its IANA ID only if this cannot be determined. Both forms are
now recognized when reading a datetime from a string.
Pick-to: 6.9 6.8
Fixes: QTBUG-130278
Change-Id: Ia28529790c0f600930d55c92a606adbcdfa852b9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Place it after the last mutually intelligible entry (same language and
script), or at the end if none, rather than at the start. The fact
that we add it at all was prompted by macOS leaving it out, which can
happen if the user has specified custom preferred languages that don't
match what they've specified for locale.
Adapted various test-cases to match the new behavior.
[ChangeLog][QtCore][QLocale] When the system locale itself is missing
from what the system reports as suitable languages into which to
translate the UI, it is now inserted later in the list, where
previously it was added at the front.
Task-number: QTBUG-104930
Change-Id: I378d266d6f8894cb17df9d09e841a266da73ecee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
An illustration missed out an entry.
Technically truncations go after equivalents of their source.
Change-Id: Ia514c3e0991cbc552c6314a26c6d0569b38e9f16
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The 'syslocaleapp' test helper application was built only when
jalalicalendar is enabled. The tst_qlocale on the other hand
depends on 'syslocaleapp' if process-support is enabled.
Thus if jalalicalendar was disabled and process-support
enabled, the CMake configure fails because tst_qlocale won't meet
its 'syslocaleapp' dependency.
Fix by building a more limited version of the syslocaleapp when
jalalicalendar isn't supported, and adjust the testcase accordingly.
Pick-to: 6.9 6.8
Task-number: QTBUG-136101
Change-Id: Ic809b0124d47754105ca09b69e2b3c12856ba63a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This change introduces a new function, readRawInnerData(), that returns
the raw inner XML content of the current element, including nested tags,
comments, CDATA, and processing instructions.
[ChangeLog][QtCore][QXmlStreamReader] Added readRawInnerData() for
retrieving the raw inner XML content of an element.
Fixes: QTBUG-85141
Change-Id: I96dd0790d726cf8a196125384cbf8f8fa2587880
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This is a port from QLatin1StringView to QUtf8StringView.
Some functions of QL1SV have no counterpart to QU8SV:
* first() and last()
* count()
* indexOf()
* toUtf8()
that were not included.
Tests for user defined literals have also been removed. Some tests were
extended for utf8 string literals u8"".
Pick-to: 6.9 6.8 6.5
Task-number: QTBUG-132097
Change-Id: I0ceee00a7457360b430d13c3199f642f8e4c0036
Reviewed-by: Mate Barany <mate.barany@qt.io>
Use the PKCS12_ALWAYS_CNG_KSP flag instead of PKCS12_PREFER_CNG_KSP
when importing a PKCS12/PFX file to make sure the private keys are
stored in the Key Storage Provider, so that the
CERT_NCRYPT_KEY_HANDLE_PROP_ID property is set on the associated
certificate and the subsequent query for it succeeds.
Background: If the PFX file contains a Crypto Service Provider (CSP)
bag attribute and PFXImportCertStore is called with the
PKCS12_PREFER_CNG_KSP flag, then the private keys are stored in the
CSP that is referenced in the bag attribute and the key is only
accessible through the deprecated API.
Change-Id: If2ad2fa6a7b20f02e40fc49c98e3a72b68d832f2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
contenteditable on the window caused characters to be inserted.
Instead create a div as a child element, and set contenteditable
on that.
Fixes: QTBUG-136050
Change-Id: I4ccf3589ea19876f68bb9c7077c3a13ae5f989e6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
NSVisualEffectView is the only supported way to add effects to
views, such as showing a blurred representation of the content
under the window, or within the window.
Now that we render the content of our QNSView into a sublayer
of the view's root layer, we can add NSVisualEffectViews as
child views without obscuring the view's own content, by making
sure that the NSVisualEffectView layer has a lower Z order in
the layer tree of our view's root layer. This works because
adding a layer-backed or -hosted view as a subview will also
add its layer as a sublayer of the view's layer, making the
effect layer and our content layer sibling layers.
Change-Id: Iab822e8462f54025559b3e3f26c7df668c885d75
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The test data for SingleColumn and MultiColumn disambiguation types
was incorrectly removed in 7803e6c000cc0fddba392bcbaefdc3a93ff4b26c.
Inserting rows of a MultiColumn wrapper around a pointer doesn't work,
so QEXPECT_FAIL that test for now.
As a drive-by, remove an obsolete QEXPECT_FAIL; we never add a table of
pointers in multiple value categories, as they all reference the same
data.
Change-Id: Ief4750094f8262f01ff81aa41d113971abd37307
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Conceptually, a table can deal with rows that are a pointer type,
and nullptr. We test for validity before accessing the row element, and
can return gracefully from e.g. data() or setData(). This is also
acceptable for lists, where a newly constructed row will hold a nullptr
element as the item. Client code that wants to initialize new rows
explicitly can provide their own protocol, or connect to rowsInserted()
and rowsAboutToBeRemoved().
However, we might end up violating the requirement that in a table, all
rows have to have the same number of columns: if the row-type is a
pointer to a struct or gadget, and we don't instantiate the element,
then we end up with an index that is de-facto invalid even though
it is in range. setData() cannot do anything but return false, and
data() can only return an invalid QVariant.
And if the row type is dynamically sized, and the new row is inserted
at index 0, then we end up reporting that the model has 0 columns, as we
use row 0 as the reference for the column count.
To fix this, implement new/deleteRow consistently for pointers (and
smart pointers): if the row type is a (smart) pointer holding
a default-constructible object, then we can instantiate a new object.
The deleteRow implementation takes care of deleting raw pointers (as
otherwise the `delete row` expression is invalid); for smart pointers,
the smart pointer takes care of memory management.
All other row types can be instantiated by default constructing. This
covers MultiColumn/SingleColumn wrappers as well, which can hold a
nullptr while still reporting the correct column count.
Remove the special handling from canInsertRows() - if newRow() is
available in the protocol, then we can insert rows.
But one ambiguity remains: if we operate on a copy of a container that
has pointers for rows, then adding new rows might allocate (in the
model's copy), resulting in a mixed situation. The client code can not
delete those new rows (they don't exist in the original container),
while the model must not delete rows it didn't create (those do exist
in the original container and might still be used).
Perhaps that cannot be solved, other than by documenting: either move
your range in the model (then ownership is clear), or pass a reference
or pointer the model (then ownership is also clear); or use smart
pointers for the row type.
Change-Id: I18a2e929473d118dcdb9d1f2ed67a7890f681974
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
It is a precondition violation to call QByteArrayView::at() with
size() as argument. The code used that, though, as an implicit
end-of-string check, assuming == ' ' and == '=' would both fail for
null bytes. Besides, QByteArrays (but most certainly QByteArrayViews)
need not be null-terminated, so this could read even past size().
To fix, use higher-level API (startsWith()), consuming parsed tokens
along the way.
Add a test that would crash in debug mode before the fix.
Amends the start of the public history.
[ChangeLog][QtCore] Fixed a bug in the handling of data: URLs that
could lead to a crash if Qt was built with assertions enabled. This
affects QNetworkManager and links in QTextDocument.
Pick-to: 6.9 6.8 6.5 6.5.9 6.2 5.15
Change-Id: I4331c88051dfbb0a18fe7da4f50858c707785d09
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
By making the content layer a sublayer of the view's root layer (our
container layer) we open up the possibility of manually managing the
z-order between the content and other sublayers of the view's layer,
for example sublayers added as a result of adding NSVisualEffectView
child views to our view.
[ChangeLog][macOS] Metal and Raster windows no longer render
their content directly to the root CALayer of the window's
NSView, but to a sublayer of the root layer. This is an implementation
detail that should not be relied on, but may affect client code
that pokes into the NSView of the QWindow in unsupported ways.
To opt out of the new mode, set QT_MAC_NO_CONTAINER_LAYER=1.
Change-Id: I7053d7530b6966ed7dd4d1a4d1b7e94754767c57
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
`interface` is used by win32 headers. avoiding it fixes unity builds on
windows.
Pick-to: 6.8 6.9
Change-Id: I1d3f89a201f44f6e4eed5977d1b80f675078d430
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This is how it used to be.
More changes are needed to fix cut/copy/paste.
Change-Id: Ib5073b82a568a391581f0b4d8369eaab57fd8f19
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>