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:
parent
6ea9dc4f1b
commit
dfb03eabe6
BIN
data/images/itunes.png
Normal file
BIN
data/images/itunes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
@ -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;
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ private slots:
|
||||
void itunesResponseLookupFinished();
|
||||
|
||||
private:
|
||||
QPixmap pixmap() const;
|
||||
void lookupItunesUri( const QString& track );
|
||||
void checkTrackFinished();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user