diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index dd2eeaa5c6e..272a5af59bc 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -52,7 +52,7 @@ void DocData::merge_from(const DocData &p_data) { c.description = cf.description; c.brief_description = cf.brief_description; c.tutorials = cf.tutorials; - c.demos =cf.demos; + c.demos = cf.demos; for (int i = 0; i < c.methods.size(); i++) { @@ -681,7 +681,7 @@ static Error _parse_methods(Ref &parser, Vector & Error DocData::load_classes(const String &p_dir) { Error err; - DirAccessRef da = DirAccess::open(p_dir,&err); + DirAccessRef da = DirAccess::open(p_dir, &err); if (!da) { return err; } @@ -689,8 +689,8 @@ Error DocData::load_classes(const String &p_dir) { da->list_dir_begin(); String path; bool isdir; - path=da->get_next(&isdir); - while(path!=String()) { + path = da->get_next(&isdir); + while (path != String()) { if (!isdir && path.ends_with("xml")) { Ref parser = memnew(XMLParser); Error err = parser->open(p_dir.plus_file(path)); @@ -699,7 +699,7 @@ Error DocData::load_classes(const String &p_dir) { _load(parser); } - path=da->get_next(&isdir); + path = da->get_next(&isdir); } da->list_dir_end(); @@ -709,7 +709,7 @@ Error DocData::load_classes(const String &p_dir) { Error DocData::erase_classes(const String &p_dir) { Error err; - DirAccessRef da = DirAccess::open(p_dir,&err); + DirAccessRef da = DirAccess::open(p_dir, &err); if (!da) { return err; } @@ -719,16 +719,16 @@ Error DocData::erase_classes(const String &p_dir) { da->list_dir_begin(); String path; bool isdir; - path=da->get_next(&isdir); - while(path!=String()) { + path = da->get_next(&isdir); + while (path != String()) { if (!isdir && path.ends_with("xml")) { to_erase.push_back(path); } - path=da->get_next(&isdir); + path = da->get_next(&isdir); } da->list_dir_end(); - while(to_erase.size()) { + while (to_erase.size()) { da->remove(to_erase.front()->get()); to_erase.pop_front(); } @@ -815,8 +815,6 @@ Error DocData::_load(Ref parser) { prop.setter = parser->get_attribute_value("setter"); if (parser->has_attribute("getter")) prop.getter = parser->get_attribute_value("getter"); - if (parser->has_attribute("brief")) - prop.brief_description = parser->get_attribute_value("brief").xml_unescape(); if (parser->has_attribute("enum")) prop.enumeration = parser->get_attribute_value("enum"); parser->read(); @@ -914,24 +912,21 @@ static void _write_string(FileAccess *f, int p_tablevel, const String &p_string) f->store_string(tab + p_string + "\n"); } -Error DocData::save_classes(const String &p_default_path, const Map& p_class_path) { - +Error DocData::save_classes(const String &p_default_path, const Map &p_class_path) { for (Map::Element *E = class_list.front(); E; E = E->next()) { - - ClassDoc &c = E->get(); String save_path; if (p_class_path.has(c.name)) { - save_path=p_class_path[c.name]; + save_path = p_class_path[c.name]; } else { - save_path=p_default_path; + save_path = p_default_path; } Error err; - String save_file = save_path.plus_file(c.name+".xml"); + String save_file = save_path.plus_file(c.name + ".xml"); FileAccessRef f = FileAccess::open(save_file, FileAccess::WRITE, &err); if (err) { ERR_EXPLAIN("Can't write doc file: " + save_file); @@ -949,7 +944,7 @@ Error DocData::save_classes(const String &p_default_path, const Map"); @@ -1031,7 +1026,7 @@ Error DocData::save_classes(const String &p_default_path, const Map"); + _write_string(f, 2, ""); if (p.description != "") _write_string(f, 3, p.description.xml_escape()); _write_string(f, 2, ""); @@ -1100,7 +1095,6 @@ Error DocData::save_classes(const String &p_default_path, const Map"); } - return OK; } diff --git a/editor/doc/doc_data.h b/editor/doc/doc_data.h index 5f94fe17f0d..68d30d8237e 100644 --- a/editor/doc/doc_data.h +++ b/editor/doc/doc_data.h @@ -70,7 +70,6 @@ public: String name; String type; String enumeration; - String brief_description; String description; String setter, getter; bool operator<(const PropertyDoc &p_prop) const { @@ -105,7 +104,7 @@ public: void generate(bool p_basic_types = false); Error load_classes(const String &p_dir); static Error erase_classes(const String &p_dir); - Error save_classes(const String &p_default_path,const Map& p_class_path); + Error save_classes(const String &p_default_path, const Map &p_class_path); Error load_compressed(const uint8_t *p_data, int p_compressed_size, int p_uncompressed_size); }; diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 696eda25364..2e3e886b394 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -800,18 +800,6 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { if (describe) { class_desc->pop(); - } - - if (cd.properties[i].brief_description != "") { - class_desc->push_font(doc_font); - class_desc->add_text(" "); - class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color")); - _add_text(cd.properties[i].description); - class_desc->pop(); - class_desc->pop(); - } - - if (describe) { property_descr = true; }