Repository navigation
Conversation
Settings are currently only written when the application becomes inactive or quits (see CSettings). Anything that ends the process before that, for example a crash or the application being killed, discards the changes the user just made, including the musician profile, the audio device configuration and the language. Write them as well when the settings dialog is hidden, which covers closing it from the menu, from the check box and during shutdown.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Not 100% sure about this one, might need more investigation. |
|
|
||
| void CClientSettingsDlg::hideEvent ( QHideEvent* event ) | ||
| { | ||
| // store the settings when the dialog is closed, so that they survive the |
There was a problem hiding this comment.
| // store the settings when the dialog is closed, so that they survive the | |
| // store the settings when the dialog is hidden, so that they survive the |
|
@coderabbitai what do you think about this? |
|
Tip For best results, initiate chat on the files or code changes. Analysis chain
I would check these points before merge:
One existing limitation is worth noting: I would keep this approach for 🤖 AI-generated review by CodeRabbit. Learnings used
You are interacting with an AI system. |
|
🤖 AI: Works on desktop Linux: with this PR, closing the settings dialog writes the ini, and the edits survive the process being killed. Tested at
|
Is this the right place? Why not loss of focus? It's not modal, so I can switch within Jamulus - and I probably want a save if I'm switching to another application, in case that causes a crash that's not otherwise saved. ... on the basis we're changing it ... (Any path through app exit should already be caught.) ... but maybe it shouldn't be done in the real-time (audio, network) thread, as it's a disk write ... And should apply equally to client and server settings. |
|
As I said, I'm not 100% sure about this. The issue is probably that in iOS we have multiple ways to exit the app. Force Quit, Backgrounding, ... making this behaviour more visible there. There probably is a reason why we only safe on exit. |
|
Actually I believe that save on exit only makes the app more resilient in case the app crashed due to some kind of misconfiguration. It auto reverts then as the config wasn't written. |
Short description of changes
Write the settings when the settings dialog is hidden, so that they are not lost when the application is terminated before it becomes inactive.
CSettingswrites the ini file when the application becomes inactive or quits. Anything that ends the process before that — a crash, or the app being killed — discards whatever the user just configured: alias, instrument, audio device, buffer delay, language, MIDI settings.CClientSettingsDlg::hideEvent()now callsCSettings::Save ( false ). That covers closing the dialog from its menu, unticking the Settings check box, and the hide during shutdown.CHANGELOG: Client: Fixed settings being lost when the application is closed unexpectedly
Context: Fixes an issue?
Fixes #3994 (second item).
Measured on the iOS simulator with
Jamulus.ini:name_base64before the changeNo NameBgTestPer)simctl terminate, relaunchDoes this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
Working implementation.
What is missing until this pull request can be merged?
maindoes not launch on iOS with Qt 6 without it.