summaryrefslogtreecommitdiff
path: root/editor/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-26 16:34:13 +0100
committerGitHub <noreply@github.com>2020-01-26 16:34:13 +0100
commit4cee1cda5e8f66467ea7f29f60cc3a0444ab58aa (patch)
tree0fe0b327474a7fc15dfd44819dec0cee556278c5 /editor/doc
parent5b3459bfc7a65ebcd4cb1065a51863affd4374e4 (diff)
parent2d20fc39aaa3a3e48f25cbb95f38f54fe2bcdd9f (diff)
Merge pull request #35589 from akien-mga/doc-drop-category-property
doc: Drop unused 'category' property from header
Diffstat (limited to 'editor/doc')
-rw-r--r--editor/doc/doc_data.cpp13
-rw-r--r--editor/doc/doc_dump.cpp8
2 files changed, 7 insertions, 14 deletions
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index 194adf5c1e..adfffe27ba 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -251,7 +251,6 @@ void DocData::generate(bool p_basic_types) {
ClassDoc &c = class_list[cname];
c.name = cname;
c.inherits = ClassDB::get_parent_class(name);
- c.category = ClassDB::get_category(name);
List<PropertyInfo> properties;
List<PropertyInfo> own_properties;
@@ -531,7 +530,6 @@ void DocData::generate(bool p_basic_types) {
class_list[cname] = ClassDoc();
ClassDoc &c = class_list[cname];
c.name = cname;
- c.category = "Built-In Types";
Variant::CallError cerror;
Variant v = Variant::construct(Variant::Type(i), NULL, 0, cerror);
@@ -843,8 +841,6 @@ Error DocData::_load(Ref<XMLParser> parser) {
c.name = name;
if (parser->has_attribute("inherits"))
c.inherits = parser->get_attribute_value("inherits");
- if (parser->has_attribute("category"))
- c.category = parser->get_attribute_value("category");
while (parser->read() == OK) {
@@ -1034,25 +1030,24 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri
String header = "<class name=\"" + c.name + "\"";
if (c.inherits != "")
header += " inherits=\"" + c.inherits + "\"";
-
- String category = c.category;
- if (c.category == "")
- category = "Core";
- header += " category=\"" + category + "\"";
header += String(" version=\"") + VERSION_NUMBER + "\"";
header += ">";
_write_string(f, 0, header);
+
_write_string(f, 1, "<brief_description>");
_write_string(f, 2, c.brief_description.strip_edges().xml_escape());
_write_string(f, 1, "</brief_description>");
+
_write_string(f, 1, "<description>");
_write_string(f, 2, c.description.strip_edges().xml_escape());
_write_string(f, 1, "</description>");
+
_write_string(f, 1, "<tutorials>");
for (int i = 0; i < c.tutorials.size(); i++) {
_write_string(f, 2, "<link>" + c.tutorials.get(i).xml_escape() + "</link>");
}
_write_string(f, 1, "</tutorials>");
+
_write_string(f, 1, "<methods>");
c.methods.sort();
diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp
index edb1a536c3..d7e1d257f2 100644
--- a/editor/doc/doc_dump.cpp
+++ b/editor/doc/doc_dump.cpp
@@ -93,16 +93,14 @@ void DocDump::dump(const String &p_file) {
String inherits = ClassDB::get_parent_class(name);
if (inherits != "")
header += " inherits=\"" + inherits + "\"";
- String category = ClassDB::get_category(name);
- if (category == "")
- category = "Core";
- header += " category=\"" + category + "\"";
- header += ">";
_write_string(f, 0, header);
+
_write_string(f, 1, "<brief_description>");
_write_string(f, 1, "</brief_description>");
+
_write_string(f, 1, "<description>");
_write_string(f, 1, "</description>");
+
_write_string(f, 1, "<methods>");
List<MethodInfo> method_list;