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

Oliver Kellogg okellogg at users.sourceforge.net
Fri Dec 23 14:08:03 UTC 2005


SVN commit 490963 by okellogg:

parseOperation(): Include C++ template expressions when looking up types.


 M  +4 -3      model_utils.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/model_utils.cpp #490962:490963
@@ -346,13 +346,12 @@
     if (pos == -1)
         return PS_Illegal_MethodName;
     desc.m_name = pat.cap(1);
-    // Remove possible empty parentheses ()
-    m.remove( QRegExp("\\s*\\(\\s*\\)") );
     desc.m_pReturnType = NULL;
-    pat = QRegExp( ":\\s*(\\w[\\w\\. ]*)$" );
+    pat = QRegExp("\\) *:(.*)$");
     pos = pat.search(m);
     if (pos != -1) {  // return type is optional
         QString retType = pat.cap(1);
+        retType = retType.stripWhiteSpace();
         if (retType != "void") {
             UMLObject *pRetType = owningScope->findTemplate(retType);
             if (pRetType == NULL) {
@@ -363,6 +362,8 @@
             desc.m_pReturnType = pRetType;
         }
     }
+    // Remove possible empty parentheses ()
+    m.remove( QRegExp("\\s*\\(\\s*\\)") );
     desc.m_args.clear();
     pat = QRegExp( "\\((.*)\\)" );
     pos = pat.search(m);




More information about the umbrello-devel mailing list