aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-12-16 18:30:17 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-12-16 18:42:37 -0300
commit0a740ad90f467ccdf00cb674eb80310ddb115b50 (patch)
tree39f8d5d241311d3ab1f07ec9241fa1541bc7b9d7 /typesystem.cpp
parentf2fd366c90dd64a37f48e5ea554b8aebf00b6de5 (diff)
Adds support for varargs in AbstractMetaArgument, AbstractMetaType and VarargsTypeEntry.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'typesystem.cpp')
-rw-r--r--typesystem.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/typesystem.cpp b/typesystem.cpp
index 1a5fbffd7..7c58dab56 100644
--- a/typesystem.cpp
+++ b/typesystem.cpp
@@ -1695,6 +1695,7 @@ TypeDatabase::TypeDatabase() : m_suppressWarnings(true)
addType(e);
addType(new VoidTypeEntry());
+ addType(new VarargsTypeEntry());
}
QString TypeDatabase::modifiedTypesystemFilepath(const QString &ts_file)
@@ -2109,9 +2110,15 @@ static AddedFunction::TypeInfo parseType(const QString& signature, int startPos
QRegExp regex("\\w");
int length = signature.length();
int start = signature.indexOf(regex, startPos);
- if (start == -1) { // error
- if (endPos)
- *endPos = length;
+ if (start == -1) {
+ if (signature.mid(startPos + 1, 3) == "...") { // varargs
+ if (endPos)
+ *endPos = startPos + 4;
+ result.name = "...";
+ } else { // error
+ if (endPos)
+ *endPos = length;
+ }
return result;
}