Work around a bug in QGL. This will make extenders contained in applets on the desktop appear correctly, and, as opposed to an earlier attempt, doesn't interfere with applets like analog clock.

svn path=/trunk/KDE/kdelibs/; revision=881297
This commit is contained in:
Rob Scheepmaker 2008-11-07 18:16:35 +00:00
parent 4a23952936
commit 731ccc9f41

View File

@ -431,13 +431,20 @@ void ExtenderPrivate::updateBorders()
void ExtenderPrivate::adjustSize()
{
//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 (q->layout()) {
q->layout()->updateGeometry();
//FIXME: for some reason the preferred size hint get's set correctly,
//but the minimumSizeHint doesn't. Investigate why.
q->setMinimumSize(q->layout()->preferredSize());
}
if (applet->layout()) {
applet->layout()->updateGeometry();
applet->setMinimumSize(applet->preferredSize());
applet->adjustSize();
}
emit q->geometryChanged();
}