aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-08-20 19:56:09 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-08-25 18:43:43 -0300
commita051438064f55e63d1ac00f15da1a7ba2b9f88a4 (patch)
tree1ff99133cf0e3f8247868bd81fc8e3618330278f
parent09a312b7788a81e0af59fc090666aea37b71fff7 (diff)
AbstractMetaClass::name() and AbstractMetaType::name() now return only
the name of the class/type without namespace/scope information
-rw-r--r--abstractmetalang.cpp3
-rw-r--r--abstractmetalang.h8
-rw-r--r--qtdocparser.cpp2
3 files changed, 7 insertions, 6 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index a789b9eb6..e3cb07ecc 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -1306,8 +1306,7 @@ bool AbstractMetaClass::hasSignal(const AbstractMetaFunction *other) const
QString AbstractMetaClass::name() const
{
- return m_typeEntry->targetLangName();
-// return QString(m_typeEntry->targetLangName()).replace("::", "_");
+ return QString(m_typeEntry->targetLangName()).split("::").last();
}
void AbstractMetaClass::setBaseClass(AbstractMetaClass *baseClass)
diff --git a/abstractmetalang.h b/abstractmetalang.h
index a7b0be1c0..e313b7b01 100644
--- a/abstractmetalang.h
+++ b/abstractmetalang.h
@@ -345,7 +345,7 @@ public:
}
QString name() const
{
- return m_typeEntry->targetLangName();
+ return QString(m_typeEntry->targetLangName()).split("::").last();
}
QString fullName() const
{
@@ -1365,7 +1365,7 @@ public:
AbstractMetaFunctionList implicitConversions() const;
/**
- * Retrives all class' operator overloads that meet
+ * Retrieves all class' operator overloads that meet
* query crieteria defined with the OperatorQueryOption
* enum.
* /param query composition of OperatorQueryOption enum values
@@ -1428,6 +1428,10 @@ public:
return package() + "." + name();
}
+ /**
+ * Retrieves the class name without any namespace/scope information.
+ * /return the class name without scope information
+ */
QString name() const;
QString baseClassName() const
diff --git a/qtdocparser.cpp b/qtdocparser.cpp
index 0651d5fd5..7ba4a62ea 100644
--- a/qtdocparser.cpp
+++ b/qtdocparser.cpp
@@ -106,8 +106,6 @@ void QtDocParser::fillDocumentation(AbstractMetaClass* metaClass)
int i = 1;
foreach (AbstractMetaArgument* arg, func->arguments()) {
QString type = arg->type()->name();
- /* XXX Hack to get arguments working inside namespaces types */
- type = type.split("::").last();
if (arg->type()->isConstant())
type.prepend("const ");