Qt4.5 hit qt-copy, and layouts behave properly now! Let's remove the layout bug workaround

hacks from extenders. This improves behavior a lot. :)


svn path=/trunk/KDE/kdelibs/; revision=922575
This commit is contained in:
Rob Scheepmaker 2009-02-07 09:52:49 +00:00
parent 83f2503169
commit 1eb7e181bc
3 changed files with 0 additions and 27 deletions

View File

@ -224,13 +224,6 @@ void Extender::itemAddedEvent(ExtenderItem *item, const QPointF &pos)
//remove the empty extender message if needed.
d->updateEmptyExtenderLabel();
//if the item doesn't got a widget one will be set real soon, causing it's sizehints to
//change. Don't adjust the size hints in that case, since that spares us a call to
//adjustSizeHints()
if (item->widget()) {
d->adjustSizeHints();
}
}
void Extender::itemRemovedEvent(ExtenderItem *item)
@ -245,7 +238,6 @@ void Extender::itemRemovedEvent(ExtenderItem *item)
//add the empty extender message if needed.
d->updateEmptyExtenderLabel();
d->adjustSizeHints();
}
void Extender::itemHoverEnterEvent(ExtenderItem *item)
@ -279,7 +271,6 @@ void Extender::itemHoverMoveEvent(ExtenderItem *item, const QPointF &pos)
//Make sure we remove any 'no detachables' label that might be there, and update the layout.
d->updateEmptyExtenderLabel();
d->adjustSizeHints();
}
void Extender::itemHoverLeaveEvent(ExtenderItem *item)
@ -295,7 +286,6 @@ void Extender::itemHoverLeaveEvent(ExtenderItem *item)
d->currentSpacerIndex = -1;
d->updateEmptyExtenderLabel();
d->adjustSizeHints();
}
}
@ -458,21 +448,6 @@ void ExtenderPrivate::updateBorders()
}
}
void ExtenderPrivate::adjustSizeHints()
{
//FIXME: what happens in this function are some nasty workarounds for a bug in qt4.4's QGL.
//Alexis has told me they are working on a fix for qt4.5, so this can be removed once the bug
//has been fixed in Qt.
if (layout) {
layout->updateGeometry();
q->setMinimumSize(layout->preferredSize());
}
q->adjustSize();
emit q->geometryChanged();
}
void ExtenderPrivate::updateEmptyExtenderLabel()
{
if (q->attachedItems().isEmpty() && !emptyExtenderLabel && !emptyExtenderMessage.isEmpty()

View File

@ -445,7 +445,6 @@ void ExtenderItem::setCollapsed(bool collapsed)
}
updateGeometry();
d->extender->d->adjustSizeHints();
}
void ExtenderItem::returnToSource()

View File

@ -50,7 +50,6 @@ class ExtenderPrivate
int insertIndexFromPos(const QPointF &pos) const;
void loadExtenderItems();
void updateBorders();
void adjustSizeHints();
void updateEmptyExtenderLabel();
Extender *q;