1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-20 07:52:30 +02:00

Use direct implementation and do not call virtuals in the constructor

This commit is contained in:
Uwe L. Korn 2014-09-14 13:56:41 +01:00
parent 9132c5de7d
commit 8c3799f93d
10 changed files with 15 additions and 12 deletions

View File

@ -38,7 +38,7 @@ using namespace Tomahawk;
ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent )
: QWidget( parent )
{
setVisible( false );
QWidget::setVisible( false );
QBoxLayout* mainLayout = new QVBoxLayout;
setLayout( mainLayout );

View File

@ -32,7 +32,7 @@ InboxView::InboxView( QWidget* parent ) :
proxyModel()->setStyle( PlayableProxyModel::Large );
setEmptyTip( tr( "No listening suggestions here." ) );
setGuid( "inbox" );
TrackView::setGuid( "inbox" );
setHeaderHidden( true );
setUniformRowHeights( false );
setIndentation( 0 );

View File

@ -46,7 +46,7 @@ PlayableProxyModel::PlayableProxyModel( QObject* parent )
setSortCaseSensitivity( Qt::CaseInsensitive );
setDynamicSortFilter( true );
setSourcePlayableModel( 0 );
PlayableProxyModel::setSourcePlayableModel( NULL );
m_headerStyle[ Large ] << PlayableModel::Name;
m_headerStyle[ Detailed ] << PlayableModel::Artist << PlayableModel::Track << PlayableModel::Composer << PlayableModel::Album << PlayableModel::AlbumPos << PlayableModel::Duration << PlayableModel::Bitrate << PlayableModel::Age << PlayableModel::Year << PlayableModel::Filesize << PlayableModel::Origin << PlayableModel::Score;

View File

@ -42,8 +42,11 @@ TreeModel::TreeModel( QObject* parent )
: PlayableModel( parent )
, m_mode( DatabaseMode )
{
setIcon( TomahawkUtils::tinted( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultCollection, TomahawkUtils::Original,
/*big enough for the ViewPage header on retina*/ QSize( 256, 256 ) ), Qt::white ) );
PlayableModel::setIcon( TomahawkUtils::tinted( TomahawkUtils::defaultPixmap(
TomahawkUtils::DefaultCollection,
TomahawkUtils::Original,
// big enough for the ViewPage header on retina
QSize( 256, 256 ) ), Qt::white ) );
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( onPlaybackStarted( Tomahawk::result_ptr ) ), Qt::DirectConnection );
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );

View File

@ -39,7 +39,7 @@ ScriptCollection::ScriptCollection( const source_ptr& source,
, m_trackCount( -1 ) //null value
{
Q_ASSERT( resolver );
qDebug() << Q_FUNC_INFO << resolver->name() << name();
qDebug() << Q_FUNC_INFO << resolver->name() << Collection::name();
m_resolver = resolver;

View File

@ -33,7 +33,7 @@ BackgroundWidget::BackgroundWidget( QWidget* parent )
: QWidget( parent )
{
setAutoFillBackground( false );
setBackgroundColor( QColor( "#333333" ) );
BackgroundWidget::setBackgroundColor( QColor( "#333333" ) );
}

View File

@ -36,7 +36,7 @@ ToggleButton::ToggleButton( QWidget* parent )
f.setPointSize( TomahawkUtils::defaultFontSize() + 1 );
setFont( f );
setFixedHeight( sizeHint().height() + 8 );
setFixedHeight( QLabel::sizeHint().height() + 8 );
setCursor( Qt::PointingHandCursor );
}

View File

@ -37,7 +37,7 @@ ClearButton::ClearButton(QWidget *parent)
setFocusPolicy(Qt::NoFocus);
setToolTip(tr("Clear"));
setMinimumSize(22, 22);
setVisible(false);
QWidget::setVisible(false);
#if QT_VERSION >= 0x040600
// First check for a style icon, current KDE provides one

View File

@ -30,7 +30,7 @@ SearchButton::SearchButton(QWidget *parent)
{
setFocusPolicy(Qt::NoFocus);
setCursor(Qt::ArrowCursor);
setMinimumSize(sizeHint());
setMinimumSize(SearchButton::sizeHint());
}
QSize SearchButton::sizeHint() const

View File

@ -40,13 +40,13 @@ ACLRegistryImpl::ACLRegistryImpl( QObject* parent )
, m_jobCount( 0 )
{
ACLRegistry::setInstance( this );
load();
ACLRegistryImpl::load();
}
ACLRegistryImpl::~ACLRegistryImpl()
{
save();
ACLRegistryImpl::save();
}