From ea18ab891ffb53dddf4e0a8b242d7340aa0930e5 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 20 Oct 2014 04:43:18 +0200 Subject: [PATCH] Don't pass parent widget in constructor. We call setLayout later. --- src/libtomahawk/playlist/ContextView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/playlist/ContextView.cpp b/src/libtomahawk/playlist/ContextView.cpp index ef5c291eb..c7af328ea 100644 --- a/src/libtomahawk/playlist/ContextView.cpp +++ b/src/libtomahawk/playlist/ContextView.cpp @@ -50,7 +50,7 @@ ContextView::ContextView( QWidget* parent, const QString& caption ) m_trackView->proxyModel()->setStyle( PlayableProxyModel::Fancy ); TomahawkStyle::styleScrollBar( m_trackView->verticalScrollBar() ); - setLayout( new QVBoxLayout( this ) ); + setLayout( new QVBoxLayout() ); TomahawkUtils::unmarginLayout( layout() ); m_trackView->setStyleSheet( QString( "QTreeView { background-color: white; }" ) ); @@ -63,7 +63,7 @@ ContextView::ContextView( QWidget* parent, const QString& caption ) vbox->setPalette( pal ); vbox->setAutoFillBackground( true ); - QVBoxLayout* vboxl = new QVBoxLayout( this ); + QVBoxLayout* vboxl = new QVBoxLayout(); TomahawkUtils::unmarginLayout( vboxl ); vboxl->setContentsMargins( 32, 32, 32, 32 ); vboxl->setSpacing( 32 ); @@ -71,11 +71,11 @@ ContextView::ContextView( QWidget* parent, const QString& caption ) vbox->setLayout( vboxl ); QWidget* hbox = new QWidget; - QHBoxLayout* hboxl = new QHBoxLayout( this ); + QHBoxLayout* hboxl = new QHBoxLayout(); TomahawkUtils::unmarginLayout( hboxl ); hboxl->setSpacing( 32 ); - m_innerLayout = new QVBoxLayout( this ); + m_innerLayout = new QVBoxLayout(); TomahawkUtils::unmarginLayout( m_innerLayout ); m_innerLayout->addWidget( m_trackView, 1 ); m_innerLayout->addStretch();