mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 06:36:55 +02:00
Add error checking when can't get short url.
This commit is contained in:
@@ -814,7 +814,6 @@ GlobalActionManager::shortenLinkRequestFinished()
|
|||||||
if( !reply )
|
if( !reply )
|
||||||
{
|
{
|
||||||
emit shortLinkReady( QUrl( "" ), QUrl( "" ) );
|
emit shortLinkReady( QUrl( "" ), QUrl( "" ) );
|
||||||
reply->deleteLater();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -847,9 +846,22 @@ GlobalActionManager::shortenLinkRequestFinished()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GlobalActionManager::shortenLinkRequestError( QNetworkReply::NetworkError )
|
GlobalActionManager::shortenLinkRequestError( QNetworkReply::NetworkError error )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
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
|
void
|
||||||
|
Reference in New Issue
Block a user