mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 23:26:40 +02:00
Use direct implementation and do not call virtuals in the constructor
This commit is contained in:
@@ -38,7 +38,7 @@ using namespace Tomahawk;
|
|||||||
ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent )
|
ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
{
|
{
|
||||||
setVisible( false );
|
QWidget::setVisible( false );
|
||||||
|
|
||||||
QBoxLayout* mainLayout = new QVBoxLayout;
|
QBoxLayout* mainLayout = new QVBoxLayout;
|
||||||
setLayout( mainLayout );
|
setLayout( mainLayout );
|
||||||
|
@@ -32,7 +32,7 @@ InboxView::InboxView( QWidget* parent ) :
|
|||||||
proxyModel()->setStyle( PlayableProxyModel::Large );
|
proxyModel()->setStyle( PlayableProxyModel::Large );
|
||||||
setEmptyTip( tr( "No listening suggestions here." ) );
|
setEmptyTip( tr( "No listening suggestions here." ) );
|
||||||
|
|
||||||
setGuid( "inbox" );
|
TrackView::setGuid( "inbox" );
|
||||||
setHeaderHidden( true );
|
setHeaderHidden( true );
|
||||||
setUniformRowHeights( false );
|
setUniformRowHeights( false );
|
||||||
setIndentation( 0 );
|
setIndentation( 0 );
|
||||||
|
@@ -46,7 +46,7 @@ PlayableProxyModel::PlayableProxyModel( QObject* parent )
|
|||||||
setSortCaseSensitivity( Qt::CaseInsensitive );
|
setSortCaseSensitivity( Qt::CaseInsensitive );
|
||||||
setDynamicSortFilter( true );
|
setDynamicSortFilter( true );
|
||||||
|
|
||||||
setSourcePlayableModel( 0 );
|
PlayableProxyModel::setSourcePlayableModel( NULL );
|
||||||
|
|
||||||
m_headerStyle[ Large ] << PlayableModel::Name;
|
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;
|
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;
|
||||||
|
@@ -42,8 +42,11 @@ TreeModel::TreeModel( QObject* parent )
|
|||||||
: PlayableModel( parent )
|
: PlayableModel( parent )
|
||||||
, m_mode( DatabaseMode )
|
, m_mode( DatabaseMode )
|
||||||
{
|
{
|
||||||
setIcon( TomahawkUtils::tinted( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultCollection, TomahawkUtils::Original,
|
PlayableModel::setIcon( TomahawkUtils::tinted( TomahawkUtils::defaultPixmap(
|
||||||
/*big enough for the ViewPage header on retina*/ QSize( 256, 256 ) ), Qt::white ) );
|
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( started( Tomahawk::result_ptr ) ), SLOT( onPlaybackStarted( Tomahawk::result_ptr ) ), Qt::DirectConnection );
|
||||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ), Qt::DirectConnection );
|
||||||
|
@@ -39,7 +39,7 @@ ScriptCollection::ScriptCollection( const source_ptr& source,
|
|||||||
, m_trackCount( -1 ) //null value
|
, m_trackCount( -1 ) //null value
|
||||||
{
|
{
|
||||||
Q_ASSERT( resolver );
|
Q_ASSERT( resolver );
|
||||||
qDebug() << Q_FUNC_INFO << resolver->name() << name();
|
qDebug() << Q_FUNC_INFO << resolver->name() << Collection::name();
|
||||||
|
|
||||||
m_resolver = resolver;
|
m_resolver = resolver;
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ BackgroundWidget::BackgroundWidget( QWidget* parent )
|
|||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
{
|
{
|
||||||
setAutoFillBackground( false );
|
setAutoFillBackground( false );
|
||||||
setBackgroundColor( QColor( "#333333" ) );
|
BackgroundWidget::setBackgroundColor( QColor( "#333333" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -36,7 +36,7 @@ ToggleButton::ToggleButton( QWidget* parent )
|
|||||||
f.setPointSize( TomahawkUtils::defaultFontSize() + 1 );
|
f.setPointSize( TomahawkUtils::defaultFontSize() + 1 );
|
||||||
|
|
||||||
setFont( f );
|
setFont( f );
|
||||||
setFixedHeight( sizeHint().height() + 8 );
|
setFixedHeight( QLabel::sizeHint().height() + 8 );
|
||||||
|
|
||||||
setCursor( Qt::PointingHandCursor );
|
setCursor( Qt::PointingHandCursor );
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,7 @@ ClearButton::ClearButton(QWidget *parent)
|
|||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
setToolTip(tr("Clear"));
|
setToolTip(tr("Clear"));
|
||||||
setMinimumSize(22, 22);
|
setMinimumSize(22, 22);
|
||||||
setVisible(false);
|
QWidget::setVisible(false);
|
||||||
|
|
||||||
#if QT_VERSION >= 0x040600
|
#if QT_VERSION >= 0x040600
|
||||||
// First check for a style icon, current KDE provides one
|
// First check for a style icon, current KDE provides one
|
||||||
|
@@ -30,7 +30,7 @@ SearchButton::SearchButton(QWidget *parent)
|
|||||||
{
|
{
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
setCursor(Qt::ArrowCursor);
|
setCursor(Qt::ArrowCursor);
|
||||||
setMinimumSize(sizeHint());
|
setMinimumSize(SearchButton::sizeHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize SearchButton::sizeHint() const
|
QSize SearchButton::sizeHint() const
|
||||||
|
@@ -40,13 +40,13 @@ ACLRegistryImpl::ACLRegistryImpl( QObject* parent )
|
|||||||
, m_jobCount( 0 )
|
, m_jobCount( 0 )
|
||||||
{
|
{
|
||||||
ACLRegistry::setInstance( this );
|
ACLRegistry::setInstance( this );
|
||||||
load();
|
ACLRegistryImpl::load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ACLRegistryImpl::~ACLRegistryImpl()
|
ACLRegistryImpl::~ACLRegistryImpl()
|
||||||
{
|
{
|
||||||
save();
|
ACLRegistryImpl::save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user