summaryrefslogtreecommitdiffstats
path: root/generators/qtdoc/qtdocgenerator.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-09-27 14:50:52 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-09-27 15:05:30 -0300
commit69566068b5d0e3fa9f21f038dc7622cf1d9b3594 (patch)
tree116a7cbcfecbff77aaf3e27ce0a231ad45f3fbe6 /generators/qtdoc/qtdocgenerator.cpp
parent23979df5d6e9d4dfcdcaef8f4c358cb2acd721c5 (diff)
Replace QVariant doc entries by None or object.
None when QVariant is used as an argument default value, object when it's used as return value or just to inform the expected argument type. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'generators/qtdoc/qtdocgenerator.cpp')
-rw-r--r--generators/qtdoc/qtdocgenerator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/generators/qtdoc/qtdocgenerator.cpp b/generators/qtdoc/qtdocgenerator.cpp
index 9c1c57d7..b33e878d 100644
--- a/generators/qtdoc/qtdocgenerator.cpp
+++ b/generators/qtdoc/qtdocgenerator.cpp
@@ -1110,6 +1110,8 @@ QString QtDocGenerator::parseArgDocStyle(const AbstractMetaClass *cppClass, cons
defValue = "\"\"";
} else if (defValue == "QStringList()" || defValue.startsWith("QVector") || defValue.startsWith("QList")) {
defValue = "list()";
+ } else if (defValue == "QVariant()") {
+ defValue = "None";
} else {
defValue.replace("::", ".");
if (defValue == "0" && (arg->type()->isQObject() || arg->type()->isObject()))
@@ -1248,6 +1250,8 @@ QString QtDocGenerator::translateToPythonType(const AbstractMetaType *type, cons
QString strType;
if (type->name() == "QString") {
strType = "unicode";
+ } else if (type->name() == "QVariant") {
+ strType = "object";
} else if (type->name() == "QStringList") {
strType = "list of strings";
} else if (type->isConstant() && type->name() == "char" && type->indirections() == 1) {