summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index fdf21fb499..e81eab4c46 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -1598,7 +1598,7 @@ QGraphicsItem::~QGraphicsItem()
#ifndef QT_NO_GESTURES
if (d_ptr->isObject && !d_ptr->gestureContext.isEmpty()) {
QGraphicsObject *o = static_cast<QGraphicsObject *>(this);
- if (QGestureManager *manager = QGestureManager::instance()) {
+ if (QGestureManager *manager = QGestureManager::instance(QGestureManager::DontForceCreation)) {
const auto types = d_ptr->gestureContext.keys(); // FIXME: iterate over the map directly?
for (Qt::GestureType type : types)
manager->cleanupCachedGestures(o, type);
@@ -4666,9 +4666,7 @@ void QGraphicsItem::resetTransform()
Use
- \code
- item->setTransform(QTransform().rotate(angle), true);
- \endcode
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 20
instead.
@@ -4689,9 +4687,7 @@ void QGraphicsItem::resetTransform()
Use
- \code
- setTransform(QTransform::fromScale(sx, sy), true);
- \endcode
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 21
instead.
@@ -4712,9 +4708,7 @@ void QGraphicsItem::resetTransform()
Use
- \code
- setTransform(QTransform().shear(sh, sv), true);
- \endcode
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 22
instead.
@@ -4730,9 +4724,7 @@ void QGraphicsItem::resetTransform()
Use setPos() or setTransformOriginPoint() instead. For identical
behavior, use
- \code
- setTransform(QTransform::fromTranslate(dx, dy), true);
- \endcode
+ \snippet code/src_gui_graphicsview_qgraphicsitem.cpp 23
Translates the current item transformation by (\a dx, \a dy).
@@ -7310,7 +7302,7 @@ void QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
selectedItems = d_ptr->scene->selectedItems();
initialPositions = d_ptr->scene->d_func()->movingItemsInitialPositions;
if (initialPositions.isEmpty()) {
- foreach (QGraphicsItem *item, selectedItems)
+ for (QGraphicsItem *item : qAsConst(selectedItems))
initialPositions[item] = item->pos();
initialPositions[this] = pos();
}