| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Increase the size of the branching indicator for treeviews from 6pt to
8pt.
Fixes: QTBUG-142400
Pick-to: 6.10
Change-Id: I64ccd3a217f799d77233d6212f232af4e31d2ef1
Reviewed-by: Morteza Jamshidi <morteza.jamshidi@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
| |
|
|
|
|
|
|
|
| |
Adapt MetaObjectBuilder to newly added property attributes.
Task-number: QTBUG-98320
Change-Id: Ife1d388fd75939c730055746426dbf5459e170d8
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hash has the following format <hash_revision>$<hash_b64>, where
hash_revision is an integer and hash_b64 is the base64 encoding of the
hash.
MetaObjects built using QMetaObjectBuilder do not yet support the hash.
That will need to be added at a later point.
Task-number: QTBUG-142186
Change-Id: Ifafc7df2202decf48e8a1a45e652c2f61c5cea64
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cpp code generated by qmlcachegen relies on stable metaobject layouts.
They will, however, inevitably change in a incompatible way every now
and then. This renders the cache files compiled with a previous version
and stored on a user's machine invalid and unsafe to use.
There is currently no mechanism to invalidate the cache files if a meta
object breaks compatibility, by adding a signal for instance.
To address this, we can record hashes of the meta objects a compilation
unit relies on and invalidate it when a mismatch is found at runtime
before executing it. We then fall back to other mechanisms to run the
code.
This first step adds the logic to compute the hash of a metaobject to
moc and adds it to its json output.
The hashes are of the form <hash_revision>$<base64_hash>
Task-number: QTBUG-142186
Change-Id: Ifdd56b6259874024341a2b2623d088a45816b0a1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
| |
This allows for classList to be const from that point on and for the
generator to only take a const reference to it.
Task-number: QTBUG-142186
Change-Id: Ib43bfcb1a477a471b39c4b037d56f4dea42e04e7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. This cannot be guaranteed for the quaternion elements.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
As a drive-by, put the operators at the beginning of continued lines,
as requested by https://wiki.qt.io/Qt_Coding_Style#Line_breaks Item 2.
Amends the start of the public history.
Pick-to: 6.10 6.8 6.5
Change-Id: Ia317aa260ffc9fb04c10c24517a1ca3be58a1b05
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. This cannot be guaranteed for the vector elements.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
As a drive-by, put the operators at the beginning of continued lines,
as requested by https://wiki.qt.io/Qt_Coding_Style#Line_breaks Item 2.
Amends the start of the public history.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: I55cfb520bda53e12532923005bb1ee6396b124f2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. This cannot be guaranteed for the matrix elements.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
As a drive-by, put the operators at the beginning of continued lines,
as requested by https://wiki.qt.io/Qt_Coding_Style#Line_breaks Item 2.
Amends the start of the public history.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: Iadcf753cb756112c86923c62d8cf9a44a793ec8c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. For a cursor position, this cannot be guaranteed.
Fix by using the new QtPrivate::fuzzyCompare() function, which does
things in the correct way.
Amends 519e3963fad0761bac5629b1f6eabc58060265c0.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: I994acabd644dc2838ecda39e159674fdc626cab9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
| |
Change-Id: I809b68b9499de665276636b5a2c14300401e0ae9
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The ownership mess is not a problem if there's nothing stored at the
position yet, and it allows gradually populating a row of raw object
pointers. Hook newly inserted objects up to the autoConnectProperties
mechanism.
Add test case.
Change-Id: Ie029a2a358e6a1ed5f24869039be9c2ad542dff9
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If the view outlives its platform window due to hanging around in
some autorelease pool or strong reference we might get a callback
for updated backing properties with no window to propagate them
to.
Fixes: QTBUG-137435
Pick-to: 6.10 6.8
Change-Id: I665d38f4fbed35f524cd46dfccdb885924cebd6c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract Method QtPrivate::fuzzyCompare() from the qFuzzyCompare()
implementations that correctly validate the preconditions of the
public qFuzzyCompare() (QMarginsF, QSizeF, QPointF), so we can more
easily apply the same technique to other in-tree callers.
In the process, replace comparison to literal 0.0 with calls to
qIsNull() so we're a) insulated from -Wfloat-compare and b) have a
customization point to extend to types other than float and double.
Amends:
- 473d06970d224b202e7a8ee8feaa2a2d98d5b257 (QMarginsF)
- fa0d77e290f5ccb5afa7d02716f8726aa6b810e6 (QPointF)
- 3ca9877f8cae41e1b1cb3c72d4a7872d97fb8254 (QSizeF)
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: Ib7ec06822f8006771a1c3a96145e98d574a29fbe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Amends 476a5ff0ecd7b84066dc6fa9d85769ac108ffd1c, which made
QAbstractFileIconProvider a Q_GADGET.
Found in API-Review.
Change-Id: I206f38918515fb3e06778051153e8af8ad8c068a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
| |
Aligns with the existing APIs in the class.
Change-Id: Ia9f11138d93b37995c8084fd9a25070554cec7db
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the IORing API on Windows to provide asynchronous I/O operations.
Some parts supplemented by using some blocking API where we don't have
an option (yet). Currently that just includes the 'stat'/size operation
as well as Open and Close. Though with Close we schedule a flush and
close the handle ourselves once the callback is invoked.
The API is quite limited so far, but sufficient for what we have now.
The implementation can be extended later as needed.
The Vectored I/O operations are not actually vectored unfortunately,
the Windows API requires page-aligned memory and sector-aligned file
offsets, which makes it really impractical to provide generically.
For a very limited time: limit the configure options to Windows 11.
Task-number: QTBUG-136763
Change-Id: Iee57a23358a71ab6bfd007ff15b760b65ea76406
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Amends commit 4b1547adc9b195e6acc90471fc48dec7ee0c429d, which added
these two lines. Clearly a copy & paste error.
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-120396
Change-Id: I9c70b99776af7f26f11efffdc1dac60c2267d12c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
To allow assistive technology on Windows to react to changes of the
checked state of item view items send appropriate notifications also
for the Cell, ListItem and TreeItem roles.
Fixes: QTBUG-141856
Change-Id: I5ff341fa260ea95c0cf80bc25c141f9da0ea54da
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
No need to duplicate the entire logic. The only overhead is that we have
to create a QModelRoleDataSpan for all roles, except our internal roles.
Using a QVarLengthArray makes that cheap.
The only special case we keep is for items that are backed by a type
that is directly convertible to a QMap<int, QVariant>. This comes with
a small overhead for acessing the element at runtime.
Pick-to: 6.10
Change-Id: I33f86d231bef9036a7e83584d1bf013f129b8075
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
| |
Amends e22cd01076e795ed853b0536605d3bb205587d78.
Change-Id: If463efce1006a62c43bd85a7f1f9d913f806ad94
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
|
|
| |
There is no performance difference between accessing mutable or const
adapters, but in either case we are going to have to copy the value, as
we go through QRM::data() to get a QVariant, which then stores a copy.
Change-Id: I1712c3d87002b3650dcfee2900b0d00357695f11
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
|
| |
The enum was already tagged, but the property was forgotten in
f9bb6c8d900205375c70bb33f359ce0250212460.
Change-Id: If52b4929f4548ba4603d8a565917afe624110522
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qFuzzyCompare() requires that neither argument is numerically
zero. One user of this function cannot guarantee this, because, while
they check for zero, they do so _after_ calling qFuzzyCompare() with
that value, so the check comes too late.
Fix by swapping the two checks around (so we check for == 0 before we
check for == 1).
Amends 8c1532eeaae6a220569cef3476d1124399478285, which changed from
qFuzzyIsNull(x - 1) (which doesn't have the problem) to
qFuzzyCompare(x, 1) (which does).
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: I054449b5510217f83479c5a028986c569f54084c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coverity complained that the while loop being changed by this patch
overflowed last_cluster from its initial ~0u value in the
post-increment operation.
It's correct that we overflow, but the old code wasn't wrong: unsigned
overflow is well-defined as mod 2^n, n = bit-width of the type, so we
overflow to zero, but then, two lines further down, unconditionally
overwrite said zero again. If we overflowed, that means that
last_cluster was still at ~0u, so cannot possibly have compared < that
`cluster`, another uint variable, so we couldn't get into the situation
that the loop continues because of 0 < cluster.
So this doesn't _need_ fixing, but in the spirit of "if Coverity
doesn't understand it, a human won't, either", let's improve the code
nonetheless.
Observe that last_cluster is being used both as the loop counter as
well as to hold the value across an outer loop. Separating the two
roles by introducing a dedicated loop counter shows that this is just
your typical run-of-the-mill for loop, so rewrite it as such.
Amends c77222c0e711d584bec880222412fc50d044005f (5.3).
Pick-to: 6.10 6.8 6.5
Coverity-Id: 898027
Change-Id: I8184bddc88e24a4a6612309ae59b64b99ca4c2d7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the BinaryProvider backend each mimetype optionally has additional
data in an XML file.
For each mimetype this data is cached in m_mimetypeExtra. However, if a
mimetype does not have any additional data this code returns early
without caching anything.
This causes an additional access and open call for every mimetype for
each lookup of globPatterns.
Given we have typically have hundreds of mimetypes and applications may
need to look up thousands of files this becomes a very hot path that
should not be making system calls after the first time.
This patch should improve performance but not make any behavioural
changes. All callers treat an invalid iterator the same as the default
MimeTypeExtraMap.
Change-Id: Ibe415ec4e70198655d7a6ad610664fe54e3b9215
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
|
| |
|
|
|
|
|
|
|
|
| |
[ChangeLog][QML] VIRTUAL and OVERRIDE attributes will be used
for the expanded override semantics in QML. See QTBUG-98320 for the details.
Task-number: QTBUG-98320
Change-Id: I56826a6b9158c0beeb58ad1564a58c22f15027bf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Item view item data for various roles are relevant
for the properties and states reported for the
corresponding accessible objects on the accessibility
layer, see the a11y implementation in QAccessibleTableCell.
Therefore, changes to the relevant role data
should also be reported as corresponding state/property
changes on the a11y layer.
Implement sending corresponding accessibility
events from QAbstractItemView::dataChanged.
While the roles param in the QAbstractItemModel::dataChanged
signal that this slot is connected to is optional,
only handle roles that are explicitly passed for now,
which covers the case of interactively modifying items.
Properly handling the case of an empty list of roles
indicating that all roles should be considered as
(potentially) having been modified would require to
keep track of previous values to be able to only send
notifications about those that actually changed.
(One way to do that for the current item could be to
remember the values in QAbstractItemView::currentChanged
and then compare whether those have changed in the
meantime.)
Always sending accessibility events even if no change
actually occured would be incorrect and could e.g. result
in confusing/misleading screen reader announcements.
For now, in order to avoid potential negative performance
implications when doing that for all items, restrict
this to the case where (only) the current item's data
has changed, which in particular covers the case where
a user interactively modifies that item.
(If the need arises, this can be further extended as
needed in the future.)
This e.g. makes the Orca screen reader on Linux
announce changes to the checkbox state for the
QTBUG-141856 sample program when toggling it using
the space key, and results in the state getting
updated as expected in Accerciser [1]. The accessible
name shown in Accerciser also gets updated as expected
when modifying an item's text, and Orca announces the
new name.
[1] https://gitlab.gnome.org/GNOME/accerciser
Task-number: QTBUG-141856
Change-Id: Ic1592f4c639c29ab4144ae8b768f26c63f8878dc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Different QAbstractItemViewPrivate subclasses
implement mapping from the item views model index
to an accessible child index.
So far, the methods implementing the logic were
independent and used only within the corresponding
item view implementations themselves.
Introduce a new virtual base class method
QAbstractItemViewPrivate::accessibleChildIndex
and let the existing implementations override
that one.
This prepares for being able to make use of that
logic directly inside QAbstractItemViewPrivate
in an upcoming commit.
While at it, also make have those methods dependent
on QT_CONFIG(accessibility).
Task-number: QTBUG-141856
Change-Id: Ic02a7875eccb893f722f13489f768f3675fe14bf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ingo Klöcker <dev@ingo-kloecker.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These have been unused ever since they were introduced when
the AT-SPI2 bridge was added in commit
8e1ff45e74f529c7f49688242ea0fd25ce2913f3.
They also don't seem to correspond to anything in the
AT-SPI2 XML specifications or anything else in the
at-spi2-core repo [1].
Drop them.
[1] https://gitlab.gnome.org/GNOME/at-spi2-core/
Change-Id: I9e02db434eb06279b7393061f4796ad3da7f4d1e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It wasn't possible to use the qt-cmake script with, e.g. the --build or
--install argument, because we called cmake with
-DCMAKE_TOOLCHAIN_FILE=..., and such arguments must be passed as the
first argument.
Since CMake 3.21 it's possible to pass the toolchain file via an
environment variable. This patch changes qt-cmake and qt-cmake.bat
accordingly.
This is safe, because we require CMake 3.22 for building Qt since Qt
6.9.
Pick-to: 6.10
Fixes: QTBUG-140785
Change-Id: I4b4bc729e80a0ab9fbe275cf2d3900111be3c1a3
Reviewed-by: Alexey Edelev <semlanik@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
We are going to need this later when we need the geometry
for the visible cells.
Task-number: QTBUG-141125
Change-Id: I6c12640405d902b84f241dadb4b4fe988535af0a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The usual problem, the usual solution...
At the time of construction of the return object it is known which of
the two variables to construct, so NRVO would be permissible, but most
compilers don't enable it because the structure isn't
T result; // first (non-trivial) variable declared
// must be a function's top-level scope
~~~
return result; // only one
// or else all return statements are token-by-token the same
The usual fix is to wrap the tail part of the function (= the one that
constructs a T and returns it, as opposed to the part that returns
temporaries) in an IILE expression: the lambda then _has_ said
structure, so is NRVO'ed and the call to the lambda is RVO'ed in the
caller.
Invert the polarity of the if statement in order to keep the meat of
the function's git history intact.
Amends deddafe0a6a32aa438cc36c7dcfae8c323274487.
Pick-to: 6.10 6.8
Change-Id: I3f22665daca320be283e4088cf1062f115cd49e4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As pointed out by Coverity elsewhere¹, use of a ternary in return
statements can sometimes lead to superfluous copies, because lvalues
are forced to materialize an rvalue when they appear together with an
rvalue in the resp. other leg.
I'm pretty sure that's the case here, because it.value(), while being
an lvalue, returns a reference-to-const, so isn't a local object that
would enjoy a transparent move, anyway.
But by rewriting the code as an if statement instead of a ternary
expression, the reader doesn't need to understand the issue (if they
are aware of it in the first place): the 'return T()' is definitely
RVO'ed, and the return 'it.value()' definitely calls the copy
constructor. As the result isn't worse in executable speed, but easier
to reason about, do the rewrite.
Amends deddafe0a6a32aa438cc36c7dcfae8c323274487 for the original
value() and 64bc6509c350c5750c6432a0ae6876f4bfb97cd0 for the
is_transparent case.
¹ e.g. cd96362492375c50a9d0614b829c51eb6597d713
Pick-to: 6.10 6.8
Change-Id: Id8b3bc31e0f38ea961cfe6169e68b1b4744c799f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |
|
|
|
|
|
|
| |
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.52
Pick-to: 6.10 6.8 6.5 5.15
Change-Id: I83a6e349ac0d1d83966a118c1c959d0e8c99b371
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Interfaces without an object calls deleteInterface directly,
issue ObjectDestroyed events also in this situation.
Task-number: QTBUG-141125
Change-Id: I0dc7ff5e45a5fe61af01957eb4c8088cc2e64e17
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
https://www.freedesktop.org/wiki/Specifications/XDND/#clientmessages
Client Messages->XdndStatus->data.l[1]: Bit 0 is set if the current target will accept the drop.
Pick-to: 6.10 6.8
Change-Id: I6978f99f55d57c8025cc644ef837af154f44e7a8
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
| |
|
|
|
|
|
|
|
| |
m_dragState could go out of scope before the
callback in toMimeDataWithFile gets executed.
Change-Id: I7e45b89a4ca856620ecff1701b3e9046ccb2891e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These types happily hold NaNs and infinites, if you know what you're
doing, and so we can stream such objects out. We cannot then refuse to
stream them back in again.
[ChangeLog][QtGui][QVector2D/QVector3D/QVector4D] Fixed a bug in the
QDataStream operator that could lead to an assertion failure (program
termination) on reading back previously streamed out objects that
contain NaN or infinity values.
Amends 7a738daa97436478a21b5dd31ba2312b2cb2df41.
Pick-to: 6.10 6.8 6.5
Fixes: QTBUG-142431
Change-Id: I790d7fbc46e5bd48a2cbd7e8a26d9c90c5fe05b9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Explicitly mention that cancelChain() cannot cancel a nested QFuture
once the related computation has started. The user needs to explicitly
capture and cancel the nested future instead.
Task-number: QTBUG-140786
Pick-to: 6.10
Change-Id: Icc629071659a5833f7e9b55c640fd9920b6bd8a9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Auto-connecting properties is enabled in models where all item data is
backed by the same QObject subclass. When assigning a new row, an entire
branch of rows in a tree, or assigning a fresh range as the children of
a row, then the new items need to be connected.
Some of these items might be nullptr, in which case we have so far
stopped the connection loop early (by returning false from the helpers).
Fix that to only stop early if a connection failed (i.e. if role names
and properties in the objects are not aligned), but continue if we
encounter a nullptr entry in the item data.
Change-Id: I2c4b5e5beedc7b38c40ee459c2e0437568b9b087
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a QRangeModel represents a C++ range, then the C++ range must no
longer be modified directly, as clients of the model won't be notified
about data or structural changes. Ignoring this (documented) warning
might end up with views not presenting the data correctly, or
even result in crashes as the model cannot update QPersistentModelIndex
instances.
Modifying the range through the QAbstractItemModel API is ok, but
clumsy, as it requires dealing with QModelIndex and QVariant for basic
operations.
QRangeModelAdapter provides an easy, type safe, and data-structure aware
API for reading and also modifying a range that a QRangeModel operates
on. This includes an interator API for rows, and - unless the range is
a list - columns. Dereferencing row iterators yields a row reference
type from which a row can be accessed for reading, or that a new row
can be assigned to. Dereferencing a const column iterator yields an
item; dereferencing a mutable column iterator yields a reference type
that a new item value can be assigned to.
Since QRangeModel itself is not a template class (so we don't know the
type of the range anymore once it has been created), we have to create
the adapter from the range (and optional protocol), which then
implicitly creates the model. Constructing the adapter implicitly
constructs the model, which is owned by the adapter. QRangeModelAdapter
is a value type, using std::shared_ptr for the model so that all copies
of the adapter operate on the same model.
To be able to set entire multi-role objects as items, introduce a new
Qt::ItemDataRole enum value, Qt::RangeModelAdapterRole. This is very
similar to Qt::RangeModelDataRole, but QML has specific requirements
that QRangeModelAdapter doesn't have, and we want to pass items back and
forth without modifying their value category - ie. an item that is a
shared_ptr<Object> is not useful for QML (which needs an Object *), but
a C++ user expects to get a shared_ptr<Object> from a call to at(), and
also expects to be able to set such an item.
The code has room for de-duplicating some logic in follow-up commits.
[ChangeLog][Core] Added QRangeModelAdapter for C++-style access to a
range used in a QRangeModel, while implementing QAbstractItemModel
protocol.
Change-Id: I3f2f94cb51b850100590fbe2c9a7c9dabbec59bd
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
|
|
| |
works firefox -> firefox, and chrome -> chrome,
but not firefox <-> chrome
Change-Id: I9495e4775eb581e5732f27bce967416c069c601a
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
| |
|
|
|
|
|
|
| |
Amends commit 9dec893bf64f36fa339a1226a77bf938c5603587
Task-number: QTBUG-140181
Change-Id: If2fdb72b901ef7c577e7a46266f35c749a6958cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc < 13 doesn't accept both visibility and deprecation attributes on
the same class. Therefore omit the deprecation attribute there. We need
to retain the export attribute because MSVC also exports the inline
methods.
Also, push the deprecations forward to 6.15. We can't deprecate the
iterables in 6.13.
Amends commit 8b246f262346ded7860ad76fdedc8d59f037a374.
Change-Id: I333a4c05baf12a75dc93e1dbb08dabbc23ccf468
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let the user define the TCP Keep Alive parameters via
QNetworkRequest.
The default values used by QNetworkAccessManager are defined in
QHttpNetworkConnectionChannel and can be overwritten by
environment variables.
These values can be also controled from the QNetworkRequest API.
These have the highest priority. If
nothing is defined, QNAM is going to use the default values. If the
environmental variables are defined, QNAM is going to use those. If
there are values provided via QNetworkRequest, QNAM is going to prefer
those.
[ChangeLog][QtNetwork][QNetworkRequest] Added new methods to specify
and get the current TCP KeepAlive parameters for the request.
Task-number: QTBUG-136625
Change-Id: Iafc485eb7b85214500d7c9205db1ecef67dc4b8c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Make clear that this refers to the AtSpiAdaptor method.
Amends 7a478ff96f27fbfc8ddfbc67ba62276580aa02b4.
Change-Id: I1de073208b6347276f16a0b36523bb097ec398a3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
37c68503cbada547291ec4c4873dc054a8b82510 added the "count == 9" guard,
which effectively disabled the Qt 2 compatibility code.
Given that that compatibility code has been off for almost 5 years,
there is probably little point in fixing it now, so we might as well
remove it to simplify the QFont::fromString() function.
Change-Id: I677a033c74616c4cb5f24b750f47837d3ab75da8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
std::apply only works for types compatible with std::get,
but it doesn't consider get() in terms of ADL.
So we can't use it to call a function on each element in a tuple-like
row type with get() in its namespace. Instead, we roll our own helper
template using an index sequence + ADL-compatible get() usage.
Amends f9bb6c8d900205375c70bb33f359ce0250212460
Change-Id: Ic0858f95f1dcc6333b09336189f5adde7309ef75
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
|
| |
|
|
|
|
|
|
| |
Most of them are not random access and operator[] makes no sense then.
Amends commit 8d359d61c16641d523e4189a7d473b6126b11011.
Change-Id: I724aaf98e14114d0fd1cb5bce5fdc2ed4690dae0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
waitForBytesWritten() can emit signals, most importantly
readyRead(), *before* even writing data. Anything can happen in
slots connected to these signals - which includes writing out some
data, which can make a subsequent attempt to write data in
waitForBytesWritten() fail(*), so waitForBytesWritten() fails.
Recognize when anything invoked from the current call wrote out
some data and return success instead.
It is not possible to deal correctly with all shenanigans in
signal handlers, but this seems quite reasonable.
Also fix QAbstractSocket build with QABSTRACTSOCKET_DEBUG defined.
(*) for at least two reasons: nothing to write anymore or OS write
buffer full
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ibf4de93d5e7dc2f88b675de410b216674faa20ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|