summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2021-02-24 10:56:34 -0300
committerJuan Linietsky <reduzio@gmail.com>2021-03-16 10:53:05 -0300
commitecfa570ccbcd6735bd42b09ac947ee57c57077ce (patch)
tree86bce22d30429ffea3c8dc0b1c4cb9ddd87546b3 /editor
parentf3864ec89f337ad1454a7112ba47896f2524ba9b (diff)
Add static method support to core Variant types
* Properly exposed, including validated and variant call * Bound static functions in String and Color * Did not add support for scripting languages, will have to be added manually.
Diffstat (limited to 'editor')
-rw-r--r--editor/doc_tools.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp
index 47ea8cbe2a..e29c9593c3 100644
--- a/editor/doc_tools.cpp
+++ b/editor/doc_tools.cpp
@@ -394,13 +394,22 @@ void DocTools::generate(bool p_basic_types) {
method.qualifiers += " ";
}
method.qualifiers += "const";
- } else if (E->get().flags & METHOD_FLAG_VARARG) {
+ }
+
+ if (E->get().flags & METHOD_FLAG_VARARG) {
if (method.qualifiers != "") {
method.qualifiers += " ";
}
method.qualifiers += "vararg";
}
+ if (E->get().flags & METHOD_FLAG_STATIC) {
+ if (method.qualifiers != "") {
+ method.qualifiers += " ";
+ }
+ method.qualifiers += "static";
+ }
+
for (int i = -1; i < E->get().arguments.size(); i++) {
if (i == -1) {
#ifdef DEBUG_METHODS_ENABLED
@@ -647,6 +656,20 @@ void DocTools::generate(bool p_basic_types) {
method.qualifiers += "vararg";
}
+ if (mi.flags & METHOD_FLAG_CONST) {
+ if (method.qualifiers != "") {
+ method.qualifiers += " ";
+ }
+ method.qualifiers += "const";
+ }
+
+ if (mi.flags & METHOD_FLAG_STATIC) {
+ if (method.qualifiers != "") {
+ method.qualifiers += " ";
+ }
+ method.qualifiers += "static";
+ }
+
c.methods.push_back(method);
}