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:
parent
83f2503169
commit
1eb7e181bc
25
extender.cpp
25
extender.cpp
@ -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()
|
||||
|
@ -445,7 +445,6 @@ void ExtenderItem::setCollapsed(bool collapsed)
|
||||
}
|
||||
|
||||
updateGeometry();
|
||||
d->extender->d->adjustSizeHints();
|
||||
}
|
||||
|
||||
void ExtenderItem::returnToSource()
|
||||
|
@ -50,7 +50,6 @@ class ExtenderPrivate
|
||||
int insertIndexFromPos(const QPointF &pos) const;
|
||||
void loadExtenderItems();
|
||||
void updateBorders();
|
||||
void adjustSizeHints();
|
||||
void updateEmptyExtenderLabel();
|
||||
|
||||
Extender *q;
|
||||
|
Loading…
Reference in New Issue
Block a user