1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 15:29:42 +01:00

Better function naming in shortenedlinkparser

This commit is contained in:
Stefan Derkits 2012-01-04 17:03:48 +01:00
parent 3655a2b537
commit 4f3ae14dbf
2 changed files with 5 additions and 16 deletions

View File

@ -35,7 +35,8 @@ ShortenedLinkParser::ShortenedLinkParser ( const QStringList& urls, QObject* par
: QObject( parent )
{
foreach ( const QString& url, urls )
lengthenUrl( url );
if ( handlesUrl( url ) )
lookupUrl( url ) ;
}
@ -60,19 +61,8 @@ ShortenedLinkParser::handlesUrl( const QString& url )
url.contains( "rd.io" ) );
}
void
ShortenedLinkParser::lengthenUrl( const QString& url )
{
if ( !handlesUrl( url ) )
return;
lengthenShortUrl( url );
}
void
ShortenedLinkParser::lengthenShortUrl ( const QString& url )
ShortenedLinkParser::lookupUrl ( const QString& url )
{
tDebug() << "Looking up..." << url;
@ -94,7 +84,7 @@ ShortenedLinkParser::lookupFinished()
tDebug() << "RedirectionTargetAttribute set on " << redir;
m_queries.remove( r );
r->deleteLater();
lengthenShortUrl( redir.toUrl().toString() );
lookupUrl( redir.toUrl().toString() );
}
else
{

View File

@ -55,8 +55,7 @@ signals:
void urls( const QStringList& urls );
private:
void lengthenUrl( const QString& url );
void lengthenShortUrl( const QString& url );
void lookupUrl( const QString& url );
void checkFinished();
QStringList m_links;