[Uml-devel] kdesdk/umbrello/umbrello

Jonathan Riddell jri at jriddell.org
Mon Apr 7 08:24:16 UTC 2003


CVS commit by jriddell: 

removed some compiler warnings caused by incorrect returns and
implicit casts which caused compilation to fail on some versions of
GCC.


  M +5 -5      diagram/classwidget.cpp   1.13
  M +1 -1      diagram/classwidget.h   1.5
  M +1 -1      diagram/widgetfactory.cpp   1.11
  M +6 -5      umldoc.cpp   1.36


--- kdesdk/umbrello/umbrello/umldoc.cpp  #1.35:1.36
@@ -534,5 +534,5 @@ UMLObject* UMLDoc::createUMLObject(UMLOb
                 name = KLineEditDlg::getText(i18n("Enter name:"), name, &ok, (QWidget*)parent());
                 if (!ok) {
-                        return;
+                        return 0;
                 }
                 if (name.length() == 0) {
@@ -1624,4 +1624,5 @@ QStringList UMLDoc::getModelTypes()
                 types.append( pConcept->getName() );
         }
+        return types;
 }
 

--- kdesdk/umbrello/umbrello/diagram/classwidget.cpp  #1.12:1.13
@@ -200,5 +200,5 @@ void ClassWidget::calculateSize()
                         //why??
                         attString.string = "";
-                        attString.flags = 0;
+                        attString.flags = EmptyFlag;
                         switch(att->getScope( )) //FIXME Visibility!
                         {
@@ -239,5 +239,5 @@ void ClassWidget::calculateSize()
                         //why is this needed??
                         opString.string = "";
-                        opString.flags = 0;
+                        opString.flags = EmptyFlag;
                         switch(op->getScope( )) //FIXME Visibility!
                         {
@@ -272,9 +272,9 @@ void ClassWidget::calculateSize()
                         if( op->getAbstract() )
                         {
-                                opString.flags |= Italics;
+                                opString.flags = (TextFlags)(opString.flags|Italics);
                         }
                         if( op->getStatic() )
                         {
-                                opString.flags |= Underline;
+                                opString.flags = (TextFlags)(opString.flags|Underline);
                         }
                         m_ops.append(opString);
@@ -285,5 +285,5 @@ void ClassWidget::calculateSize()
 
         int maxWidth = 0;
-        int currentWidth = 0;
+/*      int currentWidth = 0;  FIXME unused variable */
 
         // we calculate the screen space needed using bold, underline and italics

--- kdesdk/umbrello/umbrello/diagram/classwidget.h  #1.4:1.5
@@ -59,5 +59,5 @@ public slots:
         
 protected:
-        enum TextFlags { Bold = 0x1, Italics = 0x2, Underline = 0x4 };
+        enum TextFlags { EmptyFlag = 0x0, Bold = 0x1, Italics = 0x2, Underline = 0x4 };
         struct AttString { TextFlags flags; QString string; };
         struct OpString  { TextFlags flags; QString string; };






More information about the umbrello-devel mailing list