[Uml-devel] KDE/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Fri Dec 23 11:24:09 UTC 2005


SVN commit 490939 by okellogg:

apply commit 490938 from branches/KDE/3.5

 M  +5 -3      import_utils.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/import_utils.cpp #490938:490939
@@ -117,6 +117,7 @@
         const bool isConst = name.contains(QRegExp("^const "));
         name.remove(QRegExp("^const\\s+"));
         QString typeName(name);
+        const bool isAdorned = typeName.contains( QRegExp("[^\\w: ]") );
         const bool isPointer = typeName.contains('*');
         const bool isRef = typeName.contains('&');
         typeName.remove(QRegExp("[^\\w: ].*$"));
@@ -163,13 +164,13 @@
                 bPutAtGlobalScope = true;
             }
             Uml::Object_Type t = type;
-            if (type == Uml::ot_UMLObject || isConst || isRef || isPointer)
+            if (type == Uml::ot_UMLObject || isAdorned)
                 t = Uml::ot_Class;
             origType = umldoc->createUMLObject(t, typeName, parentPkg);
             bNewUMLObjectWasCreated = true;
             kapp->processEvents();
         }
-        if (isConst || isPointer || isRef) {
+        if (isConst || isAdorned) {
             // Create the full given type (including adornments.)
             if (isConst)
                 name.prepend("const ");
@@ -187,7 +188,8 @@
                 kdError() << "createUMLObject(" << name << "): "
                 << "origType " << typeName << " is not a UMLClassifier"
                 << endl;
-            dt->setIsReference();
+            if (isRef || isPointer)
+                dt->setIsReference();
             /*
             if (isPointer) {
                 UMLObject *pointerDecl = umldoc->createUMLObject(Uml::ot_Datatype, type);




More information about the umbrello-devel mailing list