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

Gopala Krishna A krishna.ggk at gmail.com
Fri Jun 19 20:05:44 UTC 2009


SVN commit 984043 by gopala:

Oddly a friend function was used to inialize Symbol::symbolTable.
Make it a static member function instead. (prevents scope resolution)



 M  +4 -4      newlinepath.cpp  
 M  +1 -1      newlinepath.h  


--- branches/work/soc-umbrello/umbrello/newlinepath.cpp #984042:984043
@@ -44,9 +44,9 @@
     };
 
     /// @internal A convenience method to setup shapes of all symbols.
-    void setupSymbolTable()
+    void Symbol::setupSymbolTable()
     {
-        Symbol::SymbolProperty &arrow = Symbol::symbolTable[Symbol::Arrow];
+        SymbolProperty &arrow = symbolTable[Arrow];
         if (arrow.shape.isEmpty()) {
             QRectF rect = arrow.boundRect;
             // Defines a 'V' shape arrow fitting in the bound rect.
@@ -55,7 +55,7 @@
             arrow.shape.lineTo(rect.topRight());
         }
 
-        Symbol::SymbolProperty &diamond = Symbol::symbolTable[Symbol::Diamond];
+        SymbolProperty &diamond = symbolTable[Diamond];
         if (diamond.shape.isEmpty()) {
             QRectF rect = diamond.boundRect;
             // Defines a 'diamond' shape fitting in the bound rect.
@@ -66,7 +66,7 @@
             diamond.shape.lineTo(rect.center().x(), rect.top());
         }
 
-        Symbol::SymbolProperty &circle = Symbol::symbolTable[Symbol::Circle];
+        SymbolProperty &circle = symbolTable[Circle];
         if (circle.shape.isEmpty()) {
             QRectF rect = circle.boundRect;
             // Defines a circle with a horizontal-vertical cross lines.
--- branches/work/soc-umbrello/umbrello/newlinepath.h #984042:984043
@@ -94,7 +94,7 @@
 
         /// A table which stores all symbol properties.
         static SymbolProperty symbolTable[Symbol::Count];
-        friend void setupSymbolTable();
+        static void setupSymbolTable();
     };
 
 




More information about the umbrello-devel mailing list