which is flaky.
Task-number: QTBUG-115598
Pick-to: 6.6 6.5
Change-Id: Ibb0a0c6b1e225144e2ce796691c40bb7510bfd56
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Implement TCP server to stream trace data. Use the QTRACE_LOCATION
environment variable to configure the server address and port.
The rest of the configuration is done in the client TraceRequest.
The user can configure the compression level, buffer size and
whether the server is buffering when client doesn't have connection.
The server responds with basic response and then begins sending packets
until the client disconnects or the app closes.
Each packet contains stream name, stream data and whether to overwrite
the stream, which is used with metadata streams.
Task-number: QTBUG-105976
Change-Id: I41c708a4c7988666d59f0c6093dd41e8ccd88441
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Remove old files from the output location before saving new ones.
Pick-to: 6.6 6.5
Change-Id: I75181126c6c920e13951e9a46a6be1c666d457fe
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
I.e. concatenating a null byte array and an empty-but-not-null byte
array should result in an empty-but-not-null byte array.
This matches the behavior of QString::append(QString) too.
Fixes: QTBUG-114238
Pick-to: 6.6
Change-Id: Id36d10ee09c08041b7dabda102df48ca6d413d8b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It relied on an implementation detail of operator+=(), that the latter
wouldn't just use assignement (e.g. if `this` is empty/null).
It also had undefined behavior, when the char array used with
fromRawData() went out of, the nested, scope, the code was pointing to a
dangling stack pointer.
Thanks to Thiago for the explanation in code review.
This ties in with further changes in this series, where append() is
changed to preserve null-ness; there is no way to preserve null-ness in
append() while keeping this unittest passing.
Change-Id: I43b9f60db9ce2d471f359f32bcc48e7b4cfceeab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Well, except that the ownership of the slot object here is actually
shared between the PermissionReceiver and the lambda passed to
QPermission::Private::requestPermission(), which eventually may hand
ownership over to QMetaCallEvent, so we can't really use
SlotObjUniquePtr.
While we can, of course, manually copy and call ref(), even if the
slot-object is stored in a SlotObjUniquePtr, unfortunately, the lambda
is subsequently stored in a std::function, which infamously cannot
hold move-only objects, so we actually need something copyable.
So grasp the nettle and implement a SlotObjSharedPtr.
I was originally planning to just make this a typedef for
QIntrusiveSharedPointer, but that's not in dev, yet, let alone 6.5, to
which we're picking this, and there was always this nagging impedance
mismatch between the QIntrusiveSharedPointer behavior, inherited from
it's Q(Explicitly)SharedPointer roots, on the one hand, to always
ref() in the constructor from raw pointer, and, OTOH, QSlotObjectBase
starting its life with a ref-count of one (1) (not zero (0), like
QSharedData).
I eventually found the (elegant, if I may say so myself) solution to
just not provide a constructor from raw pointer, only one from
SlotObjUniquePtr, which, granted, has the same issue, but which is, by
now, probably, hopefully, more fully grasped by QtCore regulars, and so
we can piggy-back on that for SlotObjSharedPtr's constructor
semantics.
Add a comment nevertheless.
Inside the lambda, we could theoretically move the slotObj into
QMetaCallEvent::create(), after adding such conversion to
SlotObjSharedPtr, but that would require making the lambda mutable,
and seeing as it's stored in a std::function and copied around, I was
not ready to make that change just yet.
As a drive-by, make PermissionReceiver's constructor explicit.
Pick-to: 6.6 6.5
Fixes: QTBUG-115330
Change-Id: I4e0cec13d19a19eeec31e4101ce289d07c92ce46
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
QAtomicInt::ref() returns bool, not int, so do the same in our ref().
As a drive-by, drop the superfluous inline keyword.
Pick-to: 6.6 6.5
Change-Id: I60712df3640b67dfd857355d364e0fc5a3a40650
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Commit aa82d295c8 changed from using
minimum-linux.S to qlibraryinfo.cpp, so we no longer need this. Saves
350 ms of CMake time.
Change-Id: Ifbf974a4d10745b099b1fffd177754aa5a4096ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Everyone must have this by now. This test was 1193 ms of CMake time.
Since this was a PUBLIC feature, I've left it around with a constant
condition.
Change-Id: Ifbf974a4d10745b099b1fffd177754538bbff245
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Everyone has it, without exception. QRandomGenerator uses the Mersenne
twister without checking, so you can't have Qt without this. This test
was here only to produce an error at CMake time instead of at build
time, but that test costs 650 ms for everyone running CMake without
cached results.
Change-Id: Ifbf974a4d10745b099b1fffd177753b6d4fc89d4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If module depends on some module Private part only the sync_headers
dependencies from this public part of this Private module is skipped.
Check if the module is Private and use the public module to read the
_qt_internal_sync_headers_target property.
Amends 0006a564c8
Fixes: QTBUG-115712
Pick-to: 6.6
Change-Id: I4678e2a6c9ec8f80862a97d48f0a3b4214ae2307
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
To avoid having to take high-DPI scaling into account for geometry
calculations/comparisons.
Pick-to: 6.6
Change-Id: I941b74781264455b70520df8d1e6e91592e00310
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QByteArray::assign() re-uses existing unshared capacity(), if any, and
is therefore potentially more efficient than '= QByteArray(~)' (and
never slower).
Task-number: QTBUG-106201
Pick-to: 6.6
Change-Id: I5e5114064c8aaa23892e95c235335632d7c5cd0a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Remove 'qfreelist.cpp' from the NO_UNITY_BUILD_SOURCES section
and fix the underlying problem of the clashing symbols with
'qabstracteventdispatcher.cpp', by wrapping the unnamed enum in
a namespace.
Amends: a07426d23a.
Task-number: QTBUG-109394
Pick-to: 6.6 6.5
Change-Id: I585ab06a33d46a11a48220f504c53a5f4fa91d7e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Obtaining entry function name with exports = {} is about to get removed
(in emscripten 3.1.44). Use the only alternative, which is to specify
the module = {} object that gets the 'exports' variable. Oddly enough,
it gets assigned the only export name, even though the name is plural.
Change-Id: Idcda29bfcaed2d0a923a8d39af078359abc73f7d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Missing parts of local storage backend implemented:
- fallback mechanism
- removal of all child keys for groups
- variant decoding instead of string decoding
- report AccessError when organization is empty in settings' ctor
Some WASM-specific adjustments to tst_qsettings have also been
introduced.
Task-number: QTBUG-115509
Fixes: QTBUG-115037
Change-Id: I02cde965b11d98a64fc1ecb261d74838c508afd6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Implementation for QAccessibleEditableTextInterface is pending for texts
in qml accessibility, adding accessibile role check for text to be
updated when accessibility feature is on in wasm
Change-Id: Ic24ebf6942e50a5952126e312afa633ed4fbe9ce
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Adds a warning symbol.
Adds a note to the brief string.
Pick-to: 6.5 6.6
Change-Id: Ib036295bbcf7ab5eca7fd554fb2da836fedad8a0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Do not override CMAKE_<CONFIG>_POSTFIX if it's specified by user.
Using custom CMAKE_<CONFIG>_POSTFIX can potentially break qmake,
since qmake relies on pre-defined postfixes that are set by Qt build
by default. Building Qt with CMAKE_<CONFIG>_POSTFIX different from
default one will now warn about potential issues. Assume that we
still doesn't support setting of CMAKE_<CONFIG>_POSTFIX, but also
don't force our default values.
Fixes: QTBUG-115045
Change-Id: I75a34913189eae77062afa10d384eccf4edfc849
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is the only way to detect, and act upon, the addition of the
virtual function in other Qt modules.
Amends a4ca9e8065.
Pick-to: 6.6
Task-number: QTBUG-97482
Task-number: QTBUG-115691
Change-Id: Id32fdd3d8af1fced17983dd104318645a5578b8c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Mark the module are Q_FOREACH-free, so it stays that way.
These two instances are risk-free, because the loop is over local
variables that the loop bodies clearly do not touch, so the safety
copy that Q_FOREACH takes is not required here.
Pick-to: 6.6
Change-Id: Ida3c1d51c661d77a59a2ad105e080c3c9b66c53f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Ran the scripts, added the new enum members to docs.
Updated tests:
* Two of the new languages are right-to-left,
* Canada has replaced a silly date format with a sensible one.
Fixes: QTBUG-111550
Change-Id: Ie6f1e6e94477167c9e2b5c67e6518ca0f6a7e7fb
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
In the Windows zone-ID code, we tokenize() a text extracted from CLDR
data. However, a leading or trailing space (or a repeated internal
space) would then give an empty "IANA ID" for us to match, causing the
empty ID to be mapped to the Windows ID for the entry with the
superfluous space. This was uncovered by an entry with a trailing
space in CLDR v43's data.
Canonicalize spacing in the IANA ID lists extracted from CLDR so as to
ensure this doesn't happen. (We could pass Qt::SkipEmptyParts to the
tokenize() call, but fixing the issue when generating the data is
cheaper and more robust than fixing it at run-time every time it's
consulted.)
Task-number: QTBUG-111550
Change-Id: Ib3883419558d6574141e9ab0bc929ade2d73e020
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
This has happened before: there's a disagreement on whether property
names need to be identifiers or not. In Qt, we insist they are, and if
this code had been around before, other specifications from other teams
in freedesktop.org and gnome.org would have adhered to this rule. But it
wasn't, so such properties exist (see [1]).
Commit bcc93850fc converted the check that
had bene here all along as a proper error for qdbusxml2cpp. So downgrade
it a warning and move on.
An alternative implementation would keep on going and install this
property with the invalid name, but qdbusxml2cpp and other generators
may want to ignore such property names later on. I'm not implementing
this in a bug fix (or at all).
[1] https://fprint.freedesktop.org/fprintd-dev/Device.html
Fixes: QTBUG-115596
Task-number: QTBUG-2597
Pick-to: 6.6
Change-Id: Ifbf974a4d10745b099b1fffd1776fb8cc9239125
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
QTreeView::visualRect() returns a given model index's visual rectangle.
The method is used to toggle the background during hovering.
The previous implementation included the row indicator, when the first
row section was hovered. When it was unhovered, the row indicator
remained highlighted, until the mouse had left the view port.
The reason is, that the highlighting implementation changed the
rectangle returned for the first section, to include the row indicator.
The implementation for neutralising a highlighted section relies on
QAbstractItemViewPrivate::setHoverIndex() and
QAbstractItemView::update(). These methods don't know about the row
indicator to be included, and therefore do not update() its rectangle.
As a consequence, the correct background gets painted but not updated
on the screen.
This patch moves the calculation of the visual rectangle to a new
QTreeViewPrivate::visualRect_impl(). In addition to the model index,
the new method expects an enum argument, representing the calculation
rule:
- SingleSection: Calculate the rectangle of the given section.
- FullRow: Returns the rectangle of the entire row, regardless of the
index's column.
- AddRowIndiCatorToFirstCulumn: Adds the row indicator to the rect,
if the model index points to the first column.
The patch updates all calls within QTreeView, to use the private method
with the right calculation rule for the use case at hand. It elminates
manual (and repeated) modifications of the return value.
The patch implements QAbstractItemViewPrivate::visualRect(), which
returns QAbstractItemView::visualRect(). It is overridden in
QTreeViewPrivate, so that QAbstractItemViewPrivate::setHoverIndex()
and QAbstractItemView receive the rectangle including row indicator.
As a drive-by, several local variables have been constified and/or
renamed to indicative variable names.
Fixes: QTBUG-115149
Pick-to: 6.6 6.5
Change-Id: I4838bcf744f87d8cfb259c5d8758fb65e091e9fe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Also add a comment to check the locales new additions enable do have
substantial data. Some of those added in the past are more or less
stubs, for all that they're officially present.
Task-number: QTBUG-111550
Change-Id: I04d46ee96303ecec56c056a0deff6a9457b863e9
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
The digit-grouping and fractional-part separators need to be distinct
for parsing to be able to distinguish between two thousand and one vs
two and one thousandth. Thakfully ldml.py asserted this, so caught the
glitch in CLDR v43's data where mn_Mong_MN over-rode mn's decimal, but
not group, and thereby clashed with group. Fortunately the over-ride
is marked as draft="contributed" so we can back out of the collision
and limit the selection to draft="approved" values (but only when
there *is* such a conflict, as plenty of locales have (compatible)
draft data), thereby ignoring the conflicting contribution.
Brought to the attention of cldr-users at:
https://groups.google.com/a/unicode.org/g/cldr-users/c/6kW9kC6fz3g
hopefully that'll lead to a saner resolution at v44.
Task-number: QTBUG-111550
Change-Id: I1332486e60481cb4494446c0c87d89d74bd317d4
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
From CLDR v43, "The parentLocale elements now have an optional
component attribute, with a value of segmentations or
collations. These should be used for inheritance for those respective
elements." Since we aren't extracting collation or segmentation data
for the present, omit these elements from the scan for parentLocale
information.
Task-number: QTBUG-111550
Change-Id: I42871929f539c1852471812801953f2fc8be0e8a
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
The script and territory to exclude from reports about unused ones
were swapped, so we excluded a territory from the script list (which
didn't contain it anyway) and vice versa.
TheTest for whether to report used the non-existend .territories
attribute by mistake for .__territories
Change-Id: I29e9d9f8f34883d7c3a5ac15470d9e7a0366e3db
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Amends commit 9a8b9473d5 - apparently
the enumdata.py entries were tidied up after the data had been
generated, leading to them being inconsistent (and I missed that in
review). That, in turn, meant the next update would have changed the
public API enum members, backwards-incompatibly; so make enumdata.py
consistent with the released public API. We'll be tidying the order up
at Qt 7 in any case.
Task-number: QTBUG-110333
Change-Id: I3eed2924ce8b69deb552e923d9b0dc142c5f3a65
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
QByteArray::assign() re-uses existing unshared capacity(), if any, and
is therefore potentially more efficient than '= QByteArray(~)' (and
never slower).
Task-number: QTBUG-106201
Pick-to: 6.6
Change-Id: Ic51fc57eb0f84d3624ad3447c93a74241ab3612b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Introduce QT_SUPPORTS_INT128 and QT_NO_INT128 marcos to handle 128-bit
types. These macros allow to undef Qt's own 128-bit types and the
related code, but keep the compiler definitions unchanged.
This is required for Qt Bluetooth, where we need to use
QT_BLUETOOTH_REMOVED_SINCE to get rid of the APIs using
QtBluetooth-specific struct quint128 which clashes with the 128-bit
types. The idea is to use QT_NO_INT128 in Qt Bluetooth's
removed_api.cpp instead of directly undef'ing __SIZEOF_INT128__,
because the latter is UB.
This commit amends befda1acca.
Pick-to: 6.6
Change-Id: Ia2c110b5744c3aaa53eda39fb44984cf5a01fac2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit ca54b741d6 used the internal
has_operator_equal (and commit 01d94760d8
copied that for has_operator_less_than) instead of using the recursive
expander that was being used here. That assumed that the contained type
in std::optional would always be the last final check, which is an
incorrect assumption.
Fixes: QTBUG-115646
Pick-to: 6.6 6.5
Change-Id: Ifbf974a4d10745b099b1fffd177702934bec27ff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Replicate qvulkaninstance.h's logic. The idea being to allow
to compile code that uses QRhi (so includes qrhi.h) with a pre-built
Qt that was built with Vulkan support, but there is no Vulkan SDK
(and so vulkan.h) on the developer's system. Normally this is not
something we care about, e.g. compiling an application using
QVulkanInstance or any other Vulkan functionality implies one has
to have the SDK installed or at least the headers available in one
way or another.
However, including qrhi.h (and so qrhi_platform.h) happens in some
cases in applications that do not themselves initialize a QRhi,
i.e. they do not care about the QRhiVulkan* structs, because
they only ever use a QRhi retrieved e.g. from the QQuickWindow.
Design Studio is one example. To allow building DS against a Qt
that is Vulkan-enabled (e.g. the official Qt releases) but in
an environment that has no Vulkan headers, we skip the QRhiVulkan*
stuff when there is no vulkan.h available.
Pick-to: 6.6
Change-Id: Ic81250e6c90939a38f79cab1438fbb9f483f56df
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Use the new Q_NODISCARD_X macro to point users that ignore the QFuture
returned from QtConcurrent::run() to QThreadPool::start(), which does
the same thing, but doesn't return a future, so is better suited for
the fire-and-forget use-case the OP of and commentators on
QTBUG-111875 cited.
Can't pick to older branches, since Q_NODISCARD_X is 6.7+.
Task-number: QTBUG-111875
Change-Id: If0bf920ecc0fb59b9a9a9931ea9dc30f7abff1b7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
QAndroidPlatformScreen::addWindow() asserted the existence of a backing
store, when a window is added. But QQuickWindow neither needs nor has a
backing store.
This patch removes the assertion, which was introduced in
dbb072eb28
Task-number: QTBUG-97482
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ifb43f83d39e16b972754e86d0ff9633f58dac3f8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The blacklisted test does not crash, as its expected output indeed shows.
Pick-to: 6.5 6.6
Change-Id: I07522a7d065b5f39620975a3546bcd156024c41d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
In porting the selftest machinery to Catch2 in 24e83de8d1 we
accidentally added an unconditional early return when determining
whether to check for unexpected stderr output, resulting in not
checking error output on any platform.
The return statement has now been moved into the Q_CC_MINGW
condition, but as we now seem to have similar issues on macOS
and Linux with some of the tests outputting "Received signal 6
(SIGABRT)" as we do for QEMU, we need to add a few more explicit
early return conditions to the function.
Pick-to: 6.5 6.6
Change-Id: I7a25f000843b5f1003a5db883f08285185046b46
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Nothing prevents client code from calling QLocale::setDefault() before
we ever instantiate QLocale::system() - aside from some quirks that
mean setDefault(), currently, does instantiate QLocale::system() to
force initialization of defaultLocalePrivate - so using defaultIndex()
could set the system QLocalePrivate instance's index incorrectly.
In any case, even if the index is initially set correctly, a
subsequent change to the system locale would change the correct index;
and nothing outside QLocale::system() has access to the instance that
would then be remembering an out-of-date index.
Actually tripping over that inconsistency took some deviousness, but
was possible. The index is (currently) only used for month name
lookups and those special-case, for the Roman-derived calendars, the
system locale, to only use the index if the system locale offers no
name for a month. Meanwhile, updateSystemPrivate() uses the fallback
locale's index for its look-up of which CLDR data to copy into the
fallback QLocaleData for the system locale.
None the less, a non-Roman calendar's lookup will go via the index to
get at the CLDR data for that calendar, thereby exposing the system
locale's index to use; and, sure enough, a setDefault() could lead
that to produce wrong answers.
In QLocale::system() there's a cached QLocalePrivate, whose index we
need to ensure stays in sync with the active system locale. So pass
its &m_index to systemData(), which will now (when passed this) ensure
it's up to date. Since we always have called systemData(), to ensure
it is up to date, we can skip that update in the initialization of the
cached private and use m_index = -1 to let systemData() know when it's
in the initial call, thereby making the static cache constinit.
Amended a test to what proved the issue was present.
Change-Id: I8d7ab5830cf0bbb9265c2af2a1edc9396ddef79f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
It is part of a solution to produce notarizable binaries for
application using Qt WebEngine.
Pick-to: 6.6 6.5
Task-number: QTBUG-99555
Change-Id: Ice0bbcfb12829906328f55158b0c37f03878f17c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The member function is never implemented.
Change-Id: Iee93c7d24df40b48b897d937889bb9556b8feb1a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>