From eadae036f565af2a6f1d331ab55b51f252ac7c6e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 24 Feb 2017 18:01:31 +0100 Subject: [PATCH] QDockWidget: remove dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I suppose that once upon a time, the plug function used to return the rectangle of the new item. But right now, the 'result' is not used so we can remove all the code that computes it. Change-Id: I786e1f1ead82ac64a5eed632f3a3836f67c59c10 Reviewed-by: Sérgio Martins --- src/widgets/widgets/qdockarealayout.cpp | 27 ------------------------- 1 file changed, 27 deletions(-) diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp index b33f2dc798..af3c2c29e2 100644 --- a/src/widgets/widgets/qdockarealayout.cpp +++ b/src/widgets/widgets/qdockarealayout.cpp @@ -1044,33 +1044,6 @@ QLayoutItem *QDockAreaLayoutInfo::plug(const QList &path) Q_ASSERT(item.widgetItem != 0); Q_ASSERT(item.flags & QDockAreaLayoutItem::GapItem); item.flags &= ~QDockAreaLayoutItem::GapItem; - - QRect result; - -#ifndef QT_NO_TABBAR - if (tabbed) { - } else -#endif - { - int prev = this->prev(index); - int next = this->next(index); - - if (prev != -1 && !(item_list.at(prev).flags & QDockAreaLayoutItem::GapItem)) { - item.pos += *sep; - item.size -= *sep; - } - if (next != -1 && !(item_list.at(next).flags & QDockAreaLayoutItem::GapItem)) - item.size -= *sep; - - QPoint pos; - rpick(o, pos) = item.pos; - rperp(o, pos) = perp(o, rect.topLeft()); - QSize s; - rpick(o, s) = item.size; - rperp(o, s) = perp(o, rect.size()); - result = QRect(pos, s); - } - return item.widgetItem; }