]> cloud.milkyroute.net Git - dolphin.git/commitdiff
David says: "PixmapViewer::setSizeHint should call updateGeometry() instead of all...
authorPeter Penz <peter.penz19@gmail.com>
Fri, 15 Feb 2008 19:40:27 +0000 (19:40 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Fri, 15 Feb 2008 19:40:27 +0000 (19:40 +0000)
CCMAIL: faure@kde.org

svn path=/trunk/KDE/kdebase/apps/; revision=775421

src/infosidebarpage.cpp
src/pixmapviewer.cpp

index 9430338764a5a32fb27e51a3209b09047dadaa16..30c4467b45d138cc6dcd4c9985e252709c648839 100644 (file)
@@ -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);
 
index f535475aac0ef784bb15af03e8fa58016e90dd3b..416e53f1faa9d291ece142bd6cabc011f9a1f4b6 100644 (file)
@@ -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