QGraphicsItem * QGraphicsScene::itemAt(const QPointF & position) const is deprecated in Qt4.

Use QGraphicsItem * QGraphicsScene::itemAt(const QPointF & position, const QTransform & deviceTransform) const instead.

This change is Qt4/Qt5 neutral.
This commit is contained in:
Mateusz Skowroński 2016-04-17 09:44:32 +02:00 committed by wmayer
parent aea769af3d
commit f188995e55

View File

@ -967,7 +967,7 @@ void Model::mousePressEvent(QGraphicsSceneMouseEvent* event)
const GraphLinkRecord &record = findRecord(rect, *graphLink);
//don't like that I am doing this again here after getRectFromPosition call.
QGraphicsItem *item = itemAt(event->scenePos());
QGraphicsItem *item = itemAt(event->scenePos(), QTransform());
QGraphicsPixmapItem *pixmapItem = dynamic_cast<QGraphicsPixmapItem *>(item);
if (pixmapItem && (pixmapItem == (*theGraph)[record.vertex].visibleIcon.get()))
{
@ -1061,7 +1061,7 @@ void Model::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
const GraphLinkRecord &record = findRecord(rect, *graphLink);
//don't like that I am doing this again here after getRectFromPosition call.
QGraphicsItem *item = itemAt(event->scenePos());
QGraphicsItem *item = itemAt(event->scenePos(), QTransform());
QGraphicsPixmapItem *pixmapItem = dynamic_cast<QGraphicsPixmapItem *>(item);
if (pixmapItem && (pixmapItem == (*theGraph)[record.vertex].visibleIcon.get()))
{