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

Gopala Krishna A krishna.ggk at gmail.com
Mon Mar 23 10:28:50 UTC 2009


SVN commit 943068 by gopala:

Merged revisions 931178,931778,933098,937082,937536 via svnmerge from 
svn+ssh://svn.kde.org/home/kde/trunk/KDE/kdesdk/umbrello

........
  r931178 | fischer | 2009-02-25 03:33:56 +0530 (Wed, 25 Feb 2009) | 1 line
  
  Method parameters as const ref.
........
  r931778 | scripty | 2009-02-26 01:05:15 +0530 (Thu, 26 Feb 2009) | 1 line
  
  SVN_SILENT made messages (.desktop file)
........
  r933098 | coles | 2009-02-28 05:14:14 +0530 (Sat, 28 Feb 2009) | 3 lines
  
  Very minor style change: there's -> there is.
........
  r937082 | fischer | 2009-03-09 04:39:14 +0530 (Mon, 09 Mar 2009) | 1 line
  
  Some comments added and fixed.
........
  r937536 | fischer | 2009-03-10 03:09:10 +0530 (Tue, 10 Mar 2009) | 1 line
  
  Some comments fixed.
........


 _M            . (directory)  
 M  +62 -25    umbrello/classifier.cpp  
 M  +4 -1      umbrello/codegenerators/codeblock.cpp  
 M  +0 -5      umbrello/codegenerators/codeblock.h  
 M  +4 -4      umbrello/codegenerators/codedocument.cpp  
 M  +14 -13    umbrello/codeimport/nativeimportbase.cpp  
 M  +2 -2      umbrello/codeimport/nativeimportbase.h  
 M  +1 -1      umbrello/umbrello.desktop  
 M  +1 -1      umbrello/widgets/objectnodewidget.cpp  


** branches/work/soc-umbrello #property svnmerge-integrated
   - /trunk/KDE/kdesdk/umbrello:1-854015,854687,854787,855207-866962,866965-870129,871091,872169-887978,889968-889981,890075-890805,896752-896872,901256-910119,911086,911706-911805,912902,913652,916104,916343,916990-917128,917351,918579-919414,920540-921357,922431,922854-927155,928929-928936
   + /trunk/KDE/kdesdk/umbrello:1-854015,854687,854787,855207-866962,866965-870129,871091,872169-887978,889968-889981,890075-890805,896752-896872,901256-910119,911086,911706-911805,912902,913652,916104,916343,916990-917128,917351,918579-919414,920540-921357,922431,922854-927155,928929-928936,931178-937536
--- branches/work/soc-umbrello/umbrello/classifier.cpp #943067:943068
@@ -64,6 +64,7 @@
 /**
  * Reimplementation of method from class UMLObject for controlling the
  * exact type of this classifier: class, interface, or datatype.
+ * @param ot   the base type to set
  */
 void UMLClassifier::setBaseType(Uml::Object_Type ot)
 {
@@ -215,9 +216,9 @@
  *                       none given.)
  * @param isExistingOp   Optional pointer to bool. If supplied, the bool is
  *                       set to true if an existing operation is returned.
- * @param params    Optional list of parameter names and types.
- *                  If supplied, new operation parameters are
- *                  constructed using this list.
+ * @param params         Optional list of parameter names and types.
+ *                       If supplied, new operation parameters are
+ *                       constructed using this list.
  * @return The new operation, or NULL if the operation could not be
  *         created because for example, the user canceled the dialog
  *         or no appropriate name can be found.
@@ -280,12 +281,11 @@
 
 /**
  * Appends an operation to the classifier.
- * @see bool addOperation(UMLOperation* Op, int position = -1)
  * This function is mainly intended for the clipboard.
  *
- * @param op    Pointer to the UMLOperation to add.
- * @param log   Pointer to the IDChangeLog.
- * @return      True if the operation was added successfully.
+ * @param op         Pointer to the UMLOperation to add.
+ * @param position   Inserted at the given position.
+ * @return           True if the operation was added successfully.
  */
 bool UMLClassifier::addOperation(UMLOperation* op, int position )
 {
@@ -365,6 +365,11 @@
     return m_List.count();
 }
 
+/**
+ * Create and add a just created template.
+ * @param currentName   the name of the template
+ * @return              the template or NULL
+ */
 UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString()*/)
 {
     QString name = currentName;
@@ -527,6 +532,12 @@
     return list;
 }
 
+/**
+ * Find the child object by the given id.
+ * @param id                  the id of the child object
+ * @param considerAncestors   flag whether the ancestors should be considered during search
+ * @return                    the found child object or NULL
+ */
 UMLObject* UMLClassifier::findChildObjectById(Uml::IDType id, bool considerAncestors /* =false */)
 {
     UMLObject *o = UMLCanvasObject::findChildObjectById(id);
@@ -587,8 +598,8 @@
 /**
  * Returns a list of concepts which this concept inherits from.
  *
- * @param type              The ClassifierType to seek.
- * @return  List of UMLClassifiers we inherit from.
+ * @param type   The ClassifierType to seek.
+ * @return       List of UMLClassifiers we inherit from.
  */
 UMLClassifierList UMLClassifier::findSuperClassConcepts (ClassifierType type)
 {
@@ -697,7 +708,9 @@
     return success;
 }
 
-/** reimplemented from UMLObject */
+/**
+ * Reimplemented from UMLObject.
+ */
 bool UMLClassifier::acceptAssociationType(Uml::Association_Type type)
 {
     switch(type)
@@ -773,6 +786,14 @@
     return newAttribute;
 }
 
+/**
+ * Creates and adds an attribute for the class.
+ *
+ * @param name  an optional name, used by when creating through UMLListView
+ * @param id    an optional id
+ * @return      the UMLAttribute created and added
+ */
+
 UMLAttribute* UMLClassifier::addAttribute(const QString &name, Uml::IDType id /* = Uml::id_None */)
 {
     foreach (UMLObject* obj, m_List ) {
@@ -793,13 +814,10 @@
  * Adds an already created attribute.
  * The attribute object must not belong to any other concept.
  *
- * @param att        Pointer to the UMLAttribute.
- * @param log        Pointer to the IDChangeLog (optional.)
- * @param position   Position index for the insertion (optional.)
- *                   If the position is omitted, or if it is
- *                   negative or too large, the attribute is added
- *                   to the end of the list.
- * @return           True if the attribute was successfully added.
+ * @param name    the name of the attribute
+ * @param type    the type of the attribute 
+ * @param scope   the visibility of the attribute
+ * @return        the just created and added attribute
  */
 UMLAttribute* UMLClassifier::addAttribute(const QString &name, UMLObject *type, Uml::Visibility scope)
 {
@@ -817,6 +835,18 @@
     return a;
 }
 
+/**
+ * Adds an already created attribute.
+ * The attribute object must not belong to any other concept.
+ *
+ * @param att        Pointer to the UMLAttribute.
+ * @param log        Pointer to the IDChangeLog (optional.)
+ * @param position   Position index for the insertion (optional.)
+ *                   If the position is omitted, or if it is
+ *                   negative or too large, the attribute is added
+ *                   to the end of the list.
+ * @return           True if the attribute was successfully added.
+ */
 bool UMLClassifier::addAttribute(UMLAttribute* att, IDChangeLog* log /* = 0 */,
                                  int position /* = -1 */)
 {
@@ -897,7 +927,7 @@
 }
 
 /**
- * counts the number of operations in the Classifier.
+ * Counts the number of operations in the Classifier.
  *
  * @return   The number of operations for the Classifier.
  */
@@ -952,8 +982,8 @@
  * Returns the entries in m_List that are of the requested type.
  * If the requested type is Uml::ot_UMLObject then all entries
  * are returned.
- *
- * @return  The list of true operations for the Concept.
+ * @param ot   the requested object type
+ * @return     The list of true operations for the Concept.
  */
 UMLClassifierListItemList UMLClassifier::getFilteredList(Uml::Object_Type ot) const
 {
@@ -975,9 +1005,9 @@
  * Adds an already created template.
  * The template object must not belong to any other concept.
  *
- * @param newTemplate   Pointer to the UMLTemplate object to add.
- * @param log           Pointer to the IDChangeLog.
- * @return  True if the template was successfully added.
+ * @param name   the name of the template
+ * @param id     the id of the template
+ * @return       the added template
  */
 UMLTemplate* UMLClassifier::addTemplate(const QString &name, Uml::IDType id)
 {
@@ -999,7 +1029,7 @@
  *
  * @param newTemplate   Pointer to the UMLTemplate object to add.
  * @param log           Pointer to the IDChangeLog.
- * @return  True if the template was successfully added.
+ * @return              True if the template was successfully added.
  */
 bool UMLClassifier::addTemplate(UMLTemplate* newTemplate, IDChangeLog* log /* = 0*/)
 {
@@ -1070,6 +1100,8 @@
 
 /**
  * Seeks the template parameter of the given name.
+ * @param name   the template name
+ * @return       the found template or 0
  */
 UMLTemplate *UMLClassifier::findTemplate(const QString& name)
 {
@@ -1079,7 +1111,7 @@
             return templt;
         }
     }
-    return NULL;
+    return 0;
 }
 
 /**
@@ -1195,6 +1227,7 @@
 
 /**
  * Set the origin type (in case of e.g. typedef)
+ * @param origType   the origin type to set
  */
 void UMLClassifier::setOriginType(UMLClassifier *origType)
 {
@@ -1203,6 +1236,7 @@
 
 /**
  * Get the origin type (in case of e.g. typedef)
+ * @return   the origin type
  */
 UMLClassifier * UMLClassifier::originType() const
 {
@@ -1211,6 +1245,7 @@
 
 /**
  * Set the m_isRef flag (true when dealing with a pointer type)
+ * @param isRef   the flag to set
  */
 void UMLClassifier::setIsReference(bool isRef)
 {
@@ -1219,6 +1254,7 @@
 
 /**
  * Get the m_isRef flag.
+ * @return   true if is reference, otherwise false
  */
 bool UMLClassifier::isReference() const
 {
@@ -1227,6 +1263,7 @@
 
 /**
  * Return true if this classifier has associations.
+ * @return   true if classifier has associations
  */
 bool UMLClassifier::hasAssociations()
 {
--- branches/work/soc-umbrello/umbrello/codegenerators/codeblock.cpp #943067:943068
@@ -20,6 +20,9 @@
     m_contentType = AutoGenerated;
 }
 
+/**
+ * Empty Destructor
+ */
 CodeBlock::~CodeBlock ( )
 {
 }
@@ -86,7 +89,7 @@
 /**
  * Set the class attributes of this object from
  * the passed element node.
- * @param element   the xmi element from which to load
+ * @param elem   the xmi element from which to load
  */
 void CodeBlock::setAttributesFromNode (QDomElement & elem)
 {
--- branches/work/soc-umbrello/umbrello/codegenerators/codeblock.h #943067:943068
@@ -29,10 +29,6 @@
     enum ContentType {AutoGenerated=0, UserGenerated };
 
     explicit CodeBlock ( CodeDocument * parent, const QString & body = "");
-
-    /**
-     * Empty Destructor
-     */
     virtual ~CodeBlock ( );
 
     void setContentType ( ContentType new_var );
@@ -42,7 +38,6 @@
     static QString enumToString(const ContentType& val);
 
     virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
-
     virtual void loadFromXMI ( QDomElement & root );
 
     virtual void setAttributesFromObject (TextBlock * obj);
--- branches/work/soc-umbrello/umbrello/codegenerators/codedocument.cpp #943067:943068
@@ -130,9 +130,9 @@
  * Set the value of m_ID.
  * @param new_id   the new value of m_ID
  */
-void CodeDocument::setID ( const QString &new_var )
+void CodeDocument::setID ( const QString &new_id )
 {
-    m_ID = new_var;
+    m_ID = new_id;
 }
 
 /**
@@ -170,9 +170,9 @@
  * Set a Header comment object.
  * @param comment   the comment for the header
  */
-void CodeDocument::setHeader ( CodeComment * header )
+void CodeDocument::setHeader ( CodeComment * comment )
 {
-    m_header = header;
+    m_header = comment;
 }
 
 /**
--- branches/work/soc-umbrello/umbrello/codeimport/nativeimportbase.cpp #943067:943068
@@ -75,7 +75,7 @@
  * given by `until'.
  * @param until   the target string
  */
-void NativeImportBase::skipStmt(QString until /* = ";" */)
+void NativeImportBase::skipStmt(const QString& until /* = ";" */)
 {
     const int srcLength = m_source.count();
     while (m_srcIndex < srcLength && m_source[m_srcIndex] != until)
@@ -253,19 +253,19 @@
  * @param lin   the line to split
  * @return the parts of the line
  */
-QStringList NativeImportBase::split(const QString& lin)
+QStringList NativeImportBase::split(const QString& line)
 {
     QStringList list;
     QString listElement;
     QChar stringIntro = 0;  // buffers the string introducer character
     bool seenSpace = false;
-    QString line = lin.trimmed();
-    for (int i = 0; i < line.length(); ++i) {
-        const QChar& c = line[i];
+    QString ln = line.trimmed();
+    for (int i = 0; i < ln.length(); ++i) {
+        const QChar& c = ln[i];
         if (stringIntro.toLatin1()) {        // we are in a string
             listElement += c;
             if (c == stringIntro) {
-                if (line[i - 1] != '\\') {
+                if (ln[i - 1] != '\\') {
                     list.append(listElement);
                     listElement.clear();
                     stringIntro = 0;  // we are no longer in a string
@@ -303,22 +303,23 @@
  * Stores possible comments in `m_comment'.
  * @param line  The line to scan.
  */
-void NativeImportBase::scan(QString line)
+void NativeImportBase::scan(const QString& line)
 {
-    if (preprocess(line))
+    QString ln = line;
+    if (preprocess(ln))
         return;
     // Check for single line comment.
-    int pos = line.indexOf(m_singleLineCommentIntro);
+    int pos = ln.indexOf(m_singleLineCommentIntro);
     if (pos != -1) {
-        QString cmnt = line.mid(pos);
+        QString cmnt = ln.mid(pos);
         m_source.append(cmnt);
         if (pos == 0)
             return;
-        line = line.left(pos);
+        ln = ln.left(pos);
     }
-    if (line.contains(QRegExp("^\\s*$")))
+    if (ln.contains(QRegExp("^\\s*$")))
         return;
-    const QStringList words = split(line);
+    const QStringList words = split(ln);
     for (QStringList::ConstIterator it = words.begin(); it != words.end(); ++it) {
         QString word = *it;
         if (word[0] == '"' || word[0] == '\'')
--- branches/work/soc-umbrello/umbrello/codeimport/nativeimportbase.h #943067:943068
@@ -57,7 +57,7 @@
 
     virtual void initVars();
 
-    void scan(QString line);
+    void scan(const QString& line);
 
     virtual bool preprocess(QString& line);
 
@@ -80,7 +80,7 @@
      */
     virtual bool parseStmt() = 0;
 
-    void skipStmt(QString until = ";");
+    void skipStmt(const QString& until = ";");
     bool skipToClosing(QChar opener);
 
     QString advance();
--- branches/work/soc-umbrello/umbrello/umbrello.desktop #943067:943068
@@ -25,7 +25,7 @@
 GenericName[fa]=مدل‌ساز UML
 GenericName[fi]=UML-mallintaja
 GenericName[fr]=Modeleur UML
-GenericName[ga]=Múnlóir UML
+GenericName[ga]=Samhaltóir UML
 GenericName[gl]=Modelador de UML
 GenericName[hu]=UML-modellező
 GenericName[it]=Modellatore UML
--- branches/work/soc-umbrello/umbrello/widgets/objectnodewidget.cpp #943067:943068
@@ -110,7 +110,7 @@
 void ObjectNodeWidget::askStateForWidget()
 {
     bool pressedOK = false;
-    QString state = KInputDialog::getText(i18n("Enter Object Flow State"),i18n("Enter State (keep '-' if there's no state for the object) "),i18n("-"), &pressedOK, UMLApp::app());
+    QString state = KInputDialog::getText(i18n("Enter Object Flow State"),i18n("Enter State (keep '-' if there is no state for the object) "),i18n("-"), &pressedOK, UMLApp::app());
 
     if (pressedOK) {
         setState(state);




More information about the umbrello-devel mailing list