[Uml-devel] branches/work/soc-umbrello/umbrello/codeimport

Ralf Habacker ralf.habacker at gmail.com
Wed Dec 7 12:27:41 UTC 2011


SVN commit 1267648 by habacker:

commit from trunk r1266790: crash fix on importing idl file

 M  +4 -2      idlimport.cpp  


--- branches/work/soc-umbrello/umbrello/codeimport/idlimport.cpp #1267647:1267648
@@ -178,13 +178,14 @@
         const QString& name = advance();
         UMLObject *ns = Import_Utils::createUMLObject(UMLObject::ot_Class,
                         name, m_scope[m_scopeIndex], m_comment);
-        m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
+        m_klass = static_cast<UMLClassifier*>(ns);
         m_klass->setStereotype("CORBAInterface");
         m_klass->setAbstract(m_isAbstract);
         m_isAbstract = false;
         m_comment.clear();
         if (advance() == ";")   // forward declaration
             return true;
+        m_scope[++m_scopeIndex] = m_klass;
         if (m_source[m_srcIndex] == ":") {
             while (++m_srcIndex < srcLength && m_source[m_srcIndex] != "{") {
                 const QString& baseName = m_source[m_srcIndex];
@@ -257,11 +258,12 @@
         const QString& name = advance();
         UMLObject *ns = Import_Utils::createUMLObject(UMLObject::ot_Class,
                         name, m_scope[m_scopeIndex], m_comment);
-        m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
+        m_klass = static_cast<UMLClassifier*>(ns);
         m_klass->setAbstract(m_isAbstract);
         m_isAbstract = false;
         if (advance() == ";")   // forward declaration
             return true;
+        m_scope[++m_scopeIndex] = m_klass;
         if (m_source[m_srcIndex] == ":") {
             if (advance() == "truncatable")
                 m_srcIndex++;




More information about the umbrello-devel mailing list