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

Oliver Kellogg okellogg at users.sourceforge.net
Sat Aug 11 23:36:57 UTC 2007


SVN commit 699077 by okellogg:

move closer to trunk

 M  +1 -0      activitywidget.cpp  
 M  +0 -1      artifact.h  
 M  +3 -3      classifier.cpp  
 M  +1 -1      classifierlistitem.cpp  
 M  +5 -5      classifierwidget.cpp  
 M  +0 -1      clipboard/umldrag.cpp  
 M  +3 -3      codegenerators/csharpwriter.cpp  
 M  +0 -3      codegenerators/simplecodegenerator.h  
 M  +0 -3      codegenobjectwithtextblocks.h  
 M  +0 -1      codeimport/cppimport.cpp  
 M  +0 -2      codeimport/import_utils.h  
 M  +0 -1      codemethodblock.h  
 M  +0 -1      component.h  
 M  +7 -7      floatingtextwidget.cpp  
 M  +1 -1      floatingtextwidgetcontroller.cpp  
 M  +9 -9      import_rose.cpp  
 M  +2 -0      model_utils.cpp  
 M  +0 -1      node.h  
 M  +0 -1      umlcanvasobject.h  
 M  +7 -5      umllistview.cpp  
 M  +0 -1      umllistviewitem.cpp  
 M  +2 -2      umlwidget.cpp  
 M  +1 -1      widgetbase.h  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/activitywidget.cpp #699076:699077
@@ -148,6 +148,7 @@
 
 void ActivityWidget::setActivityType( ActivityType activityType ) {
     m_ActivityType = activityType;
+    updateComponentSize();
     UMLWidget::m_bResizable = true;
 }
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/artifact.h #699076:699077
@@ -14,7 +14,6 @@
 
 #include "umlcanvasobject.h"
 
-class IDChangeLog;
 
 /**
  * This class contains the non-graphical information required for a UML
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifier.cpp #699076:699077
@@ -64,7 +64,7 @@
             newIcon = Uml::it_Interface;
             break;
         case ot_Class:
-            UMLObject::setStereotype(QString::null);
+            UMLObject::setStereotype(QString());
             UMLObject::m_bAbstract = false;
             newIcon = Uml::it_Class;
             break;
@@ -276,7 +276,7 @@
     return m_List.count();
 }
 
-UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString::null*/) {
+UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString()*/) {
     QString name = currentName;
     bool goodName = !name.isEmpty();
     if (!goodName)
@@ -495,7 +495,7 @@
     return false; //shutup compiler warning
 }
 
-UMLAttribute* UMLClassifier::createAttribute(const QString &name /*=null*/,
+UMLAttribute* UMLClassifier::createAttribute(const QString &name,
                                              UMLObject *type,
                                              Uml::Visibility vis,
                                              const QString &init) {
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifierlistitem.cpp #699076:699077
@@ -76,7 +76,7 @@
 void UMLClassifierListItem::setTypeName(const QString &type) {
     if (type.isEmpty() || type == "void") {
         m_pSecondary = NULL;
-        m_SecondaryId = QString::null;
+        m_SecondaryId = QString();
         return;
     }
     UMLDoc *pDoc = UMLApp::app()->getDocument();
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifierwidget.cpp #699076:699077
@@ -399,12 +399,12 @@
     case ListPopupMenu::mt_Operation:
     case ListPopupMenu::mt_Template:
         {
-            UMLDoc *doc = UMLApp::app()->getDocument();
             Uml::Object_Type ot = ListPopupMenu::convert_MT_OT(mt);
-            if (Object_Factory::createChildObject(getClassifier(), ot))
-                doc->setModified();
-            updateComponentSize();
-            update();
+            if (Object_Factory::createChildObject(getClassifier(), ot)) {
+                updateComponentSize();
+                update();
+                UMLApp::app()->getDocument()->setModified();
+            }
             break;
         }
     case ListPopupMenu::mt_Show_Operations:
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/clipboard/umldrag.cpp #699076:699077
@@ -599,7 +599,6 @@
 bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
                           UMLWidgetList& widgets,
                           AssociationWidgetList& associations, Uml::Diagram_Type & dType) {
-    UMLDoc* doc = UMLApp::app()->getDocument();
     if ( !mimeSource->provides("application/x-uml-clip4") ) {
         return false;
     }
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/csharpwriter.cpp #699076:699077
@@ -477,7 +477,7 @@
 
             // FIXME: "returns" should contain documentation, not type.
             cs << m_container_indent << m_indentation << "/// <returns>";
-            if (op->getTypeName() != "") {
+            if (! op->getTypeName().isEmpty()) {
                 cs << makeLocalTypeName(op);
             }
             cs << "</returns>" << m_endl;
@@ -500,7 +500,7 @@
         }
 
         // return type
-        if (op->getTypeName() == "") {
+        if (op->getTypeName().isEmpty()) {
             cs << "void ";
         }
         else {
@@ -637,7 +637,7 @@
             writeAttribute(roleDoc, a->getVisibility(Uml::B), false, typeName, roleName, "", ( a->getVisibility(Uml::B) != Uml::Visibility::Private), cs);
         } else {
             // array
-            roleDoc += "\n(Array of " + typeName + ")";
+            roleDoc += "\n(Array of " + typeName + ')';
             writeAttribute(roleDoc, a->getVisibility(Uml::B), false, "ArrayList", roleName, "", ( a->getVisibility(Uml::B) != Uml::Visibility::Private), cs);
         }
     }
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/simplecodegenerator.h #699076:699077
@@ -26,10 +26,7 @@
 #include "../codegenerator.h"
 #include "../umlnamespace.h"
 
-class QTextStream;
 class UMLDoc;
-class UMLAttribute;
-class CodeBlockWithComments;
 
 /**
   * A simple code generator interface designed to work with
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenobjectwithtextblocks.h #699076:699077
@@ -26,12 +26,9 @@
 class CodeClassField;
 class CodeComment;
 class CodeDocument;
-class CodeOperation;
 class HierarchicalCodeBlock;
 class TextBlock;
 
-class UMLDoc;
-class UMLOperation;
 
 /**
   * class CodeGenObjectWithTextBlocks
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport/cppimport.cpp #699076:699077
@@ -14,7 +14,6 @@
 // qt/kde includes
 #include <qmap.h>
 #include <qregexp.h>
-#include <kapplication.h>
 #include <kmessagebox.h>
 #include <kdebug.h>
 // app includes
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport/import_utils.h #699076:699077
@@ -16,13 +16,11 @@
 #include "../umlnamespace.h"
 #include "../umlattributelist.h"
 
-class UMLDoc;
 class UMLObject;
 class UMLClassifier;
 class UMLPackage;
 class UMLOperation;
 class UMLEnum;
-class CppDriver;
 
 /**
  * Utilities for code import
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codemethodblock.h #699076:699077
@@ -25,7 +25,6 @@
 #include "umlnamespace.h"
 
 class ClassifierCodeDocument;
-class CodeClassField;
 
 /**
   * class CodeMethodBlock
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/component.h #699076:699077
@@ -14,7 +14,6 @@
 
 #include "package.h"
 
-class IDChangeLog;
 
 /**
  * This class contains the non-graphical information required for a
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/floatingtextwidget.cpp #699076:699077
@@ -189,16 +189,16 @@
         if (assoc) {
             switch (m_Role) {
               case Uml::tr_MultiA:
-                assoc->setMulti(QString::null, Uml::A);
+                assoc->setMulti(QString(), Uml::A);
                 break;
               case Uml::tr_MultiB:
-                assoc->setMulti(QString::null, Uml::B);
+                assoc->setMulti(QString(), Uml::B);
                 break;
               case Uml::tr_RoleAName:
-                assoc->setRoleName(QString::null, Uml::A);
+                assoc->setRoleName(QString(), Uml::A);
                 break;
               case Uml::tr_RoleBName:
-                assoc->setRoleName(QString::null, Uml::B);
+                assoc->setRoleName(QString(), Uml::B);
                 break;
               case Uml::tr_ChangeA:
                 assoc->setChangeability(Uml::chg_Changeable, Uml::A);
@@ -207,13 +207,13 @@
                 assoc->setChangeability(Uml::chg_Changeable, Uml::B);
                 break;
               default:
-                assoc->setName(QString::null);
+                assoc->setName(QString());
                 break;
             }
         } else {
             MessageWidget *msg = dynamic_cast<MessageWidget*>(m_pLink);
             if (msg) {
-                msg->setName(QString::null);
+                msg->setName(QString());
                 m_pView->removeWidget(this);
             }
         }
@@ -320,7 +320,7 @@
             if (od.m_pReturnType)
                 op->setType(od.m_pReturnType);
             m_pLink->setOperation(op);
-            opText = QString::null;
+            opText = QString();
         } else {
             m_pLink->setOperation(NULL);
         }
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/floatingtextwidgetcontroller.cpp #699076:699077
@@ -39,7 +39,7 @@
     m_movementDirectionY = 0;
 }
 
-bool FloatingTextWidgetController::isInResizeArea(QMouseEvent *me) {
+bool FloatingTextWidgetController::isInResizeArea(QMouseEvent* /*me*/) {
     return false;
 }
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/import_rose.cpp #699076:699077
@@ -69,7 +69,7 @@
             lexeme += c;
             if (inString) {
                 result.append(lexeme);
-                lexeme = QString::null;
+                lexeme = QString();
             }
             inString = !inString;
         } else if (inString ||
@@ -78,7 +78,7 @@
         } else {
             if (!lexeme.isEmpty()) {
                 result.append(lexeme);
-                lexeme = QString::null;
+                lexeme = QString();
             }
             if (! c.isSpace()) {
                 result.append(QString(c));
@@ -142,7 +142,7 @@
  */
 QString extractImmediateValues(QStringList& l) {
     if (l.count() == 0)
-        return QString::null;
+        return QString();
     if (l.first() == "(")
         l.pop_front();
     QString result;
@@ -176,21 +176,21 @@
             break;
         if (line[0] != '|') {
             kError() << loc() << "expecting '|' at start of verbatim text" << endl;
-            return QString::null;
+            return QString();
         } else {
-            result += line.mid(1) + "\n";
+            result += line.mid(1) + '\n';
         }
     }
     if (line.isNull()) {
         kError() << loc() << "premature EOF" << endl;
-        return QString::null;
+        return QString();
     }
     if (! line.isEmpty()) {
         for (uint i = 0; i < line.length(); i++) {
             const QChar& clParenth = line[i];
             if (clParenth != ')') {
                 kError() << loc() << "expected ')', found: " << clParenth << endl;
-                return QString::null;
+                return QString();
             }
             nClosures++;
         }
@@ -221,11 +221,11 @@
 QString extractValue(QStringList& l, QTextStream& stream) {
     methodName("extractValue");
     if (l.count() == 0)
-        return QString::null;
+        return QString();
     if (l.first() == "(")
         l.pop_front();
     if (l.first() != "value")
-        return QString::null;
+        return QString();
     l.pop_front();  // remove "value"
     l.pop_front();  // remove the value type: could be e.g. "Text" or "cardinality"
     QString result;
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/model_utils.cpp #699076:699077
@@ -614,6 +614,8 @@
         return Uml::pl_Cpp;
     if (str == "C#")
         return Uml::pl_CSharp;
+    if (str == "D")
+        return Uml::pl_D;
     if (str == "IDL")
         return Uml::pl_IDL;
     if (str == "Java")
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/node.h #699076:699077
@@ -14,7 +14,6 @@
 
 #include "umlcanvasobject.h"
 
-class IDChangeLog;
 
 /**
  * This class contains the non-graphical information required for a UML Node.
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlcanvasobject.h #699076:699077
@@ -17,7 +17,6 @@
 #include "umlclassifierlist.h"
 #include "umlassociationlist.h"
 
-class IDChangeLog;
 
 /**
  * This class contains the non-graphical information required for UMLObjects
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistview.cpp #699076:699077
@@ -1848,10 +1848,6 @@
          parentItem = m_datatypeFolder;
      }
 
-    UMLPackage *parentPkg = dynamic_cast<UMLPackage*>(parentItem->getUMLObject());
-    if (parentPkg == NULL)
-        kError() << "UMLListView::addNewItem(type " << type
-            << "): parentPkg is NULL" << endl;
     UMLListViewItem * newItem = NULL;
     parentItem->setOpen( true );
 
@@ -1869,6 +1865,13 @@
                 << type << endl;
             return;
         }
+        UMLPackage *parentPkg =
+            dynamic_cast<UMLPackage*>(parentItem->getUMLObject());
+        if (parentPkg == NULL) {
+            kError() << "UMLListView::addNewItem(type " << type
+                << "): parentPkg is NULL" << endl;
+            return;
+        }
         if (Model_Utils::typeIsClassifierList(type)) {
             UMLClassifier *parent = static_cast<UMLClassifier*>(parentPkg);
             name = parent->uniqChildName(ot);
@@ -1876,7 +1879,6 @@
             name = Model_Utils::uniqObjectName(ot, parentPkg);
         }
         newItem = new UMLListViewItem(parentItem, name, type, (UMLObject*)0);
-        newItem->setIcon(icon);
     }
     m_bIgnoreCancelRename = false;
     newItem->setIcon( icon );
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistviewitem.cpp #699076:699077
@@ -636,7 +636,6 @@
     if (id != Uml::id_None)
         itemElement.setAttribute( "id", idStr );
     itemElement.setAttribute( "type", m_Type );
-    UMLDoc *umldoc = s_pListView->getDocument();
     UMLFolder *extFolder = NULL;
     if (m_pObject == NULL) {
         if (! Model_Utils::typeIsDiagram(m_Type) && m_Type != Uml::lvt_View)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlwidget.cpp #699076:699077
@@ -450,7 +450,7 @@
     int w = width();
     int h = height();
     int s = 4;
-    QBrush brush(blue);
+    QBrush brush(Qt::blue);
     p -> fillRect(offsetX, offsetY, s,  s, brush);
     p -> fillRect(offsetX, offsetY + h - s, s, s, brush);
     p -> fillRect(offsetX + w - s, offsetY, s, s, brush);
@@ -938,7 +938,7 @@
     return m_bShowStereotype;
 }
 
-void UMLWidget::moveEvent(QMoveEvent *me) {
+void UMLWidget::moveEvent(QMoveEvent* /*me*/) {
 }
 
 void UMLWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/widgetbase.h #699076:699077
@@ -63,7 +63,7 @@
      * Deliver a const pointer to the connected UMLView
      * ( needed esp. by event handling of LinePath )
      */
-    const UMLView *getUMLView() const { return m_pView; };
+    const UMLView *getUMLView() const { return m_pView; }
 
     /**
      * Sets the @ref UMLObject to represent.




More information about the umbrello-devel mailing list