Skip to content

add takeLast() slot to ConfigModule

Ghost User requested to merge work/popunmanaged into master

The current config module only has push/pop and setCurrentIndex/setDepth. The pop slot deletes the page. In the process of plasma/plasma-workspace#23 (closed) I found it'd be nice to have a way to save the page for later use. I have Language and other LC_* entries in main menu. But the subpage of Language and other LC_* can't be grouped into one. So in order to switch from Language to, say, Time. I must pop the Language subPage first, thus destroying it. Vice versa. Creation of Language and Time subPage is expensive.

This adds a new slot called popUnmanaged, that pop and returns the last page, but not delete it. So I can save the returned page somewhere, when the user click Language again I can reuse that page without re-creating it. And Items created in Qml is managed by QmlEngine anyway.

@nicolasfella

Edited by Ghost User

Merge request reports