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

Andi Fischer andi.fischer at hispeed.ch
Sun Jul 1 07:13:04 UTC 2012


SVN commit 1303673 by fischer:

Some changes to trunk also applied here.

 M  +1 -3      uml.cpp  
 M  +3 -3      umllistviewitem.cpp  
 M  +2 -2      umllistviewitem.h  
 M  +15 -5     umlscene.cpp  
 M  +2 -0      umlscene.h  


--- branches/work/soc-umbrello/umbrello/uml.cpp #1303672:1303673
@@ -2746,9 +2746,7 @@
     if (lvitem) {
         m_listView->setCurrentItem(lvitem);
     }
-    DEBUG(DBG_SRC) << "name=" << view->umlScene()->name()
-                   << ", isOpen=" << view->umlScene()->isOpen()
-                   << ", id=" << ID2STR(view->umlScene()->ID());
+    DEBUG(DBG_SRC) << view->umlScene();
 }
 
 /**
--- branches/work/soc-umbrello/umbrello/umllistviewitem.cpp #1303672:1303673
@@ -1083,11 +1083,11 @@
 /**
  * Overloading operator for debugging output.
  */
-QDebug operator<<(QDebug out, const UMLListViewItem& item)
+QDebug operator<<(QDebug dbg, const UMLListViewItem& item)
 {
-    out.nospace() << "UMLListViewItem: " << item.text(0)
+    dbg.nospace() << "UMLListViewItem: " << item.text(0)
         << ", type=" << UMLListViewItem::toString(item.type())
         << ", id=" << ID2STR(item.ID())
         << ", children=" << item.childCount();
-    return out.space();
+    return dbg.space();
 }
--- branches/work/soc-umbrello/umbrello/umllistviewitem.h #1303672:1303673
@@ -148,8 +148,6 @@
     bool isOpen() { return isExpanded(); }
     void setOpen(bool state);
 
-    friend QDebug operator<<(QDebug out, const UMLListViewItem& item);
-
 protected:
     void init();
 
@@ -172,4 +170,6 @@
 
 };
 
+QDebug operator<<(QDebug dbg, const UMLListViewItem& item);
+
 #endif
--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1303672:1303673
@@ -81,10 +81,10 @@
 
 // include files for Qt
 #include <QtAlgorithms>  // for qSort
-#include <QtGui/QAction>
-#include <QtGui/QPainter>
-#include <QtGui/QPixmap>
-#include <QtGui/QPrinter>
+#include <QAction>
+#include <QPainter>
+#include <QPixmap>
+#include <QPrinter>
 
 // system includes
 #include <cmath>  // for ceil
@@ -4473,4 +4473,14 @@
     //TODO: Push stored cmds to stack.
 }
 
-#include "umlscene.moc"
+/**
+ * Overloading operator for debugging output.
+ */
+QDebug operator<<(QDebug dbg, UMLScene *item)
+{
+    dbg.nospace() << "UMLScene: " << item->name()
+                  << " / type=" << item->type().toString()
+                  << " / id=" << ID2STR(item->ID())
+                  << " / isOpen=" << item->isOpen();
+    return dbg.space();
+}
--- branches/work/soc-umbrello/umbrello/umlscene.h #1303672:1303673
@@ -454,4 +454,6 @@
     void sigWidgetRemoved(UMLWidget*);
 };
 
+QDebug operator<<(QDebug dbg, UMLScene *item);
+
 #endif // UMLSCENE_H




More information about the umbrello-devel mailing list