Skip to content
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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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", "");
Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor

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.

if (custom_settings != "") {
_load_settings_text(custom_settings);
}
}
// Using GLOBAL_GET on every block for compressing can be slow, so assigning here.
Compression::zstd_long_distance_matching = GLOBAL_GET("compression/formats/zstd/long_distance_matching");
Compression::zstd_level = GLOBAL_GET("compression/formats/zstd/compression_level");
Compression::zstd_window_log_size = GLOBAL_GET("compression/formats/zstd/window_log_size");
// Using PROJECT_GET on every block for compressing can be slow, so assigning here.
Compression::zstd_long_distance_matching = PROJECT_GET("compression/formats/zstd/long_distance_matching");
Compression::zstd_level = PROJECT_GET("compression/formats/zstd/compression_level");
Compression::zstd_window_log_size = PROJECT_GET("compression/formats/zstd/window_log_size");

Compression::zlib_level = GLOBAL_GET("compression/formats/zlib/compression_level");
Compression::zlib_level = PROJECT_GET("compression/formats/zlib/compression_level");

Compression::gzip_level = GLOBAL_GET("compression/formats/gzip/compression_level");
Compression::gzip_level = PROJECT_GET("compression/formats/gzip/compression_level");

return err;
}
Expand Down Expand Up @@ -913,7 +913,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust
}
}

Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs, bool p_basic) {
Variant _PROJECT_DEFAULT(const String &p_var, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs, bool p_basic) {
Variant ret;
if (!ProjectSettings::get_singleton()->has_setting(p_var)) {
ProjectSettings::get_singleton()->set(p_var, p_default);
Expand Down Expand Up @@ -1070,7 +1070,7 @@ void ProjectSettings::_add_builtin_input_map() {
action["events"] = events;

String action_name = "input/" + E.key();
GLOBAL_DEF(action_name, action);
PROJECT_DEFAULT(action_name, action);
input_presets.push_back(action_name);
}
}
Expand All @@ -1082,17 +1082,17 @@ ProjectSettings::ProjectSettings() {

singleton = this;

GLOBAL_DEF_BASIC("application/config/name", "");
GLOBAL_DEF_BASIC("application/config/description", "");
PROJECT_DEFAULT_BASIC("application/config/name", "");
PROJECT_DEFAULT_BASIC("application/config/description", "");
custom_prop_info["application/config/description"] = PropertyInfo(Variant::STRING, "application/config/description", PROPERTY_HINT_MULTILINE_TEXT);
GLOBAL_DEF_BASIC("application/run/main_scene", "");
PROJECT_DEFAULT_BASIC("application/run/main_scene", "");
custom_prop_info["application/run/main_scene"] = PropertyInfo(Variant::STRING, "application/run/main_scene", PROPERTY_HINT_FILE, "*.tscn,*.scn,*.res");
GLOBAL_DEF("application/run/disable_stdout", false);
GLOBAL_DEF("application/run/disable_stderr", false);
GLOBAL_DEF("application/config/use_custom_user_dir", false);
GLOBAL_DEF("application/config/custom_user_dir_name", "");
GLOBAL_DEF("application/config/project_settings_override", "");
GLOBAL_DEF_BASIC("audio/buses/default_bus_layout", "res://default_bus_layout.tres");
PROJECT_DEFAULT("application/run/disable_stdout", false);
PROJECT_DEFAULT("application/run/disable_stderr", false);
PROJECT_DEFAULT("application/config/use_custom_user_dir", false);
PROJECT_DEFAULT("application/config/custom_user_dir_name", "");
PROJECT_DEFAULT("application/config/project_settings_override", "");
PROJECT_DEFAULT_BASIC("audio/buses/default_bus_layout", "res://default_bus_layout.tres");
custom_prop_info["audio/buses/default_bus_layout"] = PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres");

PackedStringArray extensions = PackedStringArray();
Expand All @@ -1102,12 +1102,12 @@ ProjectSettings::ProjectSettings() {
}
extensions.push_back("gdshader");

GLOBAL_DEF("editor/run/main_run_args", "");
PROJECT_DEFAULT("editor/run/main_run_args", "");

GLOBAL_DEF("editor/script/search_in_file_extensions", extensions);
PROJECT_DEFAULT("editor/script/search_in_file_extensions", extensions);
custom_prop_info["editor/script/search_in_file_extensions"] = PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions");

GLOBAL_DEF("editor/script/templates_search_path", "res://script_templates");
PROJECT_DEFAULT("editor/script/templates_search_path", "res://script_templates");
custom_prop_info["editor/script/templates_search_path"] = PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR);

_add_builtin_input_map();
Expand All @@ -1116,23 +1116,23 @@ ProjectSettings::ProjectSettings() {
custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::INT, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "Landscape,Portrait,Reverse Landscape,Reverse Portrait,Sensor Landscape,Sensor Portrait,Sensor");
custom_prop_info["display/window/vsync/vsync_mode"] = PropertyInfo(Variant::STRING, "display/window/vsync/vsync_mode", PROPERTY_HINT_ENUM, "Disabled,Enabled,Adaptive,Mailbox");
custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded");
GLOBAL_DEF("physics/2d/run_on_thread", false);
GLOBAL_DEF("physics/3d/run_on_thread", false);
PROJECT_DEFAULT("physics/2d/run_on_thread", false);
PROJECT_DEFAULT("physics/3d/run_on_thread", false);

GLOBAL_DEF("debug/settings/profiler/max_functions", 16384);
PROJECT_DEFAULT("debug/settings/profiler/max_functions", 16384);
custom_prop_info["debug/settings/profiler/max_functions"] = PropertyInfo(Variant::INT, "debug/settings/profiler/max_functions", PROPERTY_HINT_RANGE, "128,65535,1");

GLOBAL_DEF("compression/formats/zstd/long_distance_matching", Compression::zstd_long_distance_matching);
PROJECT_DEFAULT("compression/formats/zstd/long_distance_matching", Compression::zstd_long_distance_matching);
custom_prop_info["compression/formats/zstd/long_distance_matching"] = PropertyInfo(Variant::BOOL, "compression/formats/zstd/long_distance_matching");
GLOBAL_DEF("compression/formats/zstd/compression_level", Compression::zstd_level);
PROJECT_DEFAULT("compression/formats/zstd/compression_level", Compression::zstd_level);
custom_prop_info["compression/formats/zstd/compression_level"] = PropertyInfo(Variant::INT, "compression/formats/zstd/compression_level", PROPERTY_HINT_RANGE, "1,22,1");
GLOBAL_DEF("compression/formats/zstd/window_log_size", Compression::zstd_window_log_size);
PROJECT_DEFAULT("compression/formats/zstd/window_log_size", Compression::zstd_window_log_size);
custom_prop_info["compression/formats/zstd/window_log_size"] = PropertyInfo(Variant::INT, "compression/formats/zstd/window_log_size", PROPERTY_HINT_RANGE, "10,30,1");

GLOBAL_DEF("compression/formats/zlib/compression_level", Compression::zlib_level);
PROJECT_DEFAULT("compression/formats/zlib/compression_level", Compression::zlib_level);
custom_prop_info["compression/formats/zlib/compression_level"] = PropertyInfo(Variant::INT, "compression/formats/zlib/compression_level", PROPERTY_HINT_RANGE, "-1,9,1");

GLOBAL_DEF("compression/formats/gzip/compression_level", Compression::gzip_level);
PROJECT_DEFAULT("compression/formats/gzip/compression_level", Compression::gzip_level);
custom_prop_info["compression/formats/gzip/compression_level"] = PropertyInfo(Variant::INT, "compression/formats/gzip/compression_level", PROPERTY_HINT_RANGE, "-1,9,1");
}

Expand Down
60 changes: 49 additions & 11 deletions core/config/project_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,54 @@ class ProjectSettings : public Object {
};

//not a macro any longer
Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed = false, bool p_ignore_value_in_docs = false, bool p_basic = false);
#define GLOBAL_DEF(m_var, m_value) _GLOBAL_DEF(m_var, m_value)
#define GLOBAL_DEF_RST(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true)
#define GLOBAL_DEF_NOVAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, true)
#define GLOBAL_DEF_RST_NOVAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, true)
#define GLOBAL_GET(m_var) ProjectSettings::get_singleton()->get(m_var)

#define GLOBAL_DEF_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, false, true)
#define GLOBAL_DEF_RST_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, false, true)
#define GLOBAL_DEF_NOVAL_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, true, true)
#define GLOBAL_DEF_RST_NOVAL_BASIC(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true, true, true)
Variant _PROJECT_DEFAULT(const String &p_var, const Variant &p_default, bool p_restart_if_changed = false, bool p_ignore_value_in_docs = false, bool p_basic = false);

// Returns the value of the project setting `m_var`, or `m_value` if the setting is not defined yet.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_DEFAULT(m_var, m_value) _PROJECT_DEFAULT(m_var, m_value)

// Returns the value of the project setting `m_var`, or `m_value` if the setting is not defined yet.
// Also requests a restart of the editor when changed using the Project Settings dialog.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_DEFAULT_RESTART(m_var, m_value) _PROJECT_DEFAULT(m_var, m_value, true)

// Returns the value of the project setting `m_var`, or `m_value` if the setting is not defined yet.
// Does not define a value for the class reference XML generation.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_DEFAULT_NO_VAL(m_var, m_value) _PROJECT_DEFAULT(m_var, m_value, false, true)

// Returns the value of the project setting `m_var`, or `m_value` if the setting is not defined yet.
// Also requests a restart of the editor when changed using the Project Settings dialog.
// Does not define a value for the class reference XML generation.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_DEF_RESTART_NO_VAL(m_var, m_value) _PROJECT_DEFAULT(m_var, m_value, true, true)

// Returns the value of the project setting `m_var`, or Variant `null` if the setting doesn't exist.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_GET(m_var) ProjectSettings::get_singleton()->get(m_var)

// Returns the value of the project setting `m_var`, or `m_value` if the setting is not defined yet.
// Marks the setting as "basic" to make it appear by default in the Project Settings dialog.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_DEFAULT_BASIC(m_var, m_value) _PROJECT_DEFAULT(m_var, m_value, false, false, true)

// Returns the value of the project setting `m_var`, or `m_value` if the setting is not defined yet.
// Also requests a restart of the editor when changed using the Project Settings dialog.
// Marks the setting as "basic" to make it appear by default in the Project Settings dialog.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_DEFAULT_RESTART_BASIC(m_var, m_value) _PROJECT_DEFAULT(m_var, m_value, true, false, true)

// Returns the value of the project setting `m_var`, or `m_value` if the setting is not defined yet.
// Does not define a value for the class reference XML generation.
// Marks the setting as "basic" to make it appear by default in the Project Settings dialog.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_DEFAULT_NO_VAL_BASIC(m_var, m_value) _PROJECT_DEFAULT(m_var, m_value, false, true, true)

// Returns the value of the project setting `m_var`, or `m_value` if the setting is not defined yet.
// Also requests a restart of the editor when changed using the Project Settings dialog.
// Does not define a value for the class reference XML generation.
// Marks the setting as "basic" to make it appear by default in the Project Settings dialog.
// Consider casting this macro's return value to a specific type to improve safety and avoid crashes.
#define PROJECT_DEFAULT_RESTART_NO_VAL_BASIC(m_var, m_value) _PROJECT_DEFAULT(m_var, m_value, true, true, true)

#endif // PROJECT_SETTINGS_H
8 changes: 4 additions & 4 deletions core/debugger/remote_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ struct RemoteDebugger::ScriptsProfiler {
}

ScriptsProfiler() {
info.resize(GLOBAL_GET("debug/settings/profiler/max_functions"));
info.resize(PROJECT_GET("debug/settings/profiler/max_functions"));
ptrs.resize(info.size());
}
};
Expand Down Expand Up @@ -921,9 +921,9 @@ Error RemoteDebugger::_profiler_capture(const String &p_cmd, const Array &p_data

RemoteDebugger::RemoteDebugger(Ref<RemoteDebuggerPeer> p_peer) {
peer = p_peer;
max_chars_per_second = GLOBAL_GET("network/limits/debugger/max_chars_per_second");
max_errors_per_second = GLOBAL_GET("network/limits/debugger/max_errors_per_second");
max_warnings_per_second = GLOBAL_GET("network/limits/debugger/max_warnings_per_second");
max_chars_per_second = PROJECT_GET("network/limits/debugger/max_chars_per_second");
max_errors_per_second = PROJECT_GET("network/limits/debugger/max_errors_per_second");
max_warnings_per_second = PROJECT_GET("network/limits/debugger/max_warnings_per_second");

// Network Profiler
network_profiler = memnew(NetworkProfiler);
Expand Down
2 changes: 1 addition & 1 deletion core/debugger/remote_debugger_peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,5 @@ RemoteDebuggerPeer *RemoteDebuggerPeerTCP::create(const String &p_uri) {
}

RemoteDebuggerPeer::RemoteDebuggerPeer() {
max_queued_messages = (int)GLOBAL_GET("network/limits/debugger/max_queued_messages");
max_queued_messages = (int)PROJECT_GET("network/limits/debugger/max_queued_messages");
}
2 changes: 1 addition & 1 deletion core/input/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void Input::_bind_methods() {
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
#ifdef TOOLS_ENABLED

const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
const String quote_style = EDITOR_DEFAULT("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";

String pf = p_function;
if (p_idx == 0 && (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" ||
Expand Down
8 changes: 4 additions & 4 deletions core/io/file_access_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,9 @@ Error FileAccessNetwork::_set_unix_permissions(const String &p_file, uint32_t p_
}

void FileAccessNetwork::configure() {
GLOBAL_DEF("network/remote_fs/page_size", 65536);
PROJECT_DEFAULT("network/remote_fs/page_size", 65536);
ProjectSettings::get_singleton()->set_custom_property_info("network/remote_fs/page_size", PropertyInfo(Variant::INT, "network/remote_fs/page_size", PROPERTY_HINT_RANGE, "1,65536,1,or_greater")); //is used as denominator and can't be zero
GLOBAL_DEF("network/remote_fs/page_read_ahead", 4);
PROJECT_DEFAULT("network/remote_fs/page_read_ahead", 4);
ProjectSettings::get_singleton()->set_custom_property_info("network/remote_fs/page_read_ahead", PropertyInfo(Variant::INT, "network/remote_fs/page_read_ahead", PROPERTY_HINT_RANGE, "0,8,1,or_greater"));
}

Expand All @@ -478,8 +478,8 @@ FileAccessNetwork::FileAccessNetwork() {
id = nc->last_id++;
nc->accesses[id] = this;
nc->unlock_mutex();
page_size = GLOBAL_GET("network/remote_fs/page_size");
read_ahead = GLOBAL_GET("network/remote_fs/page_read_ahead");
page_size = PROJECT_GET("network/remote_fs/page_size");
read_ahead = PROJECT_GET("network/remote_fs/page_read_ahead");
}

FileAccessNetwork::~FileAccessNetwork() {
Expand Down
2 changes: 1 addition & 1 deletion core/io/packet_peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ int PacketPeerStream::get_output_buffer_max_size() const {
}

PacketPeerStream::PacketPeerStream() {
int rbsize = GLOBAL_GET("network/limits/packet_peer_stream/max_buffer_po2");
int rbsize = PROJECT_GET("network/limits/packet_peer_stream/max_buffer_po2");

ring_buffer.resize(rbsize);
input_buffer.resize(1 << rbsize);
Expand Down
4 changes: 2 additions & 2 deletions core/io/stream_peer_tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void StreamPeerTCP::accept_socket(Ref<NetSocket> p_sock, IPAddress p_host, uint1
_sock = p_sock;
_sock->set_blocking_enabled(false);

timeout = OS::get_singleton()->get_ticks_msec() + (((uint64_t)GLOBAL_GET("network/limits/tcp/connect_timeout_seconds")) * 1000);
timeout = OS::get_singleton()->get_ticks_msec() + (((uint64_t)PROJECT_GET("network/limits/tcp/connect_timeout_seconds")) * 1000);
status = STATUS_CONNECTING;

peer_host = p_host;
Expand Down Expand Up @@ -99,7 +99,7 @@ Error StreamPeerTCP::connect_to_host(const IPAddress &p_host, int p_port) {
_sock->set_blocking_enabled(false);
}

timeout = OS::get_singleton()->get_ticks_msec() + (((uint64_t)GLOBAL_GET("network/limits/tcp/connect_timeout_seconds")) * 1000);
timeout = OS::get_singleton()->get_ticks_msec() + (((uint64_t)PROJECT_GET("network/limits/tcp/connect_timeout_seconds")) * 1000);
Error err = _sock->connect_to_host(p_host, p_port);

if (err == OK) {
Expand Down
2 changes: 1 addition & 1 deletion core/object/message_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ MessageQueue::MessageQueue() {
ERR_FAIL_COND_MSG(singleton != nullptr, "A MessageQueue singleton already exists.");
singleton = this;

buffer_size = GLOBAL_DEF_RST("memory/limits/message_queue/max_size_kb", DEFAULT_QUEUE_SIZE_KB);
buffer_size = PROJECT_DEFAULT_RESTART("memory/limits/message_queue/max_size_kb", DEFAULT_QUEUE_SIZE_KB);
ProjectSettings::get_singleton()->set_custom_property_info("memory/limits/message_queue/max_size_kb", PropertyInfo(Variant::INT, "memory/limits/message_queue/max_size_kb", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater"));
buffer_size *= 1024;
buffer = memnew_arr(uint8_t, buffer_size);
Expand Down
6 changes: 3 additions & 3 deletions core/register_core_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ void register_core_types() {

void register_core_settings() {
// Since in register core types, globals may not be present.
GLOBAL_DEF("network/limits/tcp/connect_timeout_seconds", (30));
PROJECT_DEFAULT("network/limits/tcp/connect_timeout_seconds", (30));
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/tcp/connect_timeout_seconds", PropertyInfo(Variant::INT, "network/limits/tcp/connect_timeout_seconds", PROPERTY_HINT_RANGE, "1,1800,1"));
GLOBAL_DEF_RST("network/limits/packet_peer_stream/max_buffer_po2", (16));
PROJECT_DEFAULT_RESTART("network/limits/packet_peer_stream/max_buffer_po2", (16));
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/packet_peer_stream/max_buffer_po2", PropertyInfo(Variant::INT, "network/limits/packet_peer_stream/max_buffer_po2", PROPERTY_HINT_RANGE, "0,64,1,or_greater"));

GLOBAL_DEF("network/ssl/certificate_bundle_override", "");
PROJECT_DEFAULT("network/ssl/certificate_bundle_override", "");
ProjectSettings::get_singleton()->set_custom_property_info("network/ssl/certificate_bundle_override", PropertyInfo(Variant::STRING, "network/ssl/certificate_bundle_override", PROPERTY_HINT_FILE, "*.crt"));
}

Expand Down
4 changes: 2 additions & 2 deletions core/string/translation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,14 +1204,14 @@ bool TranslationServer::_load_translations(const String &p_from) {
}

void TranslationServer::setup() {
String test = GLOBAL_DEF("internationalization/locale/test", "");
String test = PROJECT_DEFAULT("internationalization/locale/test", "");
test = test.strip_edges();
if (test != "") {
set_locale(test);
} else {
set_locale(OS::get_singleton()->get_locale());
}
fallback = GLOBAL_DEF("internationalization/locale/fallback", "en");
fallback = PROJECT_DEFAULT("internationalization/locale/fallback", "en");
#ifdef TOOLS_ENABLED
{
String options = "";
Expand Down
Loading