1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-22 00:42:04 +02:00

Add itunes pixmap and fix job creation

This commit is contained in:
Leo Franchi 2011-10-02 15:26:49 -04:00
parent 6ea9dc4f1b
commit dfb03eabe6
3 changed files with 11 additions and 7 deletions

BIN
data/images/itunes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -46,9 +46,6 @@ ItunesParser::ItunesParser( const QStringList& urls, QObject* parent )
lookupItunesUri( url );
}
if ( !s_pixmap )
s_pixmap = new QPixmap( );
}
ItunesParser::ItunesParser( const QString& Url, QObject* parent )
@ -56,9 +53,6 @@ ItunesParser::ItunesParser( const QString& Url, QObject* parent )
, m_single( true )
{
lookupItunesUri( Url );
if ( !s_pixmap )
s_pixmap = new QPixmap( RESPATH "images/itunes.png" );
}
ItunesParser::~ItunesParser()
@ -114,7 +108,7 @@ ItunesParser::lookupItunesUri( const QString& link )
QNetworkReply* reply = TomahawkUtils::nam()->get( QNetworkRequest( url ) );
connect( reply, SIGNAL( finished() ), this, SLOT( itunesResponseLookupFinished() ) );
DropJobNotifier* j = new DropJobNotifier( *s_pixmap, QString( "Itunes" ), type, reply );
DropJobNotifier* j = new DropJobNotifier( pixmap(), QString( "Itunes" ), type, reply );
JobStatusView::instance()->model()->addJob( j );
m_queries.insert( reply );
@ -193,3 +187,12 @@ ItunesParser::checkTrackFinished()
}
}
QPixmap
ItunesParser::pixmap() const
{
if ( !s_pixmap )
s_pixmap = new QPixmap( RESPATH "images/itunes.png" );
return *s_pixmap;
}

View File

@ -57,6 +57,7 @@ private slots:
void itunesResponseLookupFinished();
private:
QPixmap pixmap() const;
void lookupItunesUri( const QString& track );
void checkTrackFinished();