diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-24 15:25:32 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-10-03 09:13:56 +0000 |
commit | 91d43a48f7307938624d4ab11e488494456646f5 (patch) | |
tree | 89c1693b85e69a339409a28c06a8c51ad0894f12 /src/widgets/graphicsview/qgraphicsitem.cpp | |
parent | 4840668994739054f0976d90eebe9ccfdff0ed81 (diff) |
Prevent instantiation of QGestureManager in ~QWidget, ~QGraphicsItem()
Debugging PYSIDE-815 revealed that QGestureManager is instantiated in
the application destruction sequence. To prevent that, add a "force"
parameter defaulting to true to QGestureManager::instance() and pass
false in the destructors and QGestureManager::gesturePending().
Change-Id: I1b76173c926c2a156252b88832b032508d8e8a73
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsitem.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsitem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 203b879020..a32f1388bf 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); |