1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 07:36:48 +02:00

* Fixed default avatar generation on non-OS X.

This commit is contained in:
Christian Muehlhaeuser
2014-09-01 04:55:17 +02:00
parent 31ab460559
commit 9240e8d476

View File

@@ -52,9 +52,7 @@ Source::Source( int id, const QString& nodeId )
{ {
Q_D( Source ); Q_D( Source );
d->scrubFriendlyName = qApp->arguments().contains( "--demo" ); d->scrubFriendlyName = qApp->arguments().contains( "--demo" );
d->isLocal = ( id == 0 );
if ( id == 0 )
d->isLocal = true;
d->currentTrackTimer.setSingleShot( true ); d->currentTrackTimer.setSingleShot( true );
connect( &d->currentTrackTimer, SIGNAL( timeout() ), this, SLOT( trackTimerFired() ) ); connect( &d->currentTrackTimer, SIGNAL( timeout() ), this, SLOT( trackTimerFired() ) );
@@ -160,8 +158,7 @@ Source::dbCollection() const
} }
} }
collection_ptr tmp; return collection_ptr();
return tmp;
} }
@@ -327,7 +324,7 @@ Source::avatar( TomahawkUtils::ImageMode style, const QSize& size, bool defaultA
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
const QRect pxRect = px.rect(); const QRect pxRect = px.rect();
#else #else
const QRect pxRect = pxRect.adjusted( 0, 2, 0, 0 ); const QRect pxRect = px.rect().adjusted( 0, 2, 0, 0 );
#endif #endif
p.drawText( pxRect, friendlyName().left( 1 ).toUpper(), QTextOption( Qt::AlignCenter ) ); p.drawText( pxRect, friendlyName().left( 1 ).toUpper(), QTextOption( Qt::AlignCenter ) );
return px; return px;