From c62cb08d1400bc5a084638e8ae467303d343a92c Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 29 May 2010 11:44:28 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20the=20nasty=20layout=20reparenting=20by?= =?UTF-8?q?=20adding=20the=20InformationPanelContent=20into=20a=20layout.?= =?UTF-8?q?=20=20Thanks=20to=20Sebastian=20Tr=C3=BCg=20for=20the=20hint!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CCMAIL: trueg@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=1132028 --- src/panels/information/informationpanel.cpp | 4 ++++ src/panels/information/informationpanelcontent.cpp | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 82b52e4f65..f15cf05d51 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -20,6 +20,7 @@ #include "informationpanel.h" #include #include +#include #include "informationpanelcontent.h" InformationPanel::InformationPanel(QWidget* parent) : @@ -323,6 +324,9 @@ void InformationPanel::init() m_content = new InformationPanelContent(this); connect(m_content, SIGNAL(urlActivated(KUrl)), this, SIGNAL(urlActivated(KUrl))); + + QVBoxLayout* layout = new QVBoxLayout(this); + layout->addWidget(m_content); m_initialized = true; } diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 540b971e85..df4fa46417 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -74,7 +74,7 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : connect(m_outdatedPreviewTimer, SIGNAL(timeout()), this, SLOT(markOutdatedPreview())); - QVBoxLayout* layout = new QVBoxLayout; + QVBoxLayout* layout = new QVBoxLayout(this); layout->setSpacing(KDialog::spacingHint()); // preview @@ -136,7 +136,6 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : layout->addWidget(m_nameLabel); layout->addWidget(new KSeparator()); layout->addWidget(m_metaDataArea); - parent->setLayout(layout); } InformationPanelContent::~InformationPanelContent()