Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the app config dir to save the QSettings file. #105

Merged
merged 1 commit into from
Jul 4, 2024
Merged

Use the app config dir to save the QSettings file. #105

merged 1 commit into from
Jul 4, 2024

Conversation

dcaliste
Copy link
Collaborator

Close #99.

Sailjail is not mounting the generic config dir, so the QSettings file should be under org/app/ dir and not under the org/ dir. See https://forum.sailfishos.org/t/application-data-dir-sailjail-and-organizationname/6471/14 for more details.

This is a conflict between the fact that QSettings stores its file in a shared directory by default and that isolation impose to hide shared directories and use only private directories.

It's also a bit of an issue because the old conf file is not visible from inside the jail and thus running flowplayer inside the jail cannot migrate the user conf file to its new proper location. Jolla thought about this, but it's only working for harbour compliant applications (which was not the case of flowplayer) where the directory naming convention is using the harbour- prefix. So accepting this PR will result in the QSettings file being recreated and the user starting with a "new" flowplayer. The directories to parse for music will be lost for instance and will have to be reset. There is a possibility to migrate the file manually as a postinst rule in the RPM, dealing with the primary user, but that's error prone and ugly (the packkaging system is not the place to do this).

Sailjail is not mounting the generic config dir,
so the QSettings file should be under org/app/
dir and not under the org/ dir.
Copy link
Contributor

@Olf0 Olf0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I would not call my looking at the code changes a proper review.

@Olf0 Olf0 merged commit d1df795 into devel Jul 4, 2024
1 check passed
@Olf0 Olf0 deleted the sailjail branch July 4, 2024 19:50
Olf0 added a commit that referenced this pull request Nov 29, 2024
* Translate translations/flowplayer.ts in sv (#90)

100% translated source file: 'translations/flowplayer.ts'
on 'sv'.

Co-authored-by: @eson57 via transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>

* Translate translations/flowplayer.ts in de (#91)

100% translated source file: 'translations/flowplayer.ts'
on 'de'.

Co-authored-by: @Olf0 via transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>

* Translate translations/flowplayer.ts in et (#92)

100% translated source file: 'translations/flowplayer.ts'
on 'et'.

Co-authored-by: @Olf0 via transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>

* [Tx: translations/flowplayer.ts] Add Finnish translation (fi) #94

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

Co-authored-by: @tuplasuhveli (Elmeri Länsiharju) via transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>

* [Tx] Updates for file translations/flowplayer.ts in fi (#95)

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

* Translate translations/flowplayer.ts in fi

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>

* Translate translations/flowplayer.ts in fi (#96)

100% translated source file: 'translations/flowplayer.ts'
on 'fi'.

Authored-by: @tuplasuhveli via transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>

* [extras/Lockscreen.qml] Add reference to issue #102 (#103)

Denote that this file currently comprises dead, problematic code; for details see issue #102.

* [src/utils.cpp] Remove function `startMafw` …

…, because it appears to be dead code; for details see issue #101.

* [src/utils.h] Remove function declaration `startMafw` …

…, because it appears to be dead code; for details see issue #101.

* [src/datareader.cpp] Omit superfluous `QString oFile` (#100)

For details, see #75 (comment)

* Use the app config dir to save the QSettings file (#105)

Sailjail is not mounting the generic config dir,
so the QSettings file should be under org/app/
dir and not under the org/ dir.

* [flowplayer/extras/Lockscreen.qml] Denote status in comments (#108)

See issue #102 for details.

* [flowplayer/src/playlist.cpp] Convert unused `/home/nemo` references, too (#107)

As discussed in issue #101.

* [flowplayer.changes] Add changelog entries for v0.3.6

* [flowplayer.spec] Pre-release version increase

* [README.md] Add Elmeri Länsiharju (tuplasuhveli) as contributor

* [flowplayer.changes] Beautify two atributions

* [flowplayer.changes] Another round of name beautifying

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Damien Caliste <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Changes made in settings do not survive app restart
2 participants