Summary: | PageStack: pop() doesn't delete page | ||
---|---|---|---|
Product: | [Unmaintained] plasma4 | Reporter: | Michael Zanetti <mzanetti> |
Component: | qml-components | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | notmart |
Priority: | NOR | ||
Version: | 4.10.2 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-runtime/934a3de43fd7d94d884eaf6fcffd6d7815902721 | Version Fixed In: | |
Sentry Crash Report: |
Description
Michael Zanetti
2013-04-14 12:45:50 UTC
the code right now of pagestack does one of the following things: if the page has been created, it should be deleted if the page has been reparented, it should give again the old parent. what is your case? do you already have th page instantiated or you pass just the component? (changing the behaviour of always deleting could also make sense) Right... I changed the code to not have a parent and indeed it seems to delete the page when popping. So this bug report actually does not report a bug in the techincal sense, but reveals a mismatch with all the other PageStack apis. The reason I tapped into this, was because this application runs already on Harmattan, Symbian and Ubuntu touch and all of those PageStacks are unconditionally destroying the page upon popping. I think it would make sense to change the API to always delete the page because this is how also Qt works. Once you reparent an QObject, the meta object code will take care about its destruction. So to be consistent with C++/Qt and other component API's I'd vote for changing it. Git commit 934a3de43fd7d94d884eaf6fcffd6d7815902721 by Marco Martin. Committed on 14/07/2013 at 10:09. Pushed by mart into branch 'KDE/4.11'. always delete the page after a pop() this makes the component behave the same as the stack in components of meego, ubutu and QtControls M +0 -6 plasma/declarativeimports/plasmacomponents/qml/PageStack.qml http://commits.kde.org/kde-runtime/934a3de43fd7d94d884eaf6fcffd6d7815902721 in 4.11 and master the behavior should be uniform with other platforms now |