From ce73b4db62574fc966192e6a4f65b7e2b2280e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 20 Aug 2019 14:26:05 +0200 Subject: Remove dead code from Qt 4 times MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø --- src/widgets/graphicsview/qgraphicsscene.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/widgets/graphicsview/qgraphicsscene.cpp') diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index 313939e638..1208adfd17 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -4170,14 +4170,6 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent) wheelEvent->scenePos(), wheelEvent->widget()); -#if 0 // Used to be included in Qt4 for Q_WS_MAC - // On Mac, ignore the event if the first item under the mouse is not the last opened - // popup (or one of its descendant) - if (!d->popupWidgets.isEmpty() && !wheelCandidates.isEmpty() && wheelCandidates.first() != d->popupWidgets.back() && !d->popupWidgets.back()->isAncestorOf(wheelCandidates.first())) { - wheelEvent->accept(); - return; - } -#else // Find the first popup under the mouse (including the popup's descendants) starting from the last. // Remove all popups after the one found, or all or them if no popup is under the mouse. // Then continue with the event. @@ -4187,7 +4179,6 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent) break; d->removePopup(*iter); } -#endif bool hasSetFocus = false; for (QGraphicsItem *item : wheelCandidates) { @@ -4409,11 +4400,7 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte QGraphicsItem::CacheMode cacheMode = QGraphicsItem::CacheMode(itemd->cacheMode); // Render directly, using no cache. - if (cacheMode == QGraphicsItem::NoCache -#if 0 // Used to be included in Qt4 for Q_WS_X11 - || !X11->use_xrender -#endif - ) { + if (cacheMode == QGraphicsItem::NoCache) { _q_paintItem(static_cast(item), painter, option, widget, true, painterStateProtection); return; } -- cgit v1.2.3