Commit c318bd3b authored by Rohit Yadav's avatar Rohit Yadav

YouTubeService.cpp: Fix connection abort error with suitable error and

ignore it.

Ignore Abort errors, a bug was found, if user clicks upload when not
connected to the internet/network, basically the operation is aborted
and stack blows off because of: reply->deleteLater();
parent 8a3715d5
......@@ -180,7 +180,7 @@ YouTubeService::networkError( QNetworkReply::NetworkError e )
case QNetworkReply::OperationCanceledError:
errString = "Operation Aborted";
m_error = NetworkError; break;
m_error = Abort; break;
case QNetworkReply::SslHandshakeFailedError:
errString = "SSL Error";
......@@ -215,8 +215,8 @@ YouTubeService::networkError( QNetworkReply::NetworkError e )
qDebug() << "[NETWORK ERROR]: " << e << ": " << errString;
emit error( errString );
/* Ignore Content errors */
if( m_error == ContentError )
/* Ignore Content and Abort errors */
if( m_error == ContentError || m_error == Abort )
return;
QNetworkReply *reply = static_cast<QNetworkReply *>( sender() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment