diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-06-08 17:08:52 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-09 10:45:01 +0200 |
commit | 693468a54da02ff64b104bae8d3b419253889233 (patch) | |
tree | 2bfd3aab2a360cd0efc433683a38ae61df690002 /examples/tools | |
parent | 5e6b167feaa38a51ce8d4b0b3d61872f7b3f33dc (diff) |
Replace deprecated QGraphicsScene::itemAt() with items()
Change-Id: I33ee03db775d3cf6807372e0963748cf6a4e07db
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'examples/tools')
-rw-r--r-- | examples/tools/undoframework/diagramscene.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/tools/undoframework/diagramscene.cpp b/examples/tools/undoframework/diagramscene.cpp index cbc782f42f..632462a907 100644 --- a/examples/tools/undoframework/diagramscene.cpp +++ b/examples/tools/undoframework/diagramscene.cpp @@ -53,7 +53,8 @@ void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *event) { QPointF mousePos(event->buttonDownScenePos(Qt::LeftButton).x(), event->buttonDownScenePos(Qt::LeftButton).y()); - movingItem = itemAt(mousePos.x(), mousePos.y()); + const QList<QGraphicsItem *> itemList = items(mousePos); + movingItem = itemList.isEmpty() ? 0 : itemList.first(); if (movingItem != 0 && event->button() == Qt::LeftButton) { oldPos = movingItem->pos(); |