[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Wed Jan 19 11:15:13 UTC 2005


CVS commit by okellogg: 

createUMLObject(): When the caller requested a specific type
 (type != Uml::ot_UMLObject) then use that type for creating the
 model object for the unadorned type.
With this change, Umbrello successfully imports
  http://www.cs.wustl.edu/~schmidt/ACE_wrappers/ace/RB_Tree.h
with UMBRELLO_INCPATH set to $ACE_ROOT.


  M +6 -4      classimport.cpp   1.66


--- kdesdk/umbrello/umbrello/classimport.cpp  #1.65:1.66
@@ -118,5 +118,8 @@ UMLObject *ClassImport::createUMLObject(
                                 name.remove(QRegExp("^.*::"));  // may also zap "const "
                         }
-                        origType = m_umldoc->createUMLObject(Uml::ot_Class, typeName, parentPkg);
+                        Uml::Object_Type t = type;
+                        if (type == Uml::ot_UMLObject || isConst || isRef || isPointer)
+                                t = Uml::ot_Class;
+                        origType = m_umldoc->createUMLObject(t, typeName, parentPkg);
                 }
                 if (isConst || isPointer || isRef) {
@@ -151,5 +154,5 @@ UMLObject *ClassImport::createUMLObject(
                         o = origType;
                 }
-        } else if (parentPkg) {
+        } else if (parentPkg && !m_putAtGlobalScope) {
                 o->setUMLPackage(parentPkg);
         }
@@ -285,6 +288,5 @@ void ClassImport::feedTheModel(QString f
         }
         CppTree2Uml modelFeeder( fileName, this );
-        kdDebug() << "Now calling modelFeeder.parseTranslationUnit for file "
-                  << fileName << endl;
+        m_umldoc->writeToStatusBar(i18n("Importing file: %1").arg(fileName));
         modelFeeder.parseTranslationUnit( ast );
 }






More information about the umbrello-devel mailing list