aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-12-20 19:42:14 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:20 -0300
commitc19323bbe798f6e3a5cc4d2714789ede8b025e0d (patch)
treedb3effabf52427c4a43816b7960b2cef14a4009b /abstractmetalang.cpp
parent470991329c637150eb44a223a9e061a62ea6ce2f (diff)
AbstractMetaTypes for object types used as values must have the Value usage pattern.
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r--abstractmetalang.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index 04fec2d8c..fefda5046 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -150,13 +150,15 @@ void AbstractMetaType::decideUsagePattern()
} else if (type->isEnum() && !actualIndirections()) {
setTypeUsagePattern(AbstractMetaType::EnumPattern);
- } else if (type->isObject()
- && indirections() == 0
- && isReference()) {
- if (((ComplexTypeEntry*) type)->isQObject())
- setTypeUsagePattern(AbstractMetaType::QObjectPattern);
- else
- setTypeUsagePattern(AbstractMetaType::ObjectPattern);
+ } else if (type->isObject() && indirections() == 0) {
+ if (isReference()) {
+ if (((ComplexTypeEntry*) type)->isQObject())
+ setTypeUsagePattern(AbstractMetaType::QObjectPattern);
+ else
+ setTypeUsagePattern(AbstractMetaType::ObjectPattern);
+ } else {
+ setTypeUsagePattern(AbstractMetaType::ValuePattern);
+ }
} else if (type->isObject()
&& indirections() == 1) {