summaryrefslogtreecommitdiff
path: root/tools/doc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/doc')
-rw-r--r--tools/doc/SCsub2
-rw-r--r--tools/doc/doc_data.cpp30
-rw-r--r--tools/doc/doc_data.h2
3 files changed, 20 insertions, 14 deletions
diff --git a/tools/doc/SCsub b/tools/doc/SCsub
index c8eaa596d1..34524f10ef 100644
--- a/tools/doc/SCsub
+++ b/tools/doc/SCsub
@@ -3,5 +3,3 @@ Import('env')
env.add_source_files(env.tool_sources,"*.cpp")
Export('env')
-
-
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index 75759e7d30..11e4797747 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -59,6 +59,9 @@ void DocData::merge_from(const DocData& p_data) {
if (cf.methods[j].name!=m.name)
continue;
+ if (cf.methods[j].arguments.size()!=m.arguments.size())
+ continue;
+
const MethodDoc &mf = cf.methods[j];
m.description=mf.description;
@@ -134,9 +137,9 @@ void DocData::merge_from(const DocData& p_data) {
void DocData::generate(bool p_basic_types) {
- List<String> classes;
+ List<StringName> classes;
ObjectTypeDB::get_type_list(&classes);
- classes.sort();
+ classes.sort_custom<StringName::AlphCompare>();
while(classes.size()) {
@@ -184,12 +187,13 @@ void DocData::generate(bool p_basic_types) {
arginfo=E->get().return_val;
- if (arginfo.type==Variant::NIL)
- continue;
+#ifdef DEBUG_METHODS_ENABLED
if (m && m->get_return_type()!=StringName())
method.return_type=m->get_return_type();
- else
+ else if (arginfo.type!=Variant::NIL) // {
+#endif
method.return_type=(arginfo.hint==PROPERTY_HINT_RESOURCE_TYPE)?arginfo.hint_string:Variant::get_type_name(arginfo.type);
+// }
} else {
@@ -544,7 +548,7 @@ void DocData::generate(bool p_basic_types) {
Globals::Singleton &s=E->get();
pd.name=s.name;
pd.type=s.ptr->get_type();
- while (ObjectTypeDB::type_inherits_from(pd.type)!="Object")
+ while (String(ObjectTypeDB::type_inherits_from(pd.type))!="Object")
pd.type=ObjectTypeDB::type_inherits_from(pd.type);
if (pd.type.begins_with("_"))
pd.type=pd.type.substr(1,pd.type.length());
@@ -580,7 +584,10 @@ void DocData::generate(bool p_basic_types) {
md.name=mi.name;
if (mi.return_val.name!="")
md.return_type=mi.return_val.name;
- else
+ else if (mi.name.find(":")!=-1) {
+ md.return_type=mi.name.get_slice(":",1);
+ md.name=mi.name.get_slice(":",0);
+ } else
md.return_type=Variant::get_type_name(mi.return_val.type);
for(int i=0;i<mi.arguments.size();i++) {
@@ -590,8 +597,9 @@ void DocData::generate(bool p_basic_types) {
ArgumentDoc ad;
ad.name=pi.name;
+
if (pi.type==Variant::NIL)
- ad.type="var";
+ ad.type="Variant";
else
ad.type=Variant::get_type_name( pi.type );
@@ -914,9 +922,9 @@ Error DocData::save(const String& p_path) {
String qualifiers;
if (m.qualifiers!="")
- qualifiers+="qualifiers=\""+m.qualifiers.xml_escape()+"\"";
+ qualifiers+=" qualifiers=\""+m.qualifiers.xml_escape()+"\"";
- _write_string(f,2,"<method name=\""+m.name+"\" "+qualifiers+" >");
+ _write_string(f,2,"<method name=\""+m.name+"\""+qualifiers+">");
if (m.return_type!="") {
diff --git a/tools/doc/doc_data.h b/tools/doc/doc_data.h
index 018bd67aaf..877f30defb 100644
--- a/tools/doc/doc_data.h
+++ b/tools/doc/doc_data.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */