Commit graph

13 commits

Author SHA1 Message Date
Olivier Goffart
df7b98ae4d Fix crash in change callback evaluation
Revert part of fd993d0b52
Only keep the change in `evaluate` to fix the leak.
We can't destroy the nodes in mark_dirty as destroying them while
iterating lead to crash
2025-06-25 09:32:20 +02:00
Olivier Goffart
fd993d0b52
Fix memory leak with change handler
The dependency nodes would be leaked.

(This was particularly bad for the ones from the Flickable's bounds
change tracker since that one has many dependencies, while most change
tracker only have one)

Fixes #8768
2025-06-24 16:41:52 +02:00
Olivier Goffart
1bd5183629
Fix UB when a change tracker gets deleted as a result of that change tracker evaluation
Some checks are pending
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / build_and_test (--exclude bevy-example, ubuntu-22.04, 1.82) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, --exclude bevy-example, windows-2022, 1.82) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.82) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
Don't drop the ChangeTracker's BindingHolder if it is currently being
evaluated as we still need it later.

There was also a bug in DependencyListHead::clear as it was not properly
updating all the field, and the use of for_each was problematic if nodes
gets delete as we iterate.

Fixes #8741
2025-06-23 16:39:03 +02:00
Olivier Goffart
214d7fbea2 Flickable: add a change event handler to keep it in bound when geometry changes
When either the viewport gets smaller or the Flickable gets bigger, we
should move the viewport position to keep it within the bounds.

Fixes #7487
Fixes #2227

(Also workaround #8147 as the ScrollView will automatically go back in
bounds)
2025-05-23 10:04:00 +02:00
Olivier Goffart
c98d234b9e Janitor: Always use `#![no_std] for runtime lib
And call `extern crate std` when the feature is enabled.
I've read this is the good practice on how to do it.
So that the std prelude is no longer included automatically.
There is then less difference between std and and no-std build which
should avoid surprises in the CI when we use things from the prelude.

The downside is that there is a bit of churn in the tests
2025-01-27 19:22:00 +01:00
Olivier Goffart
263af149c0 changed callback: limit chained callback to 10 invocations
in order to avoid infinite loops
2024-06-28 14:46:12 +02:00
Tobias Hunger
e14e296734 janitor: Fix clippy "casting raw pointers to the same type and constness is unnecessary" 2024-06-24 14:59:47 +02:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Olivier Goffart
0b5473de8d Fix no_std compile 2024-05-02 22:25:53 +02:00
Olivier Goffart
80f37a3acf C++ ChangeTracker implementation 2024-05-02 22:25:53 +02:00
Olivier Goffart
ab53b1db2f More work on ChangeTracker 2024-05-02 22:25:53 +02:00
Olivier Goffart
b5b00fdf9f WIP: some runtime support for the change tracker
Introduce a ChangeTracker type, but it is not of any use now
2024-05-02 22:25:53 +02:00