-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Rename ProjectSettings macros to follow the singleton's rename #50350
Conversation
90754a9
to
91f80de
Compare
The Globals singleton was renamed to ProjectSettings in 3.0. Additionally, this renames some of the macros to be more explicit (including for EditorSettings). This also adds comments above each macro, which will appear in many IDEs when hovering the macro names.
91f80de
to
5f8663e
Compare
@@ -510,19 +510,19 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b | |||
Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bool p_upwards) { | |||
Error err = _setup(p_path, p_main_pack, p_upwards); | |||
if (err == OK) { | |||
String custom_settings = GLOBAL_DEF("application/config/project_settings_override", ""); | |||
String custom_settings = PROJECT_DEFAULT("application/config/project_settings_override", ""); |
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.
GLOBAL_DEF is not short for GLOBAL_DEFAULT, its GLOBAL_DEFINE.
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.
I suppose this is a good argument for renaming it then.
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.
Haha I always thought it was define, not default, and was a bit confused reading the OP.
I am not sure myself, not against a rename, but what is proposed does not seem better than what it is already there. Maybe PROJECT_SETTING_DEF and PROJECT_SETTING_GET |
As a reminder, having project settings being able to be defined anywhere does not work so well with the doctool: godotengine/godot-proposals#1339 (comment) and #48548 (comment)
Same problem occurs with EditorSettings, e.g. (e.g. |
@EricEzaM the general idea is that they are defined on initialization, but having them one in a place is quite messy, I prefer to have them closer to where they are relevant if possible. |
@reduz What is messy about it? We already do this with editor settings. |
PR meeting: DEFAULT -> DEFINE Also we're not against this, but we maybe should take the opportunity to modernise this |
The Globals singleton was renamed to ProjectSettings in 3.0. Additionally, this renames some of the macros to be more explicit (including for EditorSettings).
_DEF
was renamed to_DEFAULT
to avoid having the same length as_GET
(which can look confusing at a glance).This also adds comments above each macro, which will appear in many IDEs when hovering the macro names.
See #16863 (comment).