aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-01-26 22:04:05 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-01-26 22:04:05 -0200
commit8ae4a89abd334610293a4785856acbf59ffd25af (patch)
tree101d458253f57885d02d11a8c2dfe686965c8a5e /abstractmetalang.cpp
parent8f3b64c6570d07a9d807ce245291d6565cf3f4ae (diff)
Add helper method AbstractMetaClassList::findClass(const TypeEntry* typeEntry).
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r--abstractmetalang.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp
index 725a4adc..ff27a9b1 100644
--- a/abstractmetalang.cpp
+++ b/abstractmetalang.cpp
@@ -2210,3 +2210,12 @@ AbstractMetaClass *AbstractMetaClassList::findClass(const QString &name) const
return 0;
}
+
+AbstractMetaClass *AbstractMetaClassList::findClass(const TypeEntry* typeEntry) const
+{
+ foreach (AbstractMetaClass* c, *this) {
+ if (c->typeEntry() == typeEntry)
+ return c;
+ }
+ return 0;
+}