-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Provide support for fallback config values #3551
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
Conversation
Umcaruje
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the two formatting issues, this looks good to me.
include/ConfigManager.h
Outdated
| const QString & attribute ) const; | ||
| const QString & value( const QString & cls, | ||
| const QString & attribute, | ||
| const QString & defaultVal) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should have a space between the parenthesis : defaultVal )
src/gui/SetupDialog.cpp
Outdated
| "syncvstplugins" ).toInt() ), | ||
| m_animateAFP(ConfigManager::inst()->value( "ui", | ||
| "animateafp").toInt() ), | ||
| "animateafp", "1").toInt() ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here: "1" )
Formatting issues fixed. |
Provide support for fallback config values Makes autosave and some other values checked by default. Supersedes LMMS#3541
Provide support for fallback config values Makes autosave and some other values checked by default. Supersedes LMMS#3541

Supersedes #3541 to address autosave regression #181 (comment).
Previous to this PR, there was no way to provide a "default on" style config value. The effect of this was variable names such as
disableautosavecausing double negatives in our codebase making it hard to read. Attempts to change them have resulted in a mismatch between desired default and actual default. This should allow config values to have default values.e.g.
Booleans are parsed as integers. A default value of
1will make a checkbox true. This will allow us to start moving toward more properly named variables as explained very well here #3088 (comment).