[Kst] branches/work/kst/portto4/kst/src/libkstapp

Peter Kümmel syntheticpp at gmx.net
Wed Sep 1 19:31:28 CEST 2010


SVN commit 1170624 by kuemmel:

minimze macro usage


 M  +1 -8      viewitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1170623:1170624
@@ -52,11 +52,7 @@
 namespace Kst {
 
 ViewItem::ViewItem(View *parentView) :
-#ifdef KST_DISBALE_QOBJECT_PARENT
     QObject(),
-#else
-    QObject(parentView)
-#endif
     NamedObject(),
     _isXTiedZoom(false),
     _isYTiedZoom(false),
@@ -84,6 +80,7 @@
     _parentRelativeWidth(0),
     _parentView(parentView)
  {
+  setParentView(parentView);
   _initializeShortName();
   setZValue(DRAWING_ZORDER);
   setAcceptsHoverEvents(true);
@@ -409,11 +406,7 @@
 }
 
 View *ViewItem::parentView() const {
-#ifdef KST_DISBALE_QOBJECT_PARENT
   return _parentView;
-#else
-  return qobject_cast<View*>(parent());
-#endif
 }
 
 void ViewItem::setParentView(View* parentView) {


More information about the Kst mailing list