From 328550ff008da53d865f3a6f245aa4753d1b3527 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 30 Jul 2012 23:36:59 +0200 Subject: Remove the obsolete scene argument for constructors of graphics items The argument has been obsoleted and not documented since 2007. Get rid of it now before Qt 5.0 Task-number: QTBUG-25089 Change-Id: I91a5508a5e1606f5b5c289501295c67be4abe6a0 Reviewed-by: Jason McDonald --- examples/graphicsview/diagramscene/arrow.cpp | 5 ++--- examples/graphicsview/diagramscene/arrow.h | 2 +- examples/graphicsview/diagramscene/diagramitem.cpp | 4 ++-- examples/graphicsview/diagramscene/diagramitem.h | 2 +- examples/graphicsview/diagramscene/diagramtextitem.cpp | 4 ++-- examples/graphicsview/diagramscene/diagramtextitem.h | 2 +- examples/sql/drilldown/imageitem.cpp | 5 ++--- examples/sql/drilldown/imageitem.h | 3 +-- examples/tools/undoframework/diagramitem.cpp | 5 ++--- examples/tools/undoframework/diagramitem.h | 3 +-- 10 files changed, 15 insertions(+), 20 deletions(-) (limited to 'examples') diff --git a/examples/graphicsview/diagramscene/arrow.cpp b/examples/graphicsview/diagramscene/arrow.cpp index 62c1c97d30..236d836e13 100644 --- a/examples/graphicsview/diagramscene/arrow.cpp +++ b/examples/graphicsview/diagramscene/arrow.cpp @@ -46,9 +46,8 @@ const qreal Pi = 3.14; //! [0] -Arrow::Arrow(DiagramItem *startItem, DiagramItem *endItem, - QGraphicsItem *parent, QGraphicsScene *scene) - : QGraphicsLineItem(parent, scene) +Arrow::Arrow(DiagramItem *startItem, DiagramItem *endItem, QGraphicsItem *parent) + : QGraphicsLineItem(parent) { myStartItem = startItem; myEndItem = endItem; diff --git a/examples/graphicsview/diagramscene/arrow.h b/examples/graphicsview/diagramscene/arrow.h index 8b1c54bde3..ac09d6ad00 100644 --- a/examples/graphicsview/diagramscene/arrow.h +++ b/examples/graphicsview/diagramscene/arrow.h @@ -61,7 +61,7 @@ public: enum { Type = UserType + 4 }; Arrow(DiagramItem *startItem, DiagramItem *endItem, - QGraphicsItem *parent = 0, QGraphicsScene *scene = 0); + QGraphicsItem *parent = 0); int type() const { return Type; } diff --git a/examples/graphicsview/diagramscene/diagramitem.cpp b/examples/graphicsview/diagramscene/diagramitem.cpp index 339d605bb7..9509c30270 100644 --- a/examples/graphicsview/diagramscene/diagramitem.cpp +++ b/examples/graphicsview/diagramscene/diagramitem.cpp @@ -45,8 +45,8 @@ //! [0] DiagramItem::DiagramItem(DiagramType diagramType, QMenu *contextMenu, - QGraphicsItem *parent, QGraphicsScene *scene) - : QGraphicsPolygonItem(parent, scene) + QGraphicsItem *parent) + : QGraphicsPolygonItem(parent) { myDiagramType = diagramType; myContextMenu = contextMenu; diff --git a/examples/graphicsview/diagramscene/diagramitem.h b/examples/graphicsview/diagramscene/diagramitem.h index 23fee9ebef..07b3b6e830 100644 --- a/examples/graphicsview/diagramscene/diagramitem.h +++ b/examples/graphicsview/diagramscene/diagramitem.h @@ -68,7 +68,7 @@ public: enum DiagramType { Step, Conditional, StartEnd, Io }; DiagramItem(DiagramType diagramType, QMenu *contextMenu, - QGraphicsItem *parent = 0, QGraphicsScene *scene = 0); + QGraphicsItem *parent = 0); void removeArrow(Arrow *arrow); void removeArrows(); diff --git a/examples/graphicsview/diagramscene/diagramtextitem.cpp b/examples/graphicsview/diagramscene/diagramtextitem.cpp index 3b6aad2d31..1e583045da 100644 --- a/examples/graphicsview/diagramscene/diagramtextitem.cpp +++ b/examples/graphicsview/diagramscene/diagramtextitem.cpp @@ -44,8 +44,8 @@ #include "diagramscene.h" //! [0] -DiagramTextItem::DiagramTextItem(QGraphicsItem *parent, QGraphicsScene *scene) - : QGraphicsTextItem(parent, scene) +DiagramTextItem::DiagramTextItem(QGraphicsItem *parent) + : QGraphicsTextItem(parent) { setFlag(QGraphicsItem::ItemIsMovable); setFlag(QGraphicsItem::ItemIsSelectable); diff --git a/examples/graphicsview/diagramscene/diagramtextitem.h b/examples/graphicsview/diagramscene/diagramtextitem.h index 5505886e5e..611e9b6700 100644 --- a/examples/graphicsview/diagramscene/diagramtextitem.h +++ b/examples/graphicsview/diagramscene/diagramtextitem.h @@ -59,7 +59,7 @@ class DiagramTextItem : public QGraphicsTextItem public: enum { Type = UserType + 3 }; - DiagramTextItem(QGraphicsItem *parent = 0, QGraphicsScene *scene = 0); + DiagramTextItem(QGraphicsItem *parent = 0); int type() const { return Type; } diff --git a/examples/sql/drilldown/imageitem.cpp b/examples/sql/drilldown/imageitem.cpp index f712717f08..991ab98f28 100644 --- a/examples/sql/drilldown/imageitem.cpp +++ b/examples/sql/drilldown/imageitem.cpp @@ -41,9 +41,8 @@ #include "imageitem.h" //! [0] -ImageItem::ImageItem(int id, const QPixmap &pixmap, QGraphicsItem *parent, - QGraphicsScene *scene) - : QGraphicsPixmapItem(pixmap, parent, scene) +ImageItem::ImageItem(int id, const QPixmap &pixmap, QGraphicsItem *parent) + : QGraphicsPixmapItem(pixmap, parent) { recordId = id; setAcceptHoverEvents(true); diff --git a/examples/sql/drilldown/imageitem.h b/examples/sql/drilldown/imageitem.h index 74bac26676..be729c2272 100644 --- a/examples/sql/drilldown/imageitem.h +++ b/examples/sql/drilldown/imageitem.h @@ -50,8 +50,7 @@ class ImageItem : public QObject, public QGraphicsPixmapItem Q_OBJECT public: - ImageItem(int id, const QPixmap &pixmap, QGraphicsItem *parent = 0, - QGraphicsScene *scene = 0); + ImageItem(int id, const QPixmap &pixmap, QGraphicsItem *parent = 0); void adjust(); int id(); diff --git a/examples/tools/undoframework/diagramitem.cpp b/examples/tools/undoframework/diagramitem.cpp index 10ade13628..4070dd158d 100644 --- a/examples/tools/undoframework/diagramitem.cpp +++ b/examples/tools/undoframework/diagramitem.cpp @@ -42,9 +42,8 @@ #include "diagramitem.h" -DiagramItem::DiagramItem(DiagramType diagramType, QGraphicsItem *item, - QGraphicsScene *scene) - : QGraphicsPolygonItem(item, scene) +DiagramItem::DiagramItem(DiagramType diagramType, QGraphicsItem *item) + : QGraphicsPolygonItem(item) { if (diagramType == Box) { boxPolygon << QPointF(0, 0) << QPointF(0, 30) << QPointF(30, 30) diff --git a/examples/tools/undoframework/diagramitem.h b/examples/tools/undoframework/diagramitem.h index f5a7eb4b62..849ef2132b 100644 --- a/examples/tools/undoframework/diagramitem.h +++ b/examples/tools/undoframework/diagramitem.h @@ -56,8 +56,7 @@ public: enum { Type = UserType + 1 }; enum DiagramType { Box, Triangle }; - DiagramItem(DiagramType diagramType, QGraphicsItem *item = 0, - QGraphicsScene *scene = 0); + DiagramItem(DiagramType diagramType, QGraphicsItem *item = 0); DiagramType diagramType() const { return polygon() == boxPolygon ? Box : Triangle; -- cgit v1.2.3