QDockWidget: remove dead code
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 <sergio.martins@kdab.com>
This commit is contained in:
parent
1a4f0deeb4
commit
eadae036f5
@ -1044,33 +1044,6 @@ QLayoutItem *QDockAreaLayoutInfo::plug(const QList<int> &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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user