MainView has a property applicationName which is set to QApplication::applicationName. The expected value is something like "com.ubuntu.developer.developerName.applicationName". However, the way this is intended to be used by Qt is to combine organisationName and applicationName.
This causes QSettings not to work in confined apps. It is still possible to make it work by doing this in C++:
Next problem is, that the store's automatic checks try to find the applicationName property in QML and 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
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.
MainView has a property applicationName which is set to QApplication: :applicationNam e. The expected value is something like "com.ubuntu. developer. developerName. applicationName ". However, the way this is intended to be used by Qt is to combine organisationName and applicationName.
This causes QSettings not to work in confined apps. It is still possible to make it work by doing this in C++:
QCoreApplicatio n::setOrganizat ionName( "com.ubuntu. developer. developerName. appName" ); n::setApplicati onName( "appName" );
QCoreApplicatio
Next problem is, that the store's automatic checks try to find the applicationName property in QML and 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/ .config/ Unknown Organization/ com.ubuntu. developer. developerName. appName. conf
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.