mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
Add error checking when can't get short url.
This commit is contained in:
@@ -814,7 +814,6 @@ GlobalActionManager::shortenLinkRequestFinished()
|
||||
if( !reply )
|
||||
{
|
||||
emit shortLinkReady( QUrl( "" ), QUrl( "" ) );
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -847,9 +846,22 @@ GlobalActionManager::shortenLinkRequestFinished()
|
||||
}
|
||||
|
||||
void
|
||||
GlobalActionManager::shortenLinkRequestError( QNetworkReply::NetworkError )
|
||||
GlobalActionManager::shortenLinkRequestError( QNetworkReply::NetworkError error )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
qDebug() << "Network Error: " << error;
|
||||
|
||||
QNetworkReply *reply = qobject_cast<QNetworkReply*>( sender() );
|
||||
|
||||
// NOTE: this should never happen
|
||||
if( !reply )
|
||||
{
|
||||
emit shortLinkReady( QUrl( "" ), QUrl( "" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
reply->deleteLater();
|
||||
emit shortLinkReady( QUrl( "" ), QUrl( "" ) );
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user