aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-07-08 17:05:21 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:07 -0300
commit9961a25273bd6ff59efdef4d482269eea8c069d0 (patch)
treefd98f7e73c5793c0ca894f5487a74ba1060dc0a4 /abstractmetalang.h
parent681f738fe473239d73172fdc979c208fdf434e2d (diff)
Fix bug#260 - "Can't modify argument name of a function added with add-function tag."
Diffstat (limited to 'abstractmetalang.h')
-rw-r--r--abstractmetalang.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/abstractmetalang.h b/abstractmetalang.h
index ba72b35c..ed7157c8 100644
--- a/abstractmetalang.h
+++ b/abstractmetalang.h
@@ -606,7 +606,7 @@ private:
class APIEXTRACTOR_API AbstractMetaVariable
{
public:
- AbstractMetaVariable() : m_type(0) {}
+ AbstractMetaVariable() : m_type(0), m_hasName(false) {}
AbstractMetaType *type() const
{
@@ -621,11 +621,23 @@ public:
{
return m_name;
}
- void setName(const QString &name)
+ void setName(const QString &name, bool realName = true)
{
m_name = name;
+ m_hasName = realName;
+ }
+ bool hasName() const
+ {
+ return m_hasName;
+ }
+ QString originalName() const
+ {
+ return m_originalName;
+ }
+ void setOriginalName(const QString& name)
+ {
+ m_originalName = name;
}
-
void setDocumentation(const Documentation& doc)
{
m_doc = doc;
@@ -636,8 +648,10 @@ public:
}
private:
+ QString m_originalName;
QString m_name;
AbstractMetaType *m_type;
+ bool m_hasName;
Documentation m_doc;
};
@@ -682,20 +696,8 @@ public:
m_argumentIndex = argIndex;
}
- QString argumentName() const;
- QString indexedName() const;
-
AbstractMetaArgument *copy() const;
-
- bool hasName() const
- {
- return !AbstractMetaVariable::name().isEmpty();
- }
-
private:
- // Just to force people to call argumentName() And indexedName();
- QString name() const;
-
QString m_expression;
QString m_originalExpression;
int m_argumentIndex;