mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-21 01:11:21 +00:00
David says: "PixmapViewer::setSizeHint should call updateGeometry() instead of all those layout hacks :)" - and as always David was right :-)
CCMAIL: faure@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=775421
This commit is contained in:
parent
4457eee3e8
commit
e8e68e124c
|
@ -172,17 +172,6 @@ void InfoSidebarPage::resizeEvent(QResizeEvent* event)
|
|||
|
||||
// try to increase the preview as large as possible
|
||||
m_preview->setSizeHint(QSize(maxWidth, maxWidth));
|
||||
|
||||
// ---
|
||||
// TODO: The following workaround was not necessary with Qt 4.3.x
|
||||
// but is mandatory with the current Qt4.4 beta version. Check with
|
||||
// Qt 4.4.0 whether the issue is Dolphin specific
|
||||
// (see PixmapViewer::setSizeHint()) or a regression in Qt.
|
||||
QVBoxLayout* vBox = static_cast<QVBoxLayout*>(layout());
|
||||
vBox->removeWidget(m_preview);
|
||||
vBox->insertWidget(0, m_preview);
|
||||
// ---
|
||||
|
||||
m_urlCandidate = m_shownUrl; // reset the URL candidate if a resizing is done
|
||||
m_timer->start(TimerDelay);
|
||||
|
||||
|
|
|
@ -77,9 +77,7 @@ void PixmapViewer::setPixmap(const QPixmap& pixmap)
|
|||
void PixmapViewer::setSizeHint(const QSize& size)
|
||||
{
|
||||
m_sizeHint = size;
|
||||
if ((parentWidget() != 0) && (parentWidget()->layout() != 0)) {
|
||||
parentWidget()->layout()->activate();
|
||||
}
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
QSize PixmapViewer::sizeHint() const
|
||||
|
|
Loading…
Reference in a new issue