| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Amends ae6dfc63668556e89057edb1b83de28d7554c5ef
Task-number: QTBUG-151040
Pick-to: 6.12
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: I438ca1b8e2de4fc05769f2d627c3d7edaefe94a0
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qmlSourcePathFromBuildPath() found the module through a clean absolute
form of the path, then cut the module's absolute directory off the path
as passed in. qmllint passes the linted file's path as given on its
command line, so linting a build-folder copy by a relative path with
--resource read past the end of the string and crashed, for example:
cd build && qmllint --resource .qt/rcc/qmake_Mod.qrc \
--resource .qt/rcc/Mod_raw_qml_0.qrc Mod/Main.qml
Cut the module directory off the clean absolute path instead.
Pick-to: 6.12
Assisted-by: Claude Code
Change-Id: I92c078e7c45274b1eeb61c648d64514430cee817
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
| |
Task-number: QTBUG-151040
Change-Id: I899b2c662e4de5bfe3f4db5af608dfb4a4ddcc93
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turned every file down. Two mistakes, each enough on its own.
What loadFile() hands its callback is the metadata about the file, of
which the file itself is a field, so the check that what was loaded is a
QmlFile was asking the metadata, which is an ExternalItemInfo and never
a QmlFile. Ask the file, the way the option that dumps the syntax tree
already does.
The index the loaded files are put at was never advanced, so every file
after the first was dropped and the slots they should have gone in
stayed empty. An empty slot is not a QmlFile either, which is the other
way the same message came out.
With both fixed it writes what qmlformat writes: --reformat over a file
gives what qmlformat --normalize gives, byte for byte, since the dom
writes the script of a file through the same formatter and the options
it reformats with are the normalising ones.
Amends 4cfb323389363bf12f84044b8c7501ef2f0441b9
Task-number: QTBUG-151040
Pick-to: 6.12 6.8
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: Ibb38e0f422ebdf8991dbbc45208acbc1e4abf036
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
|
| |
|
|
|
|
|
|
|
| |
A negative radius (or per-corner radius) now produces a concave,
"inverted" corner instead of the usual convex one, for both the Rounded
and Squircle corner shapes.
Change-Id: I258871293d7c42ea890692ad3c6ce17253312480
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
controls() and pageIndicator() moved the mouse to the exact (0, 0)
edge of the control under test. QQuickItem::contains() treats bounds
as (x >= 0 && x < width), so a position of QPoint(0, 0) has no margin
for error.
On platforms with a non-integer device pixel ratio (e.g. OHOS, DPR 1.9)
such a position is not delivered exactly. QTest::mouseMove() passes
device-independent coordinates, qt_handleMouseEvent() converts them to
native coordinates, and QWindowSystemInterface::handleMouseEvent()
converts them back by multiplying with scale factor (1/sf). For this
scale factor that round trip is not an exact inverse, so a move
requested at exactly (0, 0) can be delivered a fraction outside the
item.
Move the probe points from (0, 0) to (1, 1), so that the mouse
position lands on the control regardless of the sub-pixel rounding
error.
Fixes: QTBUG-150331
Pick-to: 6.12
Change-Id: I43e15558dc18636f60dd7a70a062c60a3fc17dd4
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`[1, 2, 3, 4, , ,]` is parsed with the comma that comes before the
trailing holes stored on two different nodes: on the ArrayPattern, and
on the list element that wraps those holes. The formatter wrote both, so
every pass over the file appended another hole to the array. That
changes the semantics of the expression.
Store the comma on the ArrayPattern only if it isn't already part of the
elision.
This also ensures missing spaces between commas in the array.
Amends d41f97e86702d8c5ac81a4246e1aab8dd965cbe4
Task-number: QTBUG-151040
Pick-to: 6.12
Change-Id: Ied05c0100210b0b2d06cf69a4fe55ee565239730
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Rename Expression to CommaExpression and Module to ESModule to better
express their purpose.
Remove unused kinds.
Task-number: QTBUG-151040
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: Icebd15cc791a4b39ceb3de62d53583a769fda4a7
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
| |
Task-number: QTBUG-151040
Pick-to: 6.12 6.8
Change-Id: I57586956dff6f83dfc947c1bd23eac5391b710d7
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a note to sortColumn and sortOrder explaining that sortByColumn()
should be preferred when setting both at run-time, to avoid sorting the
model twice. Also link sortColumn/sortOrder from sortByColumn()'s
documentation.
Change-Id: I035fb83d8293932ff596bdd33195d3d48016cfe9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Jerome Pasion <jerome.pasion@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.12
Change-Id: I3344b3f8f078ae50284486cb7db5e750943f3133
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
It is unused.
Amends 52d61e705ee606f3b673c757bdf253bdf6134a3b
Task-number: QTBUG-151040
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: I1c2ae8b1e2dadf50b8ff2d4021eb4e7029e5de94
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
gcc 14 has a well-known bug that causes false positive warnings when
move-assigning std::variant and std::optional. Here, we don't actually
need to do that, though. Handling the result in a dedicated lambda is
nicer anyway.
Change-Id: I8fb41d870e5391c21ff99e92c8b85784965cfd78
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
| |
Change-Id: I2cb13dd66cf3f3c82141eb5b18094edce9cacb11
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
| |
Add the necessary project file stanza that allows to configure the
benchmarks with qt-cmake-private.
Change-Id: If39ecade44205409a9412e462c3a4e15223d9950
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the QQmlJSScope in the test to check the file paths of loaded
dependencies, instead of using's the DOM dependency loading that will be
removed in a later commit.
QTBUG-150842 aims to remove the DOM dependency loading code, including
the code that processes the imports and that loads the .qmldir of
imported modules when opening a .qml file in the DOM.
Task-number: QTBUG-150842
Change-Id: I590ad5824c66be5e4e8de75705f6fbf3cf76950f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
| |
The function is unused now, remove the implementation and the tests.
Task-number: QTBUG-150842
Change-Id: Id80d4e05e2e0c7070bcc057794dd194486091aad
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can use the information from the QQmlJSScope instead of the DOM
importing code for findTypeDefinitionOf, so rewrite it with QQmlJSScope.
This might allow a future commit to get rid of the DOM importing and
type resolution code which only seems to be used in QQmlLSUtils.
Adapt the test, as the QQmlJSScope information is a bit different, for
example instead of returning the location for 'C', we return the
location of 'Item' when jumping to an inline component like:
component C: Item { ... }
I believe the small difference of location won't affect the user too
much.
Remove the functionality and the test for the "go-to-type-definition" on
a method name that goes to the type definition of the return type, which
is not really intuitive.
Adapt the tst_qmlls_modules tests to expect the new location end ranges,
for example we return the location of the `Item` on line 3 instead of
returning the entire location from line 3 to 10 of the Item in Zzz.qml
Task-number: QTBUG-150842
Change-Id: I3659921f04518b5e02338e57676b1010b996c8b0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Follow the alias in the qrc to also find renamed files.
Fixes: QTBUG-150919
Pick-to: 6.12 6.11
Change-Id: I7e8da3beefeefe732c2ad92b74a58e88d794777e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
| |
Change-Id: Ied9e7033144d3f4b0a8f4d9e7a7ccbf90ed618f6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since qtbase's 88e3ceb05106d69746fb9d0528b4c4f8df417e9a,
QUrl::toLocalFile() returns a null string if the fully decoded path
would contain a NUL or a percent-encoded directory separator (%2F, or
%5C on Windows). The type loader passed that empty file name on to
isResource(), which asserted when trying to read its first character.
Fail the load with a proper error instead. Adapt the Loader tests that
relied on %2F being decoded into a directory separator, and fix the
url documentation example that encoded a whole path with
encodeURIComponent().
Amend the documentation for percent-encoded characters in URLs to
highlight the problem.
[ChangeLog][QtQml][Important Behavior Changes] Local file URLs whose
paths contain a percent-encoded slash (%2F), a percent-encoded NUL
(%00), or, on Windows, a percent-encoded backslash (%5C) cannot be
loaded anymore. Previously such a %2F was decoded into a directory
separator after URL resolution and normalization had already happened.
Therefore, "%2F..%2F" sequences could escape a directory that a URL
had been checked to be contained in. As specified in RFC 3986 and in
ECMA-262's URI handling functions, a percent-encoded slash represents
a literal "/" character inside a path segment, not a delimiter.
encodeURIComponent() is meant to be used on individual URL components,
and decodeURI() deliberately does not decode %2F. A literal "/" can't
be part of a file name, so such URLs don't denote any local file.
Chromium rejects such file URLs for the same reason. If you build file
URLs from paths in JavaScript, apply encodeURIComponent() to each path
segment separately, not to the whole path.
Pick-to: 6.12 6.8
Fixes: QTBUG-150898
Change-Id: I0ba5158f7ccab4f57850f4a5524dab051c6e9287
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VectorImage uses either the QML Generator or Item Generator as
backend; settable on application level. For baseline testing, it is
useful to set the choice on individual VectorImage items. Implement
this through a special custom property.
As a driveby, add a checkered background image to the qmlscenegrabber,
which may be used in test scenes.
Pick-to: 6.12
Task-number: QTBUG-150931
Change-Id: I557c6f359d3874d4c86205be92a6083d3622413a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Once the QML scope object or the context object is gone, a name that
was found on it is not defined anymore. The uncached QML context lookup
throws a ReferenceError then, and so does the code qmlcachegen
generates. The cached QML context lookups for properties and methods of
the scope object and the context object, however, silently yielded
undefined, and the function went on.
Therefore, a function compiled by qmlcachegen behaved differently from
the same function run by the interpreter or the JIT once the lookup had
been cached: The compiled function aborted while the interpreted one
continued with undefined and caused whatever side effects came after.
Throw the ReferenceError from the cached lookups, too.
Pick-to: 6.12 6.8
Change-Id: I755e04c2158abf0c2a3e234564722155ba583d9f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The backgrounds of the ComboBox and SearchField delegates read the
delegate's properties unqualified, through the delegate's context. When
the model is cleared, the delegate model releases the delegates and
clears their context object first. The count change that follows still
updates the delegates' own isSingleItem, isFirstItem and isLastItem
properties, which in turn re-evaluates the backgrounds' bindings. Those
can't find the names anymore then. Depending on whether the lookups were
cached before, they either throw a ReferenceError or read undefined.
Qualify the accesses with the delegate's id. The id stays valid until
the delegate is actually deleted.
Pick-to: 6.12 6.8
Change-Id: Id7e87d332f795135963e1c0465b3e43260d56479
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.12
Change-Id: I09f75b8eab46ae5b640eec8b0d4c51ec45ecfbdb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
| |
They cause warnings when generating Qt for Python documentation.
Pick-to: 6.12
Change-Id: If09df5b2523b3097ed9ce9253d46b3f4cf5ce60c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A view with delegates of varying sizes keeps correcting its
contentHeight estimate while the handle is being dragged, which changes
the mapping from the ScrollBar's position to contentY. offset, the
distance between the handle and the pointer, was taken once in
handlePress() and never recalculated, so the content jumped against the
direction of the drag after every correction.
Recalculate offset whenever something other than the drag moves the
handle or changes the size while it is pressed. An attached Flickable
writes the drag's own position back through visibleArea, so such a write
is recognised by value: a position equal to the current one has moved
the handle nowhere.
The handle may still move and resize as the estimate is refined, which
is expected; only the content is kept following the pointer.
[ChangeLog][Controls][ScrollBar] Dragging the handle of a ScrollBar that
is attached to a view whose delegates vary in size no longer makes the
content jump as the view refines its content size estimate.
Task-number: QTBUG-130890
Pick-to: 6.12
Change-Id: I62447df8c43051896dc71f61263295f8a5acb7ac
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A ListView section item can outlive its creation context, for example
when the model is reset while the view is being laid out, or when the
view is being torn down while a contentY animation is still running.
The next call to setSectionHelper() then dereferences a null
QQmlContext: QQmlContextData::get(nullptr) reads QQmlContextPrivate at
offset 8, which crashes with an access violation.
Skip the update when the context is null
The section may keep its outdated label until it is released and a new
section item is created with a valid context
Fixes: QTBUG-130819
Pick-to: 6.8 6.12
Change-Id: I8be5b3073fdceda878014cf5c1cf136778691270
Reviewed-by: SanthoshKumar Selvaraj <santhosh.kumar.selvaraj@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The built-in Qt Quick Controls styles draw the DelayButton progress as
a thin line along the bottom edge of the button. The StyleKit fallback
style, and the example styles, instead let the progress fill the whole
background, which ends up looking out of place - especially for styles
such as Vitrum.
This patch changes the fallback style to give the indicator a fixed
height and bottom alignment, so that the progress is drawn as a thin
line, using the accent color as foreground. The example styles are
adjusted on top of that, and mostly only need to tweak the height,
margins and colors. Plain can drop its delayButton section altogether
and use the fallback appearance as-is.
Pick-to: 6.12
Change-Id: I5ccc984e2e55e778f8c8ac42019d69d5a1db02d4
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Dilek Akcay <dilek.akcay@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TreeViewDelegate styles show the display role in a Label and leave
the text property empty, so a tree item had no accessible name. Now that
accessibility focus follows the current cell, VoiceOver on macOS
announced each item as just "text", because the bridge maps ListItem to
a static text element.
Name the delegate after the display role and ignore its Label, so an
item is read neither as empty text nor twice. This covers the Basic,
Fusion, iOS and Material styles, and the native style that the macOS
style uses.
This patch and its commit message were developed together with Claude
Change-Id: Ie7136e943e0eec9a8954a06750aaf36ea383bfa3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The item generator passed the animation provider individual members
rather than the objects holding them, so the provider could not tell
which timeline a node or an animation belonged to and had to use
whichever scope happened to be current.
Pass the owning objects, so that the reference travels with the data.
Task-number: QTBUG-147709
Change-Id: I6a256027e8dd8ccf1b53b33b8c2c690071cab64a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Keyboard navigation moves the current cell of a TableView, but screen
readers did not follow it. TableView is not an accessible item, and its
cell delegates do not take focus while navigating (only the edit
delegate does, while editing), so assistive technology never saw a
focus event.
Send a focus event for the delegate of the current cell while the view
has active focus, also when that delegate is only loaded after the
current index changed, and again when an edit ends and focus returns to
the view. Add QAccessibleQuickTableView, whose focusChild()
returns that same delegate, for platforms such as macOS that ask the
window for the focused element rather than act on the event.
Name the Basic TableViewDelegate after the display role and ignore its
Label, so a cell is read neither as empty text nor twice.
This patch and its commit message were developed together with Claude
Change-Id: Id42e994ad470abe8d4b0af4a7cc8e4c5611677e7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Text elements write out a warning if the pointSize is
set to 0. And when using StyleKit, this can happen if the
property is evaluated before the Style and Theme has finished
loading (and then it will be corrected). To avoid such a
warning, return the default pointSize until the Style and
Theme is ready.
Pick-to: 6.12
Change-Id: I1fd5db7e350cbdc1ddcd5e1ee53db90e94941c4f
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
SetLookupSloppy and SetLookupStrict return nothing, but the JIT
retrieved their result into the accumulator. The accumulator then held
whatever the call happened to leave in the return register, and the
next instruction that stored it into the frame exposed that garbage to
the garbage collector. Restore the accumulator after the call instead,
like the interpreter and StoreProperty do.
Pick-to: 6.12 6.8
Change-Id: Ibd4a48543367208ad9cb886fd740c637e7d41961
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were two issues:
1) QQuickParticleData::lifeSpan was assumed to be in milliseconds (like
the user facing Emitter.lifeSpan property), though it is in seconds.
2) Infinite particles are kept alive in prepareRecyler() by
periodically calling extendLife(), which advances the particles virtual
birth time in CPU memory. However, this was never propagated to the GPU
vertex buffer.
Fixes: QTBUG-121913
Pick-to: 6.12
Change-Id: Icd9124d597a6a8b14cad4da6446f92fc1cd5392e
Reviewed-by: Thomas Senyk <thomas.senyk@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drag.dragType: Drag.Automatic goes through QDrag::exec(), which blocks in a
nested event loop. Anything happening inside that loop can destroy the item the
Drag attached object belongs to -- a ListView recycling the delegate that is
being dragged is enough, which is what auto-scrolling during a drag does. Both
the QQuickDragAttached and the QDrag are QObject children of that item, so they
are deleted with it, and every line after exec() in startDrag() then runs on
freed memory: the reported crash is in the dragFinished() emission.
~QQuickItem notifies its change listeners before ~QObject deletes its children,
so that is the last point at which the drag can still be wound down by an object
that is still alive. Listen for Destroyed for the duration of a native drag and
do it from there: cancel the platform drag, which unwinds the nested loop and
delivers the drag leave that the drop target is waiting for, then report the
drag as finished and inactive. Guard the QDrag and the attached object itself
across exec() for whatever gets there first.
Nothing here knows about item views, so it covers TableView, PathView, Repeater
and plain delegate models as well, and any route to the item's destruction
rather than only recycling. It does not try to keep the item alive; an
application that wants the drag to survive can still use
ListView.delayRemove: Drag.active.
The new test drives the nested event loop, which needs a QPlatformDrag that runs
in-process. It therefore runs on the offscreen platform, and skips if that
platform's drag implementation is a stub.
Fixes: QTBUG-124663
Pick-to: 6.12
Change-Id: I51c6719bcc9ea0e381a314f68f2f335caa96e616
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The code uses computed goto and other such weirdness, so it's unclear
how it can be shrunk. Suppress the warning, to be able to make
progress on the rest of Qt.
Pick-to: 6.12 6.8
Change-Id: Ibaefc299cca9a22a02e92c65087c2053a8aaecae
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
QFont::resolve() returns only the left-hand operand's resolve mask,
unlike QPalette::resolve() which ORs both, so each step of the fallback
chain in updateThemeFonts() collapsed the accumulated mask down to the
nearest layer's. Setting fonts.system.bold in a theme therefore produced
a font still holding the style's family and pointSize as values, but
with a mask claiming only Weight. To fix, set the resolve mask to the
union explicitly.
Pick-to: 6.12
Change-Id: Ib802a8ce3d8a5760bc9639631080a25d5e2658df
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A font property defined in a theme or style persisted to some widgets
even after switching to a different theme/style. This was because
unsetStyleFont() reverted against QWidget::font() whose resolve mask
also covers inherited attributes. Since when switching style/theme
we walk QWidgetPrivate::allWidgets in no specified order, a widget
can be reverted while its ancestor carries the old font, so those bits
get written backs as a locally set font so next time setStyleFont()
is called, it captures them as baseline font. To fix, use
QWidgetPrivate::localFont instead which has the direct font resolve
mask.
While at it, remove the check in setStyleFont() which guarded
setFont() on QFont::operator==, which ignores the resolve mask, making
the widget's mask depend on whether the values happened to coincide.
setFont() already no-ops when the the font is unchanged.
Pick-to: 6.12
Change-Id: I2c249dc4a02e3b957b5b490a7da600432787c2a2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Follow what the Quick side already does and don't include foreground
sizing and margins when determining indicator size.
Pick-to: 6.12
Change-Id: I7a264ee297c89513674fa858834b69c65985d747
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
QStyleKitStyle supported only ":" paths in the local file system.
However, adding support for "qrc:" paths as well allows passing the
path to a style file in a compiled QML module, speeding up startup time.
Therefore add support for this schemes to not limit users that want
compiled QML. For symmetry, since we now are supporting qrc: paths,
support "file:" paths too.
Pick-to: 6.12
Change-Id: I0c58c5e09a9c514a6e48a54c7dd65c70b22c79ee
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Quality of life: When we switch the current directory using the
combo box instead of the file dialog, we did not push it to the
top of the recent directories list and thus when we started the
application the next time, we would revert to the previously
selected directory. This small improvement saves some time having
to reselect the same directory every time you run.
Pick-to: 6.12
Change-Id: I8e32218af48f29b8b7f22744364c77d658d73b21
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
|
|
|
|
|
| |
Task-number: QTBUG-147270
Change-Id: I33c6fc8cc823c1e15fa0451ad1b213aa4471f39e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
b0b1c1de68a1cc15f6304bb85d0c57a49499f866 ("QQuickItemView: register
Destroyed listener when storing an item") added a loop at the end of
~QQuickItemView that walks unrequestedItems and dereferences the stored
raw pointers to remove our Destroyed listener from each item. This is
only safe while every entry points at a live item. The listener is what
keeps that true: when the item is deleted, it calls itemDestroyed(),
which removes the entry from the hash.
releaseItem() can break that invariant. An item stored with isClearing
== false gets both the entry and the listener. Releasing it again while
the view is being cleared (isClearing == true) removes the listener but
leaves the entry, so itemDestroyed() never runs for it and the entry is
never dropped. Once the item is freed, the destructor loop dereferences
a dangling pointer, causing a use-after-free crash.
For instance, deactivating a Loader that hosts a ListView invalidates
the delegate contexts synchronously while the deferred delete is still
pending: the delegate ends up in unrequestedItems, and its
currentItem/visibleItems twin is released again during clear(true).
Remove the entry from unrequestedItems whenever the listener is removed,
keeping the two in sync so the destructor never walks a freed pointer.
Fixes: QTBUG-150769
Pick-to: 6.12
Change-Id: Ide32473f3fea373749197c969eaff6d13869c32d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
| |
Change-Id: Ie46e7a85634e13d888fe3808f4ef5f08493b1c9c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the pre-generated distance field cache spans multiple textures,
then the bottom most glyphs will expand beyond what is reported as
the maximum texture size, due to a hot fix made for QTBUG-76528.
When fixing QTBUG-149508, a stronger restriction was added on the
glyph rects, ensuring that they do not expand beyond the texture.
This was to protect against malformed qtdf tables and the main
purpose was to keep the values from overflowing into negative
numbers.
Checking the height against maxSize * 2 instead ensures that we also
accept glyphs that expand beyond the texture size while keeping the
fix for QTBUG-149508 for any reasonable texture size.
This adds tests for both QTBUG-149508 and QTBUG-150766 to ensure
both problems are covered.
Fixes: QTBUG-150766
Change-Id: I59e793b6bee32f83999f597c92275ddbdba1bd38
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit c2a8d0ff939122a5c1e8e6c5c59dae53c7b30389)
|
| |
|
|
|
|
| |
Pick-to: 6.12
Change-Id: I5d846bbe13babc1001d12a1230513cc59fca6f8f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
474a84312a06c427dee4e248bb85ac2c460a3a71 intended to disable mnemonics
for macOS. However, it defaulted QQuickMnemonicLabel::m_mnemonicEnabled
(and QQuickIconLabel::m_mnemonicEnabled, which just forwards it to
QQuickMnemonicLabel) to QPlatformTheme::MnemonicsEnabled, which is
false for macOS. The property's value controls whether the & is removed
or not: if true, it is removed, but whether it's underlined is
still controlled by QPlatformTheme::UnderlineShortcut. If false,
the & is kept.
This patch fixes the issue by simply defaulting m_mnemonicEnabled to
true, and leaving it up to ItemDelegate and derived types to set it
to false.
Fix the test so that it actually tests this, as before it was relying
on the platform theme hint.
Task-number: QTBUG-73087
Change-Id: I176d167116958296fb5d8e6777048d6203018a4e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rowCount() and columnCount() guarded against a missing source model
with !d->model. Since 74eeda555f569b6ddd2f5f0937fbff80591db143 ("Use
sourceModel property in the QML SFPM instead of model"), that is
QAbstractProxyModelPrivate::model, which holds
QAbstractItemModelPrivate::staticEmptyModel() rather than nullptr when
no source is set, so the guard never triggered. create_mapping() checks
sourceModel(), which does return nullptr for the empty model, and
asserts.
index(), headerData(), setHeaderData(), insertRows(), insertColumns(),
removeRows() and removeColumns() had no guard at all, so they hit the
same assert.
Check sourceModel() in all of them. Add tests for querying a proxy
that has no source, and for a proxy whose source is another proxy that
has no source of its own.
Fixes: QTBUG-150555
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Change-Id: Ia05a32337e718389f20d7be90d381883252342d5
Reviewed-by: SanthoshKumar Selvaraj <santhosh.kumar.selvaraj@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Types in a namespace are fine, as long as they are uppercase.
Completes 0b6d25e0213c0d1831faf0d9bb54bade6a3145c2 which introduced the
warning.
Pick-to: 6.12 6.11
Change-Id: I576b9382366a743fd45e37c08b845fc062df3cdf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|