[Bug 1477363] Re: onDestruction is never called in the QML component
But the same code on desktop has the output. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1477363 Title: onDestruction is never called in the QML component To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1477363/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1477363] Re: onDestruction is never called in the QML component
In your example, the Page is declared as an instance. When you close the application, the elements will be destroyed silently, without having their attached Component.onDestruction called. When you use a Page declared in the way you reported in a PageStack or AdaptivePageLayout, the Page will not be destroyed by these components as it has not been created by the PageStack/AdaptivePagelayout. So you won't get the onDestruction triggered either. In order to have that coming, you need to declare your page as component and add that to the PageStack/AdaptivePageLayout, or in a separate QML document and use that. ** Changed in: ubuntu-ui-toolkit (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1477363 Title: onDestruction is never called in the QML component To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1477363/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1477363] Re: onDestruction is never called in the QML component
This needs to be fixed ** Changed in: ubuntu-ui-toolkit (Ubuntu) Status: Expired => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1477363 Title: onDestruction is never called in the QML component To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1477363/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1477363] Re: onDestruction is never called in the QML component
[Expired for ubuntu-ui-toolkit (Ubuntu) because there has been no activity for 60 days.] ** Changed in: ubuntu-ui-toolkit (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1477363 Title: onDestruction is never called in the QML component To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1477363/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1477363] Re: onDestruction is never called in the QML component
Could you be more specific? Like in what context the Page is used? Is it declared inside a PageStack? or in a separate document? Are you trying to use it in a PageStack? ** Changed in: ubuntu-ui-toolkit (Ubuntu) Status: New = Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1477363 Title: onDestruction is never called in the QML component To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1477363/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1477363] Re: onDestruction is never called in the QML component
Can you take a look at the code I showed above? it is in the mainview. Please find the code at: bzr branch lp:~liu-xiao-guo/debiantrial/ondestruction On the setting page, it is used as an example for saving the state. If I understand correctly, it should be called like Component.onCompleted event for each of the component. Thanks best regards, XiaoGuo -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1477363 Title: onDestruction is never called in the QML component To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1477363/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs