mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 16:29:43 +01:00
Add error checking when can't get short url.
This commit is contained in:
parent
b250d13362
commit
79920efe4f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user