[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdesdk/umbrello/umbrello
From:       Oliver Kellogg <okellogg () users ! sourceforge ! net>
Date:       2005-12-23 19:23:45
Message-ID: 1135365825.389328.31512.nullmailer () svn ! kde ! org
[Download RAW message or body]

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);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic