Fix the nasty layout reparenting by adding the InformationPanelContent into a layout. Thanks to Sebastian Trüg for the hint!

CCMAIL: trueg@kde.org

svn path=/trunk/KDE/kdebase/apps/; revision=1132028
This commit is contained in:
Peter Penz 2010-05-29 11:44:28 +00:00
parent db8c956b34
commit c62cb08d14
2 changed files with 5 additions and 2 deletions

View file

@ -20,6 +20,7 @@
#include "informationpanel.h"
#include <kdirnotify.h>
#include <QShowEvent>
#include <QVBoxLayout>
#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;
}

View file

@ -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()