| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
That's not uncommon at all, and we don't need to convert the value back
and forth for it. If we have a metatype/void* representation already, we
can just create a QVariant from that and forward it to
writeValueProperty(). Even the QVariant is unnecessary, but that will be
resolved in a second step.
Change-Id: Ideae979a73276c9fba1bc19c10d799b8fe59dde5
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
| |
Change-Id: Ie06b029850b74e98d6d6e38b480cedef4e481691
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
To be in line with the behavior of the old bindings, we have to call
reset, even when the binding was undefined before.
Add a test which checks this behavior for both new and old types of
properties. Amends d64e7c9c6cd172e426b9bb2c5e45fda5e6a5bfb2.
Task-number: QTBUG-91001
Pick-to: 6.1
Change-Id: I1067a2fd56d5b7587281a9262e9bd389c825e587
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQmlCore] Added QtCore QML module. Currently this only
contains the StandardPaths singleton, but in the future could expose
lots of useful types from Qt Core to QML.
Fixes: QTBUG-92806
Change-Id: Ib99e2c5512ee04d6af1322f985fc9da965cf13a4
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
| |
A QQmlProperyBinding created this way does not have a bound function.
Change the constructor to take the enum instead of a simple bool to make
this error to be less likely in the future.
Change-Id: Ifee47c98c8aab24670c289e923a8e5e28fdf8c2c
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Note that it doesn't necessarily need a namespace; mention that it
however requires the "namespace" and its contained enums to be exposed
to the metaobject system to work.
Moreover, add a minimal code example.
Pick-to: 6.1
Change-Id: I814c65b2b59747f902f2291e2f98962eb98d4d59
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
| |
Capturing of `this` via `[=]` is deprecated in C++20. Be explicit.
Pick-to: 6.0 6.1
Change-Id: Ic3b0a14c8eea83afbd17e97a2e3cdefbce045ff2
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-92966
Pick-to: 6.1
Change-Id: I9acdb0d624a0950f9e28c6463530b27d282123e2
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
| |
Task-number: QTBUG-92448
Change-Id: Ic6305f05cb8a0af5c36ac03d8b541ac78cea0612
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
| |
Those are mentioned in the qmltypes. They should be available.
Change-Id: I934f2b2282dfbee903d7b53b1e5ab0ca6ca46368
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
| |
If we already know the property cache and data we don't have to look
them up again in captureProperty(). Such lookups can be expensive.
Change-Id: I94553260311912c5acee3105295f124721203e01
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case the window's main scene and a subscene both contain handlers,
and one of the handlers in the main scene takes a passive grab on press,
we don't want to lose it while we are delivering to the subscene.
For example in Qt Quick 3D's dynamictexture example, if you click on
one of the doors, the TapHandler in the View3D grabs on press;
but the door also has a 2D subscene, which allows dragging (either
dragging one yellow note item, or flicking the ListView). If you
drag, the TapHandler does not detect a tap; if you tap, nothing gets
dragged. So this is an example of a cooperative scenario involving
multiple DeliveryAgents at the same time: a passive grab can occur
in the main scene, an exclusive grab can occur in the subscene, and
they don't interfere with each other. But if we clear the passive
grab while delivering to the subscene, the TapHandler does not get
a chance to detect a tap. So we should do that only once, when
the window receives the press event.
Amends 68c103225f4e8bd6c1b18ef547108fd60f398c0f
Task-number: QTBUG-92944
Pick-to: 6.1
Change-Id: I9f064764a17b1efe758909f61fca6658f65d43e5
Reviewed-by: Andy Nichols <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Previously parser warnings (i.e. inline components having lowercase names) were treated as errors.
Because these were not handled properly this also resulted in the QQmlComponent with the warning never becoming ready.
This resulted applications hanging instead of terminating.
Pick-to: 5.15 6.0 6.1
Change-Id: Ia5ad3b54edc1b94dd94d0bf771c3494691abec71
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
| |
Pick-to: 6.1 6.0 5.15
Change-Id: I18c38037cd635fa3300c761b16038b67ac3b0d74
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Since this is no longer supported, it is removed from the docs
Pick-to: 6.1 6.0
Change-Id: Id23716594e6ea9fd3d05d88a2586d380d1db09db
Reviewed-by: Paul Wicking <[email protected]>
Reviewed-by: Nico Vertriest <[email protected]>
Reviewed-by: Laszlo Agocs <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
We don't need to go through all the metatype construction, conversion,
and destruction if we know that both the expected and the actual return
types are QObject pointers. We can just check if they're compatible and
assign if they are.
Change-Id: Ic5ab13536cf2e0e2a982ed9a9be81eb5927e85c2
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Besides API changes, we need to
- adjust QQmlBind to unlink the binding properly (that probably was
broken already before, but did not cause issues so far, as the old
binding would not have been evaluated without a read access) and
- skip tests in tst_qmlcompiler_manual, as the bindings are executed
before the engine is correctly set.
Change-Id: I97b0ac32b428c1a033664fe8593effadb69cd348
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
| |
We only ever need it to retrieve the QQmlEngine. However, resolving the
context can involve an allocation.
Change-Id: I064fd528fa7ab9bd37043c5dd1c62d17ea9380e3
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
| |
Document parameters with \a, and link to other members correctly.
Pick-to: 6.1
Change-Id: I3529aa96fff0e5b78faa7438f40dc217de7b6262
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Now qmllint will also warn when functions have a Deprecated annotation which previously only applied to properties and elements.
Task-number: QTBUG-84895
Fixes: QTBUG-79857
Change-Id: Ie1436822dc06bfd1ee4305a8468900409c3f8b0a
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
| |
Change-Id: I2da9712201f3057b4d20aa0176716442d69d0ab9
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
| |
The '### Qt 7' comment between documentation and function definition breaks
qdoc's matching logic, so put the comment above all that.
Pick-to: 6.1
Change-Id: I4a6786422d8c30a257f09d630351a878c64bd377
Reviewed-by: Shawn Rutledge <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
The position of cursor delegate needs to be updated when we change
padding, otherwise it will be in a wrong position.
Fixes: QTBUG-91867
Pick-to: 5.12 5.15 6.0 6.1
Change-Id: I89ca84fe893ebf517ab67890196eede14a4055d7
Reviewed-by: Shawn Rutledge <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was trying to get by with setFocus() but that doesn't always work,
in cases when the item's d->focus flag is true (leftover state) but
it doesn't actually have focus anymore after a reparenting scenario.
Item.focus represents the intention to be focused when possible, and
does not necessarily change due to environmental circumstances, such as
having its parent reparented. QQuickItem::setFocus(true) returns early
if the new requested focus state is the same as the stored d->focus;
so it was not enough for foceActiveFocus() to call only setFocus().
In the bug, TextInput and Loader both get stuck in the state
d->focus == true, so forceActiveFocus() did not do anything before.
Pick-to: 5.15 6.0 6.1.0 6.1
Fixes: QTBUG-89736
Change-Id: Ib7f4caccf81b60a02e2655332b64efba4d1fd7cf
Reviewed-by: Richard Moe Gustavsen <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Amends ca06d488f3c5d899c008b431f6939793813243cb. count was already
documented.
Pick-to: 6.1
Change-Id: I2f79d132f29ae03f03dd7204ea09e4841971d650
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
| |
When the position was restored with setPosition() in many cases the window size was invalid leading to a false "preview position is out of scope" warning.
Task-number: QTBUG-83391
Change-Id: I8cdbc7701585b3cce526998fcdd25ed3c16fecbc
Reviewed-by: Tim Jenssen <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qmltyperegistrar used to omit change signals from qmltype files if they
had neither a version nor arguments.
This does however cause issues with the semantic analysis of signal
handlers, who in this case would not find the matching signal. Instead
of adding additional logic in qmllint and any other place which might
need that information, we now simply write out those signals, too.
Pick-to: 6.1
Fixes: QTBUG-92372
Change-Id: Iaa6137c5d45f94e4874dc285e23a24f9c8319bb6
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
If a class using a future revision is registered for a module this can cause unforeseen consequences
such as unintentionally bumping up the default version for unversioned imports.
This has caused (among other bugs) the issue described below.
Task-number: QTBUG-92861
Change-Id: I53e9e475ec2bc711c4a6e45900491364f7243f8f
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
| |
Makes it easier to reason about the values stored in QQmlJSAnnotation.
Change-Id: I13bf8294a25f00edf78fad3b2b91fbc7a313d49e
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This way it actually generates interesting data about the JavaScript
types, for example the functions of the String prototype. Add a helper
method to create a symbol to QJSEngine. This should be generally useful.
Change-Id: I6c7b253b9d6cdb61602ceeae0955aed8d942c139
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nameForObject() should not search the linked contexts. Linked contexts
are not reachable from the "head" context in QML. However, it should
search context objects, just like contextProperty() does.
[ChangeLog][QtQml][Important Behavior Changes]
QQmlContext::nameForObject() now finds properties of context objects,
but it does not search unrelated other ("linked") contexts anymore.
Change-Id: Ic6e01fddf3e2d4b3a1bc7308e126f47fae7cd6d1
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
| |
This is the reverse of nameForObject(). We don't need to wrap id'd
objects in QVariant just to unwrap them again at the call site.
Change-Id: Ie1c5382af33b5c05b0b931fcc5bcf8d232d27c21
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
| |
Change-Id: I9c5cb83ad45b7af7060fee2fed593da7efae7158
Reviewed-by: Volker Hilsheimer <[email protected]>
Reviewed-by: Shawn Rutledge <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION, so that the
repo project version is used in a top-level build, rather
than the version of the qt5 project.
Pick-to: 6.1 6.0
Task-number: QTBUG-92861
Change-Id: I5a7a09baf81353558e512800746ac24e8e8b9a47
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
| |
Most of this can be inline, and we never need to copy the actual
identifier hash.
Change-Id: I6468b6b1a571e4854c00c865a2aa57c3b2f0ca8c
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
| |
Change-Id: I176a5b166bcdfdbfc13987d9f1d4a89e2e3d47b6
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
| |
Change-Id: Ie385488133838fcbea8f848f595f45511a341fe0
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
| |
Change-Id: I12073e43b34d7c72b441aaf081e4210a3161b4e8
Reviewed-by: Alexandru Croitor <[email protected]>
|
|
|
|
|
|
|
| |
We want the "context" name for other things.
Change-Id: I9dcc88a9a7c7f5e8c495ee29f57e2c9d15c4990f
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
| |
Change-Id: Iddcb4ce6859fb433f57e6449630dae39dd8e85f4
Reviewed-by: Andrei Golubev <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Visit UiObjectBinding shouldn't create any properties, otherwise we end
up having invalid QQmlJSScope state in cases with attached properties
(and maybe somewhere else)
property QtObject prop: QtObject {...} is parsed as two AST elements:
1. As UiPublicMember, which handles a property definition
"property QtObject prop" (and, consequently, creates the property)
2. As UiObjectBinding, which handles a property assignment
"prop: QtObject {...}"
As a drive-by, refine the endVisit(UiObjectBinding *), which sets
the property type. Now, only update the property when property
already exists and when the new property type has the same type
hierarchy (in other words, property type must be a base of a new type).
At the moment endVisit() issues an error if either of the
preconditions is not satisfied
Test the fix through tst_qmllint
Change-Id: I149090ffe46ae86268dd2c3b0ec3713b6bde0627
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
| |
We should not crash when you try to call them on the wrong object.
Rather, throw a type error.
Pick-to: 6.1.0 6.1
Change-Id: I1b146d9c77d838e013408988e02a65a623641f1f
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Also this fixed "property type checking" for qmllint
in case of QML code like "property double xyz"
Fixes: QTBUG-92566
Change-Id: Ice33be4287ce0eba2cf9dfaabb760406bdca02b7
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
|
| |
The bytecode format has been changed, as two new instructions were
added. Amends 5f7ecce23321f499b1b002c32a27c63815535baa.
Change-Id: Ie81651a48eec38b014e3bc859cc8ecb0cf8396d0
Reviewed-by: Maximilian Goldstein <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
|
|
|
|
|
|
|
|
| |
Dumper for AST and support for comparison of AST trees.
Derived and improved from test shared AST dumper.
Change-Id: Ica4d30a1ca3b430ce0971b479b35048bed5d73d2
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* introduce function_ref to represent a reference to a function
and use it consistently
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0792r5.html)
* restricted errormessage levels to those of QtMsgType
* made path iterate on its segments
* made path methods mirror the DomItem methods, so that path
construction and access are similar
* AttachedInfo to keep the location information
* SourceLocation::combine
Change-Id: I152c4cc2c601e867f205a4f4b7b3f24884d60ad9
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
| |
Change-Id: Ie5a229d7e62d8df356359094e7e6d38530672a43
Reviewed-by: Fabian Kosmale <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a set of functions that can be used to query both the actual
row and column sizes, but also what the implicit sizes are.
The implicit size of a column is defined as the maximum
implicit width found among the items in that column.
This implicit size is just a recommendation that can be used
by e.g HeaderView to resize a column to perfectly fit
the contents.
[ChangeLog][QtQuick][TableView] Added API to query row heights
and column widths: columnWidth(col), rowHeight(row),
implicitColumnWidth(col), implicitRowHeight(row).
Fixes: QTBUG-92124
Change-Id: Id8adbd558dab670d4d1c0bb268105b56b898b72a
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TableView needs an API that lets you check if the
delegate items inside a row or column is available
for iteration from within the columnWidth/rowHeightProvider.
This is especially needed since we call the providers
several times when loading a new row or column - once
to figure out if it's visible, and another time later,
to get the width to use for layout when the items
are loaded.
[ChangeLog][QtQuick][TableView] Added API to query if a
row or column is loaded and available for iteration:
isRowLoaded(row) and isColumnLoaded(column).
Fixes: QTBUG-92151
Change-Id: Iad0c9953a794bb6464b973f79e18826b4727fb47
Reviewed-by: Mitch Curtis <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change implements optional chaining (https://github.com/tc39/proposal-optional-chaining) by adding a new type of optional lookup with an offset to the end of a chain.
If `undefined` or `null` is encountered during an access marked as optional, we jump to that end offset.
Features:
- Full support for all kinds of optional chain
- With some codegen overhead but zero overhead during normal non-optional FieldMemberExpression resolution
- Properly retains this contexts and does not need to resolve anything twice (this has been an issue previously)
- No extra AST structures, just flags for existing ones
[ChangeLog][QtQml] Added support for optional chaining (https://github.com/tc39/proposal-optional-chaining)
Fixes: QTBUG-77926
Change-Id: I9a41cdc4ca272066c79c72b9b22206498a546843
Reviewed-by: Fabian Kosmale <[email protected]>
|