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

Peter Kümmel syntheticpp at gmx.net
Mon Oct 4 23:07:29 CEST 2010


SVN commit 1182537 by kuemmel:

'friend' is not our friend

 M  +1 -1      scene.cpp  
 M  +7 -3      viewitem.h  


--- branches/work/kst/portto4/kst/src/libkstapp/scene.cpp #1182536:1182537
@@ -51,7 +51,7 @@
 
       if (viewItem->acceptsContextMenuEvents()) {
           event->setPos(viewItem->mapFromScene(event->scenePos()));
-          if (viewItem->sceneEvent(event))
+          if (viewItem->doSceneEvent(event))
             return;
       }
     }
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.h #1182536:1182537
@@ -204,6 +204,11 @@
 
     template<class T> static QList<T *> getItems();
 
+   // TODO: Remove, needed only for a Qt 4.3 bug workaround
+    bool doSceneEvent(QGraphicsSceneContextMenuEvent *event) {
+      return sceneEvent(event);
+    }
+
   Q_SIGNALS:
     void geometryChanged();
     void creationComplete();
@@ -287,7 +292,9 @@
     void updateView();
 
   protected:
+  public: // TODO why does View need it?
     virtual void updateChildGeometry(const QRectF &oldParentRect, const QRectF &newParentRect);
+  protected:
     virtual QString _automaticDescriptiveName() const;
     virtual void _initializeShortName();
 
@@ -338,9 +345,6 @@
 
     void startDragging(QWidget *widget, const QPointF& hotspot);
 
-
-    friend class View;
-    friend class Scene;
 };
 
 Q_DECLARE_OPERATORS_FOR_FLAGS(ViewItem::GripModes)


More information about the Kst mailing list