Android: settings lost on GUI state change
Short description of changes
This change implements applicationStateChanged and saveStateRequest signals to save settings.
This mostly affects mobile platforms - it was identified on Android but may also affect iOS (untested).
CHANGELOG: Android: save settings on app state change
Context: Fixes an issue?
Fixes: #2395
Does this change need documentation? What needs to be documented and how?
This behaviour hasn't been documented, so no change needed.
Status of this Pull Request
Tested on Android 11 (Moto G9 Power retgb) (Qt5) - fixes the problem which existed in 3.10.0rc1 Tested on Linux (Qt6) - no noticable effect
What is missing until this pull request can be merged?
- [ ] Testing on earlier and later supported versions of Android
- [x] Testing on supported iOS versions (pre and post fix)
- [ ] Testing on other supported platforms
Checklist
- [x] I've verified that this Pull Request follows the general code principles
- [x] I tested my code and it does what I want
- [x] My code follows the style guide
- [x] I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
- [x] I've filled all the content above
I did see this but it appears unrelated...
Build for MacOS (artifacts)
...
Installing [email protected]
~/Library/Cache/jamulus-homebrew-bottles ~/work/jamulus/jamulus
Building fresh [email protected] package
Error: Cannot extract formula to homebrew/cask!
Error: Process completed with exit code 1.
and for the Windows Jack build:
Project ERROR: Error: jack.h was not found in the expected location (C:/Program Files (x86)). Ensure that the right JACK2 variant is installed (32 Bit vs. 64 Bit).
AUTOBUILD: Please build all targets
iOS didn't experience that, I think.
iOS name is still saved; mute myself seems to be lost, but that could be another bug. I believe iOS was never affected.
Windows JACK build failing
...
Downloading 64 Bit and 32 Bit JACK installer (if needed)...
Installing JACK2 64-bit...
64bit JACK installation completed successfully
Installing JACK2 32-bit...
32bit JACK installation completed successfully
...
Project MESSAGE: building version "3.10.0dev-6d73f1a" (intermediate in git repository)
Project MESSAGE: Using JACK.
Project MESSAGE: Native x86_64 build
Project ERROR: Error: jack.h was not found in the expected location (C:/Program Files). Ensure that the right JACK2 variant is installed (32 Bit vs. 64 Bit).
Native command C:\Qt\6.6.0\msvc2019_64\bin\qmake.exe returned with exit code 3
At D:\a\jamulus\jamulus\windows\deploy_windows.ps1:45 char:9
+ Throw "Native command $Command returned with exit code $LastE ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Native command ...ith exit code 3:String) [], RuntimeException
+ FullyQualifiedErrorId : Native command C:\Qt\6.6.0\msvc2019_64\bin\qmake.exe returned with exit code 3
deploy_windows.ps1 failed with exit code 1
At D:\a\jamulus\jamulus\.github\autobuild\windows.ps1:218 char:9
+ throw "deploy_windows.ps1 failed with exit code $LastExitCode ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (deploy_windows....ith exit code 1:String) [], RuntimeException
+ FullyQualifiedErrorId : deploy_windows.ps1 failed with exit code 1
Windows JACK build failing
see #3206
As I said, I can't test on a real device. So I can't reliably test this. If it's ok you can merge it without my approval.
Just built this on RPi and tried it out. Works fine. I noticed that it now saves Jamulus.ini on state changes, such as moving the main window, or exiting from the settings dialog. This verifies that the new code is getting invoked. In comparison, 3.10.0 only updates Jamulus.ini on exiting the program.
This change seems to break registration with a directory in GUI servers. See https://github.com/jamulussoftware/jamulus/issues/3287#issuecomment-2197726812