| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since Flickable already has horizontalOvershoot() and
verticalOvershoot() functions, there is no reason
to calculate this again in TableView.
This patch will refactor the overshoot code to use the
already available API in Flickable.
Task-number: QTBUG-100696
Change-Id: Ifc666e079b0147c3e1cfc6bba2beb287977b303e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The logicalSize should always be calculated as `QSizeF(pixelSize) /
devicePixelRatio`, so that it accurately reflects the actual size of the
rendering surface.
Extends 17a280995ab546074fa7e9a009642fec5f23c64e.
Task-number: QTBUG-101269
Change-Id: Idd1b2337b6ef3456b570c0e619d5b9365ac93495
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation would only find cells that were
inside the bounding rect of the view. By changing the function so
that it also find cells that are halfway outside the view (as long as
they are loaded), it becomes useful also for implementing selection support
(finding cells under the current selection, even those cells that are
halfway outside the viewport).
Task-number: QTBUG-100696
Change-Id: Ie54dc9b8773e7295ead0c9644dbbc5052b8e40fc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The pattern of checking if there are more rows or columns that can
be loaded around the currently loaded table, is a reoccuring
pattern. So factor it out into a more readable function.
Task-number: QTBUG-100696
Change-Id: Ia0117a6db0495f3ac1173e24084d074581ff5e7d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out we need the modelIndex() and cellAtIndex()
mapping functions in QQuickTableView as well, and not only
in QQuickTreeView. The reason is that functionality for
moving the current index around need to use them in order
for the logic to end up correctly for both
QQuickTreeView and QQuickTableView.
[ChangeLog][QtQuick][TableView] Added a set of functions to
get the model index for a cell, and vice versa.
Task-number: QTBUG-100696
Change-Id: Ifd2cd3e42bf8141a51c48635e57fb3a22358f1f6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
This is in line with what we do in other reverse() and rewind() methods.
Unfortunately we need to dig deep into the QQuickItem internals in order
to get all the flags and callbacks right.
Pick-to: 6.2 6.3
Fixes: QTBUG-101186
Change-Id: Icde1a1b2dab1b9cab5adcbc28485a7526a8ac2b7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A QtQuick Text element is used to represent a separate block of text
in a window.
Normally, when TalkBack is enabled, the user expects to be able to
navigate between separate blocks of text with regular A11Y gestures.
However before this patch the Text elements were not focusable by
default, so all the Text elements in the Window were read by the
TalkBack successively, as if it was one element.
This could be solved by explicitly adding
Accessible.focusable: true
to the properties of every Text element.
This patch enables A11Y focus on Text elements by default.
Fixes: QTBUG-77371
Pick-to: 6.3 6.2 5.15
Change-Id: Icfcef6ee301b9218bb9ace97a05432c9fc2ffb0a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The layout is initialized with a copy of the current font
before the laying out begins.
In cases when setupTextLayout() iterates through the main loop multiple
times, it will update the layout font, if it differs. (See code below)
if (!once) {
if (pixelSize)
scaledFont.setPixelSize(scaledFontSize);
else
scaledFont.setPointSizeF(scaledFontSize);
if (layout.font() != scaledFont)
layout.setFont(scaledFont);
}
The whole reason why we might update the font in the first place, is
because the QQuickText has a fontSizeMode property which can be set to
e.g. HorizontalFit, which will cause the layouting to downscale the font
in order to fit (assuming the text doesn't fit the space available),
instead of eliding.
The problem here is that QFont internally uses a float to store the point
size, and we would convert that value to an int when temporarily storing
it on the stack. This would modify the pointSize value in cases where
the pointSize is fractional, and cause a mismatch between the QQuickText
and QTextLayout.
The lineWidth is set only during the first loop iteration. During
successive iterations of the main loop, the layout's font would be updated
to one that has either a floored or ceiled pointSize.
If the pointSize is a fractional value, and is ceiled when being updated
during the second loop iteration, the layout would use a larger font
value, which would cause the QTextLayout::naturalTextWidth() to return a
larger value than that of the lineWidth, triggering eliding.
Solution: Keep the font precision, by storing the values as floats
instead of ints.
Fixes: QTBUG-92006
Pick-to: 6.2 6.3
Change-Id: Ibf64ac2dfbf262c6aae05b8eb8251d2f5a869b69
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
| |
|
|
|
|
|
|
|
| |
There two functions will be used in subsequent patches to be
able to determine the geometry of loaded rows and columns.
Task-number: QTBUG-100696
Change-Id: I8619957bcfeafe11b3965e9179a4b7e8c612bbd4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
loadAndUnloadVisibleEdges()
Later patches that implements animation support for moving
the currentIndex around will need to load edges synchronously, even
if it can theoretically be inside an asynchronous loader. Add
an extra argument to loadAndUnloadVisibleEdges() to be able
to specify this from the caller.
Task-number: QTBUG-100696
Change-Id: I3dc8e2c137ba0223cd820b7b7286829942f79821
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
| |
Change-Id: Ib552f25b5bdb252a5447cb49681a8fc9b72953cf
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The loader's context may have been removed from the context hierarchy or
it may not have a context in the first place. We should not crash then.
Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-67950
Change-Id: I1058d5b1f978aa040f8b2f018c4357dd7a3ef333
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Failing to call updateGeometry() and setting the various dirty flags
leads to inconsistent state.
Pick-to: 6.2 6.3
Fixes: QTBUG-99436
Fixes: QTBUG-98857
Change-Id: I15240b1670947da29e2f05e7ea41c7586f0b987a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initialized = true statement either went missing or it never was
there. This has zero effect on the common usage where the client does
not bother with invalidate(), but rather destroys the
QQuickRenderControl. However, more complex usages, such as in
QQuickWidget do need to invalidate for various reasons, without
destroying the entire QQuickRenderControl.
Pick-to: 6.3 6.2
Change-Id: Iaabc6309cb42cfdd624321863a5504cdeb01275d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Both TableView and TreeView needs to be able to set and update
required properties. So move this helper function from
QQuickTreeView into QQuickTableView, so that they both can
use it. This will also make it easier to update how we deal
with required properties in TableView/TreeView once
QMetaProperty::isRequired() works.
Task-number: QTBUG-100696
Change-Id: Iff0a86fe46cecdc4db8d307787fe148c7e71bbf6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An investigation of uses of QQmlGuard (+ related classes) yielded the
following results:
- objectDestroyed is the only virtual method of QQmlGuard (besides the
dtor)
- we never have an owning pointer of type QQmlGuard * to one of its
subclasess
=> Therefore, we can replace the use of virtual methods with a function
pointer, which avoids the issue of duplicated vtables.
None of the objectDestroyed actually cares about the object we pass to
them, so we can leave it out in the function pointer. As everything is
private API, we could easily bring it back if the need arises in the
future.
By moving the function pointer into QQmlGuardImpl we also avoid UB in
qqmlengine.cpp, which cast any QQmlGuardImpl pointer to
QQmlGuard<QObject>. This, however, is wrong as QQmlGuard<T> does not
inherit from QQmlGuard<QObject>, even if T inherits from QObject. As we
now can sipmly access the pointer from QQmlGuardImpl, we can side-step
any casting woes alltogether.
Moreover, we use this opportunity to let QQmlStrongJSObjectReference
drectly inherit from QQmlGuardImpl. This requires duplicating some of
the QQmlGuard API, but on the other hand avoids busy-work to hide no
longer desired API.
Unfortunately, we can no longer inherit privately from QQmlGuardImpl, as
otherwise the various subclasses can no longer cast the QQmlGuardImpl we
pass to them to their own type in the objectDestroyed(Impl) methods.
QQmlGuard(Impl) still could benefit from a move ctor/assignment
operator; those will be added in a later commit.
Task-number: QTBUG-45582
Change-Id: I995148a428e541ced5c79b3a61d91c4bb7e03308
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
| |
Change-Id: I801d2489e447309f25883e313cba13050fce20a4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.3 6.2 5.15
Change-Id: I6e107095a7dbd074e076ac6762f18cecf484691f
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a function that lets you expand the tree recursively
from an index in the model, and all the way up to the root.
[ChangeLog][QtQuick] New function "expandToIndex()"
has been added to TreeView.
Change-Id: I063ef698e37f44730438e1638d3b7c1b4edaa0d0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
|
|
|
| |
Change-Id: I5cec24e231c9dc22d384afa5716a1758f59c0311
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add a new function collapseRecursively() to TreeView
that lets you collapse a node all the way down to
the leaves.
[ChangeLog][QtQuick] New function "collapseRecursively()"
has been added to TreeView.
Change-Id: Ic82def1e45b7d9c2be4c5e7b04d1001e75452ba0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add a new function expandRecursively() to TreeView
that lets you expand a node all the way down to
the leaves.
[ChangeLog][QtQuick] New function "expandRecursively()"
has been added to TreeView.
Change-Id: I665cad48e2a76e2f50ae559f1623ac9427c98fad
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you call positionViewAtCell(row, Qt.AlignTop) for the last row
in the table, the row will be aligned to the top of the view, as
requested. But this looks really wrong , since it will cause the
table to be flicked to a position that causes it to overshoot
by a distance close to the height of the whole view, effectively
leaving a big empty gap at the bottom. This looks really buggy.
This patch will correct this behavior by ensuring that we never
flick the table to an "invalid" position while positioning
table at a cell using the requested alignment. Instead we
clamp the table to the edges of the viewport.
Fixes: QTBUG-100680
Pick-to: 6.3 6.2
Change-Id: Id3003df784a0128df28ee2e78e2456e1fa1e11e8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.3
Change-Id: I2adfaa21e5bb446a5ee373f70c3b16c103f4878d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not incorrect for on-screen windows per se, but all queries must go
through QQuickWindow::effectiveDevicePixelRatio(), otherwise nothing
handles the redirected cases, i.e. when a QQuickRenderControl subclass
reports another QWindow as the "true" window (from which the dpr can
be queried), or when a QQuickRenderTarget provides its own custom
device pixel ratio.
The listeners of the ItemDevicePixelRatioChange notification seem all
correct already, for example, QQuickIconImage, upon the item change
notification calls effectiveDevicePixelRatio() from
QQuickIconImagePrivate::calculateDevicePixelRatio(), and it (very
wisely) does not trust the value in the item change notification
itself. Same goes for QQuickPaintedItem. But ideally should make the
notification report the true value.
Change-Id: I1a8cd438abbe63cac93ec20f166c40c2e36239d3
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should make effectiveDevicePixelRatio(), i.e. the central point of
truth, to take also the QQuickRenderTarget's user-provided dpr value
into account, if there is one. QQuickRenderControl::renderWindowFor(),
if reimplemented, still takes priority.
This allows simplifying the logic in the sync and render steps. The
end result is exactly the same, but now with fewer tests and
branching, which for instance allows sharing a single code path in
places that were split up to three branches before.
Amends ddff1591fb5f966826bdc6d54d8c1145c7c260a7 (sort of).
Change-Id: I27d801c5fd83b73c2a661532d6780812144aeb44
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling this devicePixelRatio is fairly confusing: it merely serves as
storage for the last notified value for itemChange(), enabling to
decide if ItemDevicePixelRatioHasChanged needs to be sent. It has
nothing to do with the QQuickWindow's effectiveDevicePixelRatio,
QWindow's devicePixelRatio, or the device pixel ratio that is used for
rendering, those have their own ways to retrieve the scale factor.
Rename it to prevent further confusion.
Change-Id: Ibaf3d1a9b4f97f6e4e8cc9ce87c90e170715f632
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| |
|
|
|
|
|
|
|
| |
In preparation of deprecating/purging it from QQuickItem.
As a drive-by, remove a superfluous qquickpainteditem include, and move
it to the place where it is needed.
Change-Id: I42cda0a34bd5fd7b543790f75eb513303829139f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
QGuiApplicationPrivate::lastCursorPosition is initialized with qInf();
so before the mouse cursor has moved, attempting to convert to QPoint
is an error. QWindow::mapFromGlobal(const QPointF &) exists in Qt 6
so hopefully there's no reason to convert it anyway.
Task-number: QTBUG-45045
Task-number: QTBUG-52472
Pick-to: 6.2 6.3
Change-Id: I6ab651e874ed0af2f18735f8bd8eb374a4781bcb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
| |
We don't want it showing up as available in 6.0 and 6.2 in
plugins.qmltypes. Amends 18da655b77de70273e1aad7b9c2c4be74f5de91e
Pick-to: 6.3
Change-Id: I5f65f031d03af2fa7203deb8d81f3c2a00586dec
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The mapped_type of the QFlatMaps wasn't used at all, so don't maintain
a separate QList full of zeroes shuffled around with the keys, just use
an ordered QList of the keys.
Write a minimal wrapper around said ordered QList, because it might come
in handy elsewhere.
Change-Id: I502b0628d492da792db343ed6ef81b537c258007
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
| |
Pick-to: 6.3
Change-Id: I2209e43206258e8b3a118e011a9d1eb8e7a61bd5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Previously the foreign Visibility enum was not properly exposed
leading to it not being represented in qmltypes.
Pick-to: 6.2 6.3
Fixes: QTBUG-99311
Change-Id: I20d865328af6fe4d807e611cf69d496b3b574551
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
...because this is not just a simple getter but has to perform
checks about the validity of the QRhiTextureRenderTarget with regards
to the referenced texture and renderbuffer objects. Therefore, calling
it once is better than twice.
Pick-to: 6.3
Change-Id: I3e442c601d3a1ee3591d05c9a1dfe6ba4957e1ff
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
|
| |
|
|
|
|
|
|
| |
Amends 8c0b1e06d9679676d12ff92db981198077eeda76
Pick-to: 6.3
Change-Id: I82e0e10aece2870cc99144db6ba93a831919730e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
| |
It's new in 6.3. Amends 18794487a5bf303a60bda7047550048f7d38a86a
Pick-to: 6.3
Change-Id: I903b3e04091d7bce3217b90c23b823575bd9097b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Variable name lengths should be proptortional to their scope. QEvent
*e is ok for a 10-liner, but not for a 200+loc function. Adding to
that, e is a very generic variable name, and like i or it, often used
as the loop variable (_e_lement), incl. in this function, so rename
the argument to event.
Change-Id: Ic39ff0bf339343cbbe2bc0ff0b48052fcece2f14
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old code used the if (!find()) insert() anti-pattern, which
performs two lookups.
Since the old code appended pt only if no equivalent QEventPoint was
already in the mapped_type, itself a QList<QEventPoint>, we don't
actually need to care about find() - just use the index operator and
do the search for equivalent points in both cases. It won't find one
in a default-constructed mapped_type, so will append(pt) just like the
old code did, before insert()ing.
As a drive-by, name the lambda and use std::none_of. The code now says
what it does in almost plain English, and is more efficient to boot.
I love it when a plan comes together™.
Task-number: QTBUG-100091
Task-number: QTBUG-100092
Change-Id: I8837cae5391a4fe3967a9328d449890f5d9bed72
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the app expands a row in TreeView, that row will for a brief moment
be expanded in the proxy model, but not in the view, until the
view is polished. For that reason, when determining if a row can be
expanded or not, we should check the state of the proxy model, and
not the view.
Note: if the application needs the state of the view to reflect the
state of the proxy model immediataly after a call to expand,
forcePolish() is always possible.
Task-number: QTBUG-91374
Pick-to: 6.3
Change-Id: I5b85e0b5c3b32d17f93409153041df3fc2437424
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The first delegate after a section delegate would have the same position
as the section delegate, if the section delegate is invisible during
initialization.
In case the section delegates become visible later on during program
execution, the delegates would be re-positioned again in the
QQuickListViewPrivate::layoutVisibleItems function.
But this would not call setPosition for the first item (delegate).
It would only call setPosition for all delegates after the first one.
This would mean that the position for the first delegate would never be
updated, after the delegate was first created.
Solution:
Call FxListItemSG::setPosition() for the first item in
QQuickListViewPrivate::layoutVisibleItems, just like we're already doing
for all the items after the first one in the for-loop.
Fixes: QTBUG-94848
Pick-to: 6.3
Change-Id: I34a5ada336ab507b31e3675a1c11eba066fa139a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
| |
Follow up commit for QtBase 054b814daacdd0cd7ac470da73c8307a6edcd89e
Change-Id: I276f6be4bddee13f5979a16d5dc15f4eb01861d9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
| |
It is just in line with the other propertyCache() methods, and should be
treated the same way. The comment made no sense anymore. This allows us
to drop more engine pointers.
Change-Id: I2e9b479b555c7f771b619e4693d59cbfcf244df6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
| |
In QQuickItem, added an opportunistic std::move() as a drive-by.
Task-number: QTBUG-99615
Pick-to: 6.3
Change-Id: Ib9426ae7e749036541d5f97824800636b5ccfb5e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
It will be dropped from qevent_p.h.
Task-number: QTBUG-99615
Pick-to: 6.3 6.2
Change-Id: Id4eee3036a873f0e021b30a8d43b2c4df25dc53c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using a QFlatMap for an enum-to-object mapping when the valid enum
values are {0, 1, 2} is complete overkill.
A std::array<T,3> has both a more convenient API, and much more
efficiency.
Add some assertions.
Pick-to: 6.3
Change-Id: I6958302d1a7d0fd591e38efeea8291b3e9cc7212
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Use the static setters of QMutableEventPoint instead.
Task-number: QTBUG-99615
Pick-to: 6.3
Change-Id: Ibdaf485aff2c1638f500b708d61eeabd79836486
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given a TextEdit in a Flickable, when someone scrolls the text such
that the text cursor is completely outside the viewport, we want the
text cursor to be hidden. It is clipped if Flickable has clip: true,
which is better for "pixel-perfect" clipping, but has a performance
penalty. Anyway it still looked ridiculous in the case when clipping
is not turned on, to have a stray text cursor appearing on top of
some neighbor items, even though the text wasn't visible.
To have awareness of the viewport (such as Flickable) within which it's
shown, TextEdit has to opt-in with the ItemObservesViewport flag so that
QQuickTextEditPrivate::transformChanged() will be called; the question
is under what conditions. We already opt-in when the text is large;
otherwise we don't really want to have updatePaintNode() called so
often, unless other code opts in by setting that flag; because for short
texts, the old way is more efficient (populate all the glyphs from the
document into the scenegraph one time, and no need to update until
editing happens).
Task-number: QTBUG-83069
Pick-to: 6.3
Change-Id: Idd7cc9d2369d67b967eec50fe81964e6abe84e9c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A bug was introduced in 9db23e0e04906cf9ea33e23fa41f34955e5e6fe0 :
when scrolling backwards in some kinds of rich text, updatePaintNode()
failed to re-populate the nodes that had been scrolled out above the
viewport. That was because those nodes had been removed from
textNodeMap, and then firstDirtyPos was set from the first node in
textNodeMap. For some reason this didn't happen with the markdown
document that I was testing (maybe because it had a table and an image
near the beginning), but showed up when viewing an html document similar
to the one we ship with the rich text example. So now we iterate
backwards from textNodeMap.begin() when this happens, to find all nodes
in the current frame that intersect the viewport as rendered.
In the autotest we now use font.pixelSize in an attempt to make
the rendered text ranges more consistent across platforms in CI;
and we need to wait for the rendering to be redone after scrolling.
Pick-to: 6.3
Change-Id: I70ef54c8d8facc439b9a6f8b5cb8e3a4a1c37e16
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQuickFlickablePrivate::overShootDistance() was documented to take
velocity, but actually took the size (content width or height) instead.
When animated flicking occurs while handling wheel events, and we hit
the end-stop, we want the springy overshoot behavior to be proportional
to velocity, not always go to the max of 150 pixels.
But then the calculated velocity needs to be kept reasonable; so we
avoid updating the value if the time between updates is less than 2 ms.
This code is bypassed when the user is actually drag-flicking the
content, i.e. when the wheel events have phase() or when dragging via
mouse or touch.
Pick-to: 6.2 6.3
Fixes: QTBUG-99529
Change-Id: Ia9278c6fb14654d0a05b9679824ee7bdef4e219b
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The implementation is mathematically sound, but due to floating point
arithmetic the code would sometimes call acos with values very slightly
out of the valid [-1..1] interval. Using hypot and atan2 instead gives
the correct result.
Fixes: QTBUG-49049
Pick-to: 5.15 6.2 6.3
Change-Id: I0185514a63dc2c99cb67e1f9951aac0ac32b5fd8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|