mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
Add itunes pixmap and fix job creation
This commit is contained in:
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 );
|
lookupItunesUri( url );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !s_pixmap )
|
|
||||||
s_pixmap = new QPixmap( );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ItunesParser::ItunesParser( const QString& Url, QObject* parent )
|
ItunesParser::ItunesParser( const QString& Url, QObject* parent )
|
||||||
@@ -56,9 +53,6 @@ ItunesParser::ItunesParser( const QString& Url, QObject* parent )
|
|||||||
, m_single( true )
|
, m_single( true )
|
||||||
{
|
{
|
||||||
lookupItunesUri( Url );
|
lookupItunesUri( Url );
|
||||||
|
|
||||||
if ( !s_pixmap )
|
|
||||||
s_pixmap = new QPixmap( RESPATH "images/itunes.png" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ItunesParser::~ItunesParser()
|
ItunesParser::~ItunesParser()
|
||||||
@@ -114,7 +108,7 @@ ItunesParser::lookupItunesUri( const QString& link )
|
|||||||
QNetworkReply* reply = TomahawkUtils::nam()->get( QNetworkRequest( url ) );
|
QNetworkReply* reply = TomahawkUtils::nam()->get( QNetworkRequest( url ) );
|
||||||
connect( reply, SIGNAL( finished() ), this, SLOT( itunesResponseLookupFinished() ) );
|
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 );
|
JobStatusView::instance()->model()->addJob( j );
|
||||||
|
|
||||||
m_queries.insert( reply );
|
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();
|
void itunesResponseLookupFinished();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QPixmap pixmap() const;
|
||||||
void lookupItunesUri( const QString& track );
|
void lookupItunesUri( const QString& track );
|
||||||
void checkTrackFinished();
|
void checkTrackFinished();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user