MainView.applicationName seemingly confuses QSettings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
High
|
Cris Dywan | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
MainView has a property applicationName which is set to QApplication:
This causes QSettings not to work in confined apps. It is still possible to make it work by doing this in C++:
QCoreApplicatio
QCoreApplicatio
Next problem is, that the store's automatic checks try to find the applicationName property in QML and reject the app if it's not present. I tried setting the applicationName in QML and again overwrite it in C++. This doesn't work. As soon as applicationName in QML is used, the organisationName is cleared and QSettings tries to store the config in
/home/user/
This obviously breaks when running the app confined.
To solve this, organisationName should be supported in MainView and Ubuntu specific plugins like the LocalStorage should be adjusted to make use of organisationName AND applicationName just in the same way as Qt itself uses it.
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Zsombor Egri: Approve
-
Diff: 121 lines (+77/-0)4 files modifieddebian/control (+1/-0)
modules/Ubuntu/Components/plugin/ucapplication.cpp (+2/-0)
tests/unit/tst_mainview/Settings.qml (+34/-0)
tests/unit/tst_mainview/tst_mainview.cpp (+40/-0)
description: | updated |
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Christian Dywan (kalikiana) |
Changed in ubuntu-ui-toolkit: | |
importance: | Undecided → High |
Changed in ubuntu-ui-toolkit: | |
status: | Confirmed → In Progress |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Fix Released |
I agree we should keep (or get to) as close to existing Qt APIs as possible.