Commit graph

23 commits

Author SHA1 Message Date
Olivier Goffart
8622dcb910 Do the default_geometry pass without inlining 2021-10-28 15:52:29 +02:00
Simon Hausmann
a318df522b Prepare for optional inlining
Even if we make inlining optional, there are *some* situations where we just
need to do the inlining anyway to avoid
needless complexity.
2021-10-28 15:52:29 +02:00
Olivier Goffart
9f3d02c319 Fixup previous commit
I got the condition wrong.

CC: #581
2021-10-15 17:20:10 +02:00
Olivier Goffart
19ce555d36 Don't hardcode ScrollArea's viewport size
The Flickable should already have sane default

But we need to make sure that the default binding don't override bindings
set with aliases. So we must use BindingsMap::set_binding_if_not_set which
sets the priority properly

Closes #581
2021-10-15 15:43:44 +02:00
Olivier Goffart
b42c187ed1 Refactor the way the two-ways biding are represented internaly
Don't put them in a fake expression.
This simplifies a bit the expression handling, and will make
possible to fix analysis that needs a vew into the aliases
2021-08-20 18:26:36 +02:00
Olivier Goffart
a5689a6389 Flickable: Ignore repeated child elements in geometry computation to avoid compiler panic
This fixes a panic but ideally, we should merge the layout info of each children

cc #407
2021-08-12 16:17:13 +02:00
Olivier Goffart
c25538c982 Normalize identifiers to - instead of _
As a result
 - The error messages will now show the error with `-` instead of `_`
 - The LSP will auto-complete with -
 - The interpreter's list of properties will list the property with '-'
   (but we made the change so that set_property, get_property, and so on
   work also if passed a '-')
2021-08-10 22:21:01 +02:00
Olivier Goffart
ba32777cab Refactoring: move the animation in the PropertyBinding struct
Since they always belong together.

This will help for issue #193
2021-07-23 15:25:53 +02:00
Tobias Hunger
35dd3ed282 Janitor: Remove redundant clone() calls 2021-07-08 20:43:38 +02:00
Olivier Goffart
a987b225b5 Collect all used components before inlining
And do some passes before inlining

We will need the list of components before inlining in order to generate
them if we disable inlining

So we can do some passes on each component before they are inlining

I tried to put the flickable pass in that list, but it did not work
if the Flickable itself is the root of a component
2021-07-07 17:58:43 +02:00
Tobias Hunger
e5bdeaa804 Janitor: Remove unnecessary & 2021-07-07 08:42:28 +02:00
Tobias Hunger
4be9ca7ffd Janitor: Remove useless () return types 2021-07-05 09:48:29 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Tobias Hunger
13d7f5e7bd Janitor: Fix typos in comments and user-facing strings
Also adapt tests for error messages containing the fixed strings.

No behavior change is intended!
2021-06-28 08:32:25 +02:00
Olivier Goffart
a97bcd5ae1 Use BTreeMap unstead of HashMap to store the bindings
Because the order is important to keep deterministic error and output
2021-06-18 21:47:00 +02:00
Olivier Goffart
ee00c9eb92 Rename maximum- and minimum- properties to max- and min-
Issue #259
2021-06-14 10:28:30 +02:00
Olivier Goffart
77b8bb615f Move some code in a new module 2021-06-01 12:50:29 +02:00
Olivier Goffart
54be5f3a84 Some ground work to make more binding analysis
- Mark builtin properties that are modified by the native code as output
 - Record wether the property is set by code in the .60
 - Add a field that will tell us if a property binding is constant
2021-05-20 13:40:51 +02:00
Olivier Goffart
d762642323 Use the builtin name instead of the native name to identify some of the elements 2021-04-12 18:51:31 +02:00
Olivier Goffart
366ce83dae Fix crash with repeater in a Flickable 2021-04-12 10:35:30 +02:00
Olivier Goffart
0c7a8fecb5 Forward the animation on the viewport properties to the viewport
Workaround for #193
2021-04-09 20:02:53 +02:00
Olivier Goffart
b45190ca2d Flickable geometry
Issue #192
2021-04-09 19:14:48 +02:00
Olivier Goffart
a712f515fa Make the viewport element of the flickable a real Element in the object_tree 2021-04-09 19:14:48 +02:00