[Uml-devel] KDE/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Wed Oct 11 18:42:45 UTC 2006


SVN commit 594617 by okellogg:

writeHeaderAttributeAccessorMethods(): Switch to public if need be.
BUG:85553


 M  +5 -0      ChangeLog  
 M  +7 -2      umbrello/codegenerators/cppwriter.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #594616:594617
@@ -1,3 +1,8 @@
+Version 2.0
+
+* Bugs/wishes from http://bugs.kde.org:
+* Accessor methods are private instead of public (85553)
+
 Version 1.5.5
 
 * PHP5 generator creates stub methods for all interfaces a class implements (C. Brunsdon)
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/cppwriter.cpp #594616:594617
@@ -552,8 +552,6 @@
 
     }
 
-    return;
-
 }
 
 void CppWriter::writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, QTextStream &stream )
@@ -585,9 +583,16 @@
         break;
     }
 
+    // switch to public
+    if (visibility != Uml::Visibility::Public)
+        stream << "public:" << m_endl << m_endl;
+
     // write accessor methods for attribs we found
     writeAttributeMethods(list, visibility, true, false, INLINE_ATTRIBUTE_METHODS, stream);
 
+    // switch back to previous vis.
+    if (visibility != Uml::Visibility::Public)
+        stream << visibility.toString() << ":" << m_endl << m_endl;
 }
 
 // this is for writing *source* or *header* file attribute methods




More information about the umbrello-devel mailing list