summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-17 15:01:39 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:08 -0300
commite78a0f399a6c565efb17adc8921f189f825d0547 (patch)
treef4888d1a7f9fbb72f4ab0224a602c8a9fe54b91d
parent93bb443dc983d686ba8d645b3c4c6c9763b04b0e (diff)
Fixed error during the property functions parser.
Fixes bug #302 Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--abstractmetabuilder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 6bfee26c..d2a0caa8 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -1317,7 +1317,8 @@ void AbstractMetaBuilder::traverseFunctions(ScopeModelItem scopeItem, AbstractMe
metaFunction->setPropertySpec(read);
}
} else if (QPropertySpec* write = metaClass->propertySpecForWrite(metaFunction->name())) {
- if (write->type() == metaFunction->arguments().at(0)->type()->typeEntry()) {
+ // make sure the function was created with all aguments, some argument can be missing during the pareser because of errors on typesystem
+ if ((metaFunction->arguments().size() == 1) && (write->type() == metaFunction->arguments().at(0)->type()->typeEntry())) {
*metaFunction += AbstractMetaAttributes::PropertyWriter;
metaFunction->setPropertySpec(write);
}