1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Make documentation sorting use natural order

This commit is contained in:
Ninni Pipping
2023-05-04 15:18:56 +02:00
parent b0b23082c4
commit 6bccdec7a1
10 changed files with 251 additions and 246 deletions

View File

@@ -417,6 +417,7 @@ void DocTools::generate(bool p_basic_types) {
ClassDB::get_property_list(name, &own_properties, true);
}
// Sort is still needed here to handle inherited properties, even though it is done below, do not remove.
properties.sort();
own_properties.sort();
@@ -535,9 +536,10 @@ void DocTools::generate(bool p_basic_types) {
c.properties.push_back(prop);
}
c.properties.sort();
List<MethodInfo> method_list;
ClassDB::get_method_list(name, &method_list, true);
method_list.sort();
for (const MethodInfo &E : method_list) {
if (E.name.is_empty() || (E.name[0] == '_' && !(E.flags & METHOD_FLAG_VIRTUAL))) {
@@ -571,6 +573,8 @@ void DocTools::generate(bool p_basic_types) {
c.methods.push_back(method);
}
c.methods.sort();
List<MethodInfo> signal_list;
ClassDB::get_signal_list(name, &signal_list, true);
@@ -709,7 +713,6 @@ void DocTools::generate(bool p_basic_types) {
List<MethodInfo> method_list;
v.get_method_list(&method_list);
method_list.sort();
Variant::get_constructor_list(Variant::Type(i), &method_list);
for (int j = 0; j < Variant::OP_AND; j++) { // Showing above 'and' is pretty confusing and there are a lot of variations.
@@ -832,6 +835,8 @@ void DocTools::generate(bool p_basic_types) {
}
}
c.methods.sort();
List<PropertyInfo> properties;
v.get_property_list(&properties);
for (const PropertyInfo &pi : properties) {