aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetabuilder.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-04-08 15:06:58 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:16 -0300
commit38e7c4839a89fa2bf7602143d779eb99dee5c9de (patch)
treeebf3bb05435530e939cd66013d1305e58e5aa336 /abstractmetabuilder.cpp
parent190b04bd9d47ed5e4b6d9d401b8574b36da105e5 (diff)
Fixed conversion operators type resolution for references to types.
This is fixes bug #716: http://bugs.pyside.org/show_bug.cgi?id=716 Unit tests were added as usual. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'abstractmetabuilder.cpp')
-rw-r--r--abstractmetabuilder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp
index 72f7ab91d..45ceab872 100644
--- a/abstractmetabuilder.cpp
+++ b/abstractmetabuilder.cpp
@@ -1334,6 +1334,11 @@ void AbstractMetaBuilder::fixReturnTypeOfConversionOperator(AbstractMetaFunction
TypeDatabase* types = TypeDatabase::instance();
QString castTo = metaFunction->name().remove(QRegExp("^operator ")).trimmed();
+ if (castTo.endsWith('&'))
+ castTo.chop(1);
+ if (castTo.startsWith("const "))
+ castTo.remove(0, 6);
+
TypeEntry* retType = types->findType(castTo);
if (!retType)
return;