mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-15 10:33:59 +02:00
Make sure we always delete replies when finished with the network request.
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
* Copyright 2011-2012, Hugo Lindström <hugolm84@gmail.com>
|
* Copyright 2011-2012, Hugo Lindström <hugolm84@gmail.com>
|
||||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -290,6 +291,7 @@ ChartsPlugin::chartSourcesList()
|
|||||||
{
|
{
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Got chart sources list";
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Got chart sources list";
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
@@ -432,6 +434,7 @@ ChartsPlugin::chartsList()
|
|||||||
{
|
{
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Got chart list result";
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Got chart list result";
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
@@ -623,6 +626,7 @@ ChartsPlugin::chartReturned()
|
|||||||
{
|
{
|
||||||
/// Chart request returned something! Woho
|
/// Chart request returned something! Woho
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
QVariantMap returnedData;
|
QVariantMap returnedData;
|
||||||
|
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
* Copyright 2010-2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
@@ -177,6 +177,7 @@ void
|
|||||||
EchonestPlugin::getArtistBiographySlot()
|
EchonestPlugin::getArtistBiographySlot()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
Echonest::Artist artist = artistFromReply( reply );
|
Echonest::Artist artist = artistFromReply( reply );
|
||||||
Echonest::BiographyList biographies = artist.biographies();
|
Echonest::BiographyList biographies = artist.biographies();
|
||||||
QVariantMap biographyMap;
|
QVariantMap biographyMap;
|
||||||
@@ -192,7 +193,6 @@ EchonestPlugin::getArtistBiographySlot()
|
|||||||
}
|
}
|
||||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||||
emit info( requestData, biographyMap );
|
emit info( requestData, biographyMap );
|
||||||
reply->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -200,11 +200,11 @@ void
|
|||||||
EchonestPlugin::getArtistFamiliaritySlot()
|
EchonestPlugin::getArtistFamiliaritySlot()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
Echonest::Artist artist = artistFromReply( reply );
|
Echonest::Artist artist = artistFromReply( reply );
|
||||||
qreal familiarity = artist.familiarity();
|
qreal familiarity = artist.familiarity();
|
||||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||||
emit info( requestData, familiarity );
|
emit info( requestData, familiarity );
|
||||||
reply->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -212,11 +212,11 @@ void
|
|||||||
EchonestPlugin::getArtistHotttnesssSlot()
|
EchonestPlugin::getArtistHotttnesssSlot()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
Echonest::Artist artist = artistFromReply( reply );
|
Echonest::Artist artist = artistFromReply( reply );
|
||||||
qreal hotttnesss = artist.hotttnesss();
|
qreal hotttnesss = artist.hotttnesss();
|
||||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||||
emit info( requestData, hotttnesss );
|
emit info( requestData, hotttnesss );
|
||||||
reply->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -224,6 +224,7 @@ void
|
|||||||
EchonestPlugin::getArtistTermsSlot()
|
EchonestPlugin::getArtistTermsSlot()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
Echonest::Artist artist = artistFromReply( reply );
|
Echonest::Artist artist = artistFromReply( reply );
|
||||||
Echonest::TermList terms = artist.terms();
|
Echonest::TermList terms = artist.terms();
|
||||||
QVariantMap termsMap;
|
QVariantMap termsMap;
|
||||||
@@ -235,7 +236,6 @@ EchonestPlugin::getArtistTermsSlot()
|
|||||||
}
|
}
|
||||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||||
emit info( requestData, termsMap );
|
emit info( requestData, termsMap );
|
||||||
reply->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -243,6 +243,7 @@ void
|
|||||||
EchonestPlugin::getMiscTopSlot()
|
EchonestPlugin::getMiscTopSlot()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
Echonest::TermList terms = Echonest::Artist::parseTopTerms( reply );
|
Echonest::TermList terms = Echonest::Artist::parseTopTerms( reply );
|
||||||
QVariantMap termsMap;
|
QVariantMap termsMap;
|
||||||
Q_FOREACH( const Echonest::Term& term, terms ) {
|
Q_FOREACH( const Echonest::Term& term, terms ) {
|
||||||
@@ -253,7 +254,6 @@ EchonestPlugin::getMiscTopSlot()
|
|||||||
}
|
}
|
||||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||||
emit info( requestData, termsMap );
|
emit info( requestData, termsMap );
|
||||||
reply->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2010-2011, Hugo Lindström <hugolm84@gmail.com>
|
* Copyright 2010-2011, Hugo Lindström <hugolm84@gmail.com>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -318,6 +319,8 @@ HypemPlugin::chartReturned()
|
|||||||
|
|
||||||
/// Chart request returned something! Woho
|
/// Chart request returned something! Woho
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
QString url = reply->url().toString();
|
QString url = reply->url().toString();
|
||||||
QVariantMap returnedData;
|
QVariantMap returnedData;
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
* Copyright 2010-2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
@@ -155,6 +155,7 @@ MusicBrainzPlugin::gotReleaseGroupsSlot()
|
|||||||
QNetworkReply* oldReply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* oldReply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
if ( !oldReply )
|
if ( !oldReply )
|
||||||
return; //timeout will handle it
|
return; //timeout will handle it
|
||||||
|
oldReply->deleteLater();
|
||||||
|
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
doc.setContent( oldReply->readAll() );
|
doc.setContent( oldReply->readAll() );
|
||||||
@@ -213,6 +214,7 @@ MusicBrainzPlugin::gotReleasesSlot()
|
|||||||
QNetworkReply* oldReply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* oldReply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
if ( !oldReply )
|
if ( !oldReply )
|
||||||
return; //timeout will handle it
|
return; //timeout will handle it
|
||||||
|
oldReply->deleteLater();
|
||||||
|
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
doc.setContent( oldReply->readAll() );
|
doc.setContent( oldReply->readAll() );
|
||||||
@@ -260,6 +262,7 @@ MusicBrainzPlugin::gotRecordingsSlot()
|
|||||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||||
if ( !reply )
|
if ( !reply )
|
||||||
return; //timeout will handle it
|
return; //timeout will handle it
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
doc.setContent( reply->readAll() );
|
doc.setContent( reply->readAll() );
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
* Copyright 2010-2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
@@ -112,6 +112,7 @@ MusixMatchPlugin::trackSearchSlot()
|
|||||||
QNetworkReply* oldReply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* oldReply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
if ( !oldReply )
|
if ( !oldReply )
|
||||||
return; //timeout will handle it
|
return; //timeout will handle it
|
||||||
|
oldReply->deleteLater();
|
||||||
|
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
doc.setContent(oldReply->readAll());
|
doc.setContent(oldReply->readAll());
|
||||||
@@ -142,6 +143,7 @@ MusixMatchPlugin::trackLyricsSlot()
|
|||||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||||
if ( !reply )
|
if ( !reply )
|
||||||
return; //timeout will handle it
|
return; //timeout will handle it
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
doc.setContent( reply->readAll() );
|
doc.setContent( reply->readAll() );
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
* Copyright 2011-2012, Hugo Lindström <hugolm84@gmail.com>
|
* Copyright 2011-2012, Hugo Lindström <hugolm84@gmail.com>
|
||||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -295,11 +296,13 @@ NewReleasesPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NewReleasesPlugin::nrSourcesList()
|
NewReleasesPlugin::nrSourcesList()
|
||||||
{
|
{
|
||||||
tDebug ( LOGVERBOSE ) << Q_FUNC_INFO << "Got newreleases sources list";
|
tDebug ( LOGVERBOSE ) << Q_FUNC_INFO << "Got newreleases sources list";
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
@@ -434,6 +437,7 @@ NewReleasesPlugin::nrList()
|
|||||||
{
|
{
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Got newreleases list result";
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Got newreleases list result";
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
@@ -658,13 +662,15 @@ NewReleasesPlugin::getMaxAge( const qlonglong expires ) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NewReleasesPlugin::nrReturned()
|
NewReleasesPlugin::nrReturned()
|
||||||
{
|
{
|
||||||
/// Chart request returned something! Woho
|
/// Chart request returned something! Woho
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
QVariantMap returnedData;
|
reply->deleteLater();
|
||||||
|
|
||||||
|
QVariantMap returnedData;
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -121,6 +122,7 @@ RoviPlugin::albumLookupFinished()
|
|||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
Q_ASSERT( reply );
|
Q_ASSERT( reply );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
if ( reply->error() != QNetworkReply::NoError )
|
if ( reply->error() != QNetworkReply::NoError )
|
||||||
return;
|
return;
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2010-2011, Hugo Lindström <hugolm84@gmail.com>
|
* Copyright 2010-2011, Hugo Lindström <hugolm84@gmail.com>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -196,6 +197,7 @@ SpotifyPlugin::chartTypes()
|
|||||||
/// Get possible chart type for specificSpotifyPlugin: InfoChart types returned chart source
|
/// Get possible chart type for specificSpotifyPlugin: InfoChart types returned chart source
|
||||||
tDebug() << Q_FUNC_INFO << "Got spotifychart type result";
|
tDebug() << Q_FUNC_INFO << "Got spotifychart type result";
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
@@ -284,6 +286,7 @@ SpotifyPlugin::chartReturned()
|
|||||||
{
|
{
|
||||||
/// Chart request returned something! Woho
|
/// Chart request returned something! Woho
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
QString url = reply->url().toString();
|
QString url = reply->url().toString();
|
||||||
QVariantMap returnedData;
|
QVariantMap returnedData;
|
||||||
if ( reply->error() == QNetworkReply::NoError )
|
if ( reply->error() == QNetworkReply::NoError )
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -461,6 +462,7 @@ AtticaManager::resolverIconFetched()
|
|||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( reply );
|
Q_ASSERT( reply );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
const QString resolverId = reply->property( "resolverId" ).toString();
|
const QString resolverId = reply->property( "resolverId" ).toString();
|
||||||
|
|
||||||
@@ -631,6 +633,7 @@ AtticaManager::payloadFetched()
|
|||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( reply );
|
Q_ASSERT( reply );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
bool installedSuccessfully = false;
|
bool installedSuccessfully = false;
|
||||||
const QString resolverId = reply->property( "resolverId" ).toString();
|
const QString resolverId = reply->property( "resolverId" ).toString();
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -120,6 +121,7 @@ EchonestCatalogSynchronizer::catalogDeleted()
|
|||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
QString toDel = QString( "collection/%1Catalog" ).arg( r->property( "type" ).toString() );
|
QString toDel = QString( "collection/%1Catalog" ).arg( r->property( "type" ).toString() );
|
||||||
|
|
||||||
@@ -153,6 +155,7 @@ EchonestCatalogSynchronizer::songCreateFinished()
|
|||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
tDebug() << "Finished creating song catalog, updating data now!!";
|
tDebug() << "Finished creating song catalog, updating data now!!";
|
||||||
try
|
try
|
||||||
@@ -187,6 +190,7 @@ EchonestCatalogSynchronizer::artistCreateFinished()
|
|||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
// We don't support artist catalogs at the moment
|
// We don't support artist catalogs at the moment
|
||||||
return;
|
return;
|
||||||
@@ -270,6 +274,7 @@ EchonestCatalogSynchronizer::songUpdateFinished()
|
|||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -289,6 +294,7 @@ EchonestCatalogSynchronizer::checkTicket()
|
|||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@@ -550,6 +550,7 @@ void
|
|||||||
LastFmInfoPlugin::similarArtistsReturned()
|
LastFmInfoPlugin::similarArtistsReturned()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
QMap< int, QString > similarArtists = lastfm::Artist::getSimilar( reply );
|
QMap< int, QString > similarArtists = lastfm::Artist::getSimilar( reply );
|
||||||
|
|
||||||
@@ -591,6 +592,7 @@ void
|
|||||||
LastFmInfoPlugin::similarTracksReturned()
|
LastFmInfoPlugin::similarTracksReturned()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
QMap< int, QPair< QString, QString > > similarTracks = lastfm::Track::getSimilar( reply );
|
QMap< int, QPair< QString, QString > > similarTracks = lastfm::Track::getSimilar( reply );
|
||||||
|
|
||||||
@@ -643,6 +645,7 @@ void
|
|||||||
LastFmInfoPlugin::chartReturned()
|
LastFmInfoPlugin::chartReturned()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
QVariantMap returnedData;
|
QVariantMap returnedData;
|
||||||
const QRegExp tracks_rx( "chart\\.\\S+tracks\\S*", Qt::CaseInsensitive );
|
const QRegExp tracks_rx( "chart\\.\\S+tracks\\S*", Qt::CaseInsensitive );
|
||||||
@@ -689,6 +692,7 @@ void
|
|||||||
LastFmInfoPlugin::topTracksReturned()
|
LastFmInfoPlugin::topTracksReturned()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
QStringList topTracks = lastfm::Artist::getTopTracks( reply );
|
QStringList topTracks = lastfm::Artist::getTopTracks( reply );
|
||||||
topTracks.removeDuplicates();
|
topTracks.removeDuplicates();
|
||||||
@@ -711,6 +715,7 @@ void
|
|||||||
LastFmInfoPlugin::artistInfoReturned()
|
LastFmInfoPlugin::artistInfoReturned()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||||
|
|
||||||
if ( requestData.type == Tomahawk::InfoSystem::InfoArtistBiography )
|
if ( requestData.type == Tomahawk::InfoSystem::InfoArtistBiography )
|
||||||
@@ -771,6 +776,7 @@ void
|
|||||||
LastFmInfoPlugin::albumInfoReturned()
|
LastFmInfoPlugin::albumInfoReturned()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||||
|
|
||||||
if ( requestData.type == Tomahawk::InfoSystem::InfoAlbumCoverArt )
|
if ( requestData.type == Tomahawk::InfoSystem::InfoAlbumCoverArt )
|
||||||
@@ -797,6 +803,7 @@ void
|
|||||||
LastFmInfoPlugin::coverArtReturned()
|
LastFmInfoPlugin::coverArtReturned()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
QUrl redir = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
|
QUrl redir = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
|
||||||
if ( redir.isEmpty() )
|
if ( redir.isEmpty() )
|
||||||
{
|
{
|
||||||
@@ -836,8 +843,6 @@ LastFmInfoPlugin::coverArtReturned()
|
|||||||
newReply->setProperty( "requestData", reply->property( "requestData" ) );
|
newReply->setProperty( "requestData", reply->property( "requestData" ) );
|
||||||
connect( newReply, SIGNAL( finished() ), SLOT( coverArtReturned() ) );
|
connect( newReply, SIGNAL( finished() ), SLOT( coverArtReturned() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
reply->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -845,6 +850,7 @@ void
|
|||||||
LastFmInfoPlugin::artistImagesReturned()
|
LastFmInfoPlugin::artistImagesReturned()
|
||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
QUrl redir = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
|
QUrl redir = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
|
||||||
if ( redir.isEmpty() )
|
if ( redir.isEmpty() )
|
||||||
{
|
{
|
||||||
@@ -888,8 +894,6 @@ LastFmInfoPlugin::artistImagesReturned()
|
|||||||
newReply->setProperty( "requestData", reply->property( "requestData" ) );
|
newReply->setProperty( "requestData", reply->property( "requestData" ) );
|
||||||
connect( newReply, SIGNAL( finished() ), SLOT( artistImagesReturned() ) );
|
connect( newReply, SIGNAL( finished() ), SLOT( artistImagesReturned() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
reply->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -934,7 +938,8 @@ void
|
|||||||
LastFmInfoPlugin::onAuthenticated()
|
LastFmInfoPlugin::onAuthenticated()
|
||||||
{
|
{
|
||||||
QNetworkReply* authJob = dynamic_cast<QNetworkReply*>( sender() );
|
QNetworkReply* authJob = dynamic_cast<QNetworkReply*>( sender() );
|
||||||
if ( !authJob || m_account.isNull() )
|
authJob->deleteLater();
|
||||||
|
if ( m_account.isNull() )
|
||||||
{
|
{
|
||||||
tLog() << Q_FUNC_INFO << "Help! No longer got a last.fm auth job!";
|
tLog() << Q_FUNC_INFO << "Help! No longer got a last.fm auth job!";
|
||||||
return;
|
return;
|
||||||
@@ -964,8 +969,6 @@ LastFmInfoPlugin::onAuthenticated()
|
|||||||
|
|
||||||
tLog() << Q_FUNC_INFO << error.simplified();
|
tLog() << Q_FUNC_INFO << error.simplified();
|
||||||
}
|
}
|
||||||
|
|
||||||
authJob->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -293,6 +294,7 @@ EchonestGenerator::staticFinished()
|
|||||||
Q_ASSERT( qobject_cast< QNetworkReply* >( sender() ) );
|
Q_ASSERT( qobject_cast< QNetworkReply* >( sender() ) );
|
||||||
|
|
||||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
Echonest::SongList songs;
|
Echonest::SongList songs;
|
||||||
try {
|
try {
|
||||||
@@ -361,6 +363,7 @@ void
|
|||||||
EchonestGenerator::songLookupFinished()
|
EchonestGenerator::songLookupFinished()
|
||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
if( !m_waiting.contains( r ) ) // another generate/start was begun meanwhile, we're out of date
|
if( !m_waiting.contains( r ) ) // another generate/start was begun meanwhile, we're out of date
|
||||||
return;
|
return;
|
||||||
@@ -399,6 +402,7 @@ EchonestGenerator::dynamicStarted()
|
|||||||
Q_ASSERT( sender() );
|
Q_ASSERT( sender() );
|
||||||
Q_ASSERT( qobject_cast< QNetworkReply* >( sender() ) );
|
Q_ASSERT( qobject_cast< QNetworkReply* >( sender() ) );
|
||||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -417,6 +421,7 @@ EchonestGenerator::dynamicFetched()
|
|||||||
Q_ASSERT( sender() );
|
Q_ASSERT( sender() );
|
||||||
Q_ASSERT( qobject_cast< QNetworkReply* >( sender() ) );
|
Q_ASSERT( qobject_cast< QNetworkReply* >( sender() ) );
|
||||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -733,6 +738,7 @@ EchonestGenerator::moodsReceived()
|
|||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -762,6 +768,7 @@ EchonestGenerator::stylesReceived()
|
|||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -789,6 +796,7 @@ EchonestGenerator::genresReceived()
|
|||||||
{
|
{
|
||||||
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* r = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||||
* Copyright 2010-2011, Hugo Lindstr<74>m <hugolm84@gmail.com>
|
* Copyright 2010-2011, Hugo Lindstr<74>m <hugolm84@gmail.com>
|
||||||
* Copyright 2010-2012, Stefan Derkits <stefan@derkits.at>
|
* Copyright 2010-2012, Stefan Derkits <stefan@derkits.at>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -163,9 +164,9 @@ GroovesharkParser::trackPageFetchFinished()
|
|||||||
{
|
{
|
||||||
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
m_queries.remove( r );
|
m_queries.remove( r );
|
||||||
r->deleteLater();
|
|
||||||
|
|
||||||
QWebPage page;
|
QWebPage page;
|
||||||
page.settings()->setAttribute( QWebSettings::JavascriptEnabled, false );
|
page.settings()->setAttribute( QWebSettings::JavascriptEnabled, false );
|
||||||
@@ -195,9 +196,9 @@ GroovesharkParser::groovesharkLookupFinished()
|
|||||||
{
|
{
|
||||||
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
m_queries.remove( r );
|
m_queries.remove( r );
|
||||||
r->deleteLater();
|
|
||||||
|
|
||||||
if ( r->reply()->error() == QNetworkReply::NoError )
|
if ( r->reply()->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
* Written by Hugo Lindström <hugolm84@gmail.com>
|
* Written by Hugo Lindström <hugolm84@gmail.com>
|
||||||
* But based on Leo Franchi's work from spotifyParser
|
* But based on Leo Franchi's work from spotifyParser
|
||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||||
|
* Copyright 2010-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -128,8 +129,8 @@ ItunesParser::itunesResponseLookupFinished()
|
|||||||
{
|
{
|
||||||
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
m_queries.remove( r );
|
|
||||||
r->deleteLater();
|
r->deleteLater();
|
||||||
|
m_queries.remove( r );
|
||||||
|
|
||||||
if ( r->reply()->error() == QNetworkReply::NoError )
|
if ( r->reply()->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -99,13 +100,13 @@ void
|
|||||||
JSPFLoader::networkLoadFinished()
|
JSPFLoader::networkLoadFinished()
|
||||||
{
|
{
|
||||||
NetworkReply* r = qobject_cast<NetworkReply*>( sender() );
|
NetworkReply* r = qobject_cast<NetworkReply*>( sender() );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
if ( r->reply()->error() == QNetworkReply::NoError )
|
if ( r->reply()->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
m_body = r->reply()->readAll();
|
m_body = r->reply()->readAll();
|
||||||
gotBody();
|
gotBody();
|
||||||
}
|
}
|
||||||
|
|
||||||
r->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
* Copyright 2010-2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -98,6 +98,7 @@ ShortenedLinkParser::lookupFinished( const QUrl& url )
|
|||||||
{
|
{
|
||||||
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
if ( r->reply()->error() != QNetworkReply::NoError )
|
if ( r->reply()->error() != QNetworkReply::NoError )
|
||||||
JobStatusView::instance()->model()->addJob( new ErrorStatusMessage( tr( "Network error parsing shortened link!" ) ) );
|
JobStatusView::instance()->model()->addJob( new ErrorStatusMessage( tr( "Network error parsing shortened link!" ) ) );
|
||||||
@@ -105,7 +106,6 @@ ShortenedLinkParser::lookupFinished( const QUrl& url )
|
|||||||
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Got an un-shortened url:" << r->reply()->url().toString();
|
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Got an un-shortened url:" << r->reply()->url().toString();
|
||||||
m_links << url.toString();
|
m_links << url.toString();
|
||||||
m_queries.remove( r );
|
m_queries.remove( r );
|
||||||
r->deleteLater();
|
|
||||||
|
|
||||||
checkFinished();
|
checkFinished();
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||||
* Copyright 2010-2011, Hugo Lindström <hugolm84@gmail.com>
|
* Copyright 2010-2011, Hugo Lindström <hugolm84@gmail.com>
|
||||||
|
* Copyright 2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
* Tomahawk is free software: you can redistribute it and/or modify
|
* Tomahawk is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -220,9 +221,8 @@ SpotifyParser::spotifyBrowseFinished()
|
|||||||
{
|
{
|
||||||
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
|
|
||||||
m_queries.remove( r );
|
|
||||||
r->deleteLater();
|
r->deleteLater();
|
||||||
|
m_queries.remove( r );
|
||||||
|
|
||||||
if ( r->reply()->error() == QNetworkReply::NoError )
|
if ( r->reply()->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
@@ -293,8 +293,8 @@ SpotifyParser::spotifyTrackLookupFinished()
|
|||||||
{
|
{
|
||||||
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
NetworkReply* r = qobject_cast< NetworkReply* >( sender() );
|
||||||
Q_ASSERT( r );
|
Q_ASSERT( r );
|
||||||
m_queries.remove( r );
|
|
||||||
r->deleteLater();
|
r->deleteLater();
|
||||||
|
m_queries.remove( r );
|
||||||
|
|
||||||
if ( r->reply()->error() == QNetworkReply::NoError )
|
if ( r->reply()->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||||
*
|
*
|
||||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
* Copyright 2010-2015, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||||
* Copyright 2011-2012, Leo Franchi <lfranchi@kde.org>
|
* Copyright 2011-2012, Leo Franchi <lfranchi@kde.org>
|
||||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||||
*
|
*
|
||||||
@@ -183,13 +183,13 @@ void
|
|||||||
XSPFLoader::networkLoadFinished()
|
XSPFLoader::networkLoadFinished()
|
||||||
{
|
{
|
||||||
NetworkReply* r = qobject_cast<NetworkReply*>( sender() );
|
NetworkReply* r = qobject_cast<NetworkReply*>( sender() );
|
||||||
|
r->deleteLater();
|
||||||
|
|
||||||
if ( r->reply()->error() == QNetworkReply::NoError )
|
if ( r->reply()->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
m_body = r->reply()->readAll();
|
m_body = r->reply()->readAll();
|
||||||
gotBody();
|
gotBody();
|
||||||
}
|
}
|
||||||
|
|
||||||
r->deleteLater();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -782,6 +782,7 @@ TomahawkApp::spotifyApiCheckFinished()
|
|||||||
{
|
{
|
||||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||||
Q_ASSERT( reply );
|
Q_ASSERT( reply );
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
DropJob::setCanParseSpotifyPlaylists( !reply->error() );
|
DropJob::setCanParseSpotifyPlaylists( !reply->error() );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user