forked from quickshell/quickshell
feat: completely redesign hot reloader
The hot reloader previously attempted to figure out which parent a component would attach to as it loaded. This was fairly error prone as it was heuristic based and didn't work as soon as you split definitions into multiple QML files. The new hot reloader functions by first completely building the widget tree, then applying the old tree to the first tree and pulling out usable values. Proxy windows now wait to appear until being reloaded. Additionally added support for `reloadableId` to help match a Reloadable to its value in the previous widget tree.
This commit is contained in:
parent
d6ed717c39
commit
1da43be6c0
17 changed files with 518 additions and 442 deletions
|
@ -45,36 +45,9 @@ public:
|
|||
/// `hard` - perform a hard reload. If this is false, QuickShell will attempt to reuse windows
|
||||
/// that already exist. If true windows will be recreated.
|
||||
///
|
||||
/// > [!INFO] QuickShell can only reuse windows that are in a hierarchy of elements known
|
||||
/// > internally as `Scavengeable`. These types are [ShellRoot] and [Variants].
|
||||
/// >
|
||||
/// > ```qml
|
||||
/// > // this will reuse the window on reload
|
||||
/// > ShellRoot {
|
||||
/// > Varaints {
|
||||
/// > ProxyShellWindow {
|
||||
/// > // ...
|
||||
/// > }
|
||||
/// >
|
||||
/// > // ...
|
||||
/// > }
|
||||
/// > }
|
||||
/// >
|
||||
/// > // this will NOT reuse the window on reload,
|
||||
/// > // and will destroy the old one / create a new one every time
|
||||
/// > ShellRoot {
|
||||
/// > AnyNonScavengeableType {
|
||||
/// > ProxyShellWindow {
|
||||
/// > // ...
|
||||
/// > }
|
||||
/// >
|
||||
/// > // ...
|
||||
/// > }
|
||||
/// > }
|
||||
/// > ```
|
||||
/// >
|
||||
/// > [ShellRoot]: ../shellroot
|
||||
/// > [Variants]: ../variants
|
||||
/// See [Reloadable] for more information on what can be reloaded and how.
|
||||
///
|
||||
/// [Reloadable]: ../reloadable
|
||||
Q_INVOKABLE void reload(bool hard);
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue