-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
FEAT(client): Settings Profiles #6681
base: master
Are you sure you want to change the base?
Conversation
TODO: Write commit message
TODO: Write commit message
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.
For reference, this implements #1264
One thing we need to think about/discuss is whether we believe whether all settings are created equal or whether there might be some settings that should be profile-dependent and some which are global-independent.
In the latter category, one might have things like the ask-on-quit setting.
If we believe that some settings should be independent of profiles, then the entire feature would become much more complex as this dependence would also have to be reflected in the UI in order to not make users guess whether a given setting depends on the profile or not 👀
@@ -401,6 +446,8 @@ std::size_t qHash(const ChannelTarget &target) { | |||
return qHash(target.channelID); | |||
} | |||
|
|||
const QString Profiles::s_default_profile_name = QLatin1String("default"); |
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.
Why not use std::string
for this?
QString activeProfileName = s_default_profile_name; | ||
QMap< QString, Settings > allProfiles = {}; |
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.
Where (reasonably) possible new code should prefer the use of std containers
I am 100% in favor of "all settings are created equal".
@Krzmbrzl One thing that I am unsure about as of yet is "settings_version". That should be included in the individual profiles, but when we leave it out of the JSON root, we might - in rare, error caused circumstances - have users that might not be able to start Mumble... I/We have to come up with a nice solution for this |
This is very much WIP and I need to add a proper description, but it is functional on a fundamental level.
Feedback for both UI and settings refactor welcome
sneak_peak.mp4
Closes #1264