From 81f7fc2e70bbe83541c5910ca003a974f8dfb920 Mon Sep 17 00:00:00 2001
From: Christian Kamm <christian.d.kamm@nokia.com>
Date: Fri, 26 Mar 2010 14:16:03 +0100
Subject: [PATCH] QmlJS: Fix reading enumerators from Qml type description.

Previously, the actual enumerator values weren't read correctly.
---
 src/libs/qmljs/qmljsinterpreter.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index b9237424a87..356ebbabcfa 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -513,7 +513,6 @@ private:
         }
 
         FakeMetaEnum metaEnum(name);
-        metaObject->addEnum(metaEnum);
 
         while (_xml.readNextStartElement()) {
             if (_xml.name() == QLatin1String("enumerator"))
@@ -521,6 +520,8 @@ private:
             else
                 unexpectedElement(_xml.name(), tag);
         }
+
+        metaObject->addEnum(metaEnum);
     }
 
     void readEnumerator(FakeMetaEnum *metaEnum)
-- 
GitLab