Qt/GeneralPane: Don't trigger config change events when populating GUI. #10484
+56
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
I ran into this while implementing a 'reset all settings' feature. Turns out that blocking signals on QWidget doesn't block events from its children, so what happened is that I called reset settings, all settings were reset, then the GUI got the request to update itself, and during the update one of the GUI elements called its 'I have been changed' signal, which stored the current GUI back to the settings, reverting my reset. Not ideal!
Is there a better way to handle this? This is the best I could come up with, but maybe someone has a less boilerplate-y idea...