Persist state between launches
Needs ReviewPublic

Authored by cblack on Apr 19 2020, 4:08 AM.

Details

Reviewers
None
Group Reviewers
Kirigami
Summary

Window geometry and last page will persist between launches.

Test Plan

Change window geometry and navigate through the gallery and restart the app.

Diff Detail

Repository
R1014 Kirigami Gallery
Branch
cblack/persistence (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25448
Build 25466: arc lint + arc unit
cblack created this revision.Apr 19 2020, 4:08 AM
Restricted Application added projects: Plasma, Kirigami. · View Herald TranscriptApr 19 2020, 4:08 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
cblack requested review of this revision.Apr 19 2020, 4:08 AM

Window geometry and position is supposed to be saved automatically by KXMLGui, at least for widgets apps. If that's not possible to do here, perhaps we should have Kirigami do this at the frameworks level so it doesn't need to be done by every single app.

mart added a subscriber: mart.Apr 20 2020, 3:50 PM

my concern here using qsettings in this place, is that then it kinda clashes when an application uses its own config like it should, from a framework (kconfiggroup, kconfigskeleton etc)
i always refrained from using any form of config read/write here, and i think we should continue to do so.
Kirigami is a tier1 framework that should do the kleast possible, is more like KGuiAddons/§KWidgetAddons, *not* a full feature kxmlgui, which if we want to have something along the lines, we should have a proper framework to do so, and not tier1

In D28971#652708, @mart wrote:

i always refrained from using any form of config read/write here, and i think we should continue to do so.

Are you referring to the gallery (this patch) or to Kirigami?

In D28971#652708, @mart wrote:

my concern here using qsettings in this place, is that then it kinda clashes when an application uses its own config like it should, from a framework (kconfiggroup, kconfigskeleton etc)
i always refrained from using any form of config read/write here, and i think we should continue to do so.
Kirigami is a tier1 framework that should do the kleast possible, is more like KGuiAddons/§KWidgetAddons, *not* a full feature kxmlgui, which if we want to have something along the lines, we should have a proper framework to do so, and not tier1

If that's your vision for Kirigami, then we definitely need one, yeah. Otherwise our QML apps are going to need to endlessly reinvent this kind of wheel.