void XSPFLoader::networkError( QNetworkReply::NetworkError /* error */ ) { reportError(); NetworkReply* r = qobject_cast<NetworkReply*>( sender() ); r->deleteLater(); }
void JSPFLoader::networkError( QNetworkReply::NetworkError e ) { Q_UNUSED( e ); reportError(); NetworkReply* r = qobject_cast<NetworkReply*>( sender() ); r->deleteLater(); }
NetworkReply *NetworkAccessManager::get(const QUrl &url) { qfLogFuncFrame() << url.toString(); NetworkReply *ret = new NetworkReply(); QNetworkRequest rq(url); //rq.setRawHeader("User-Agent", "MyOwnBrowser 1.0"); QNetworkReply *repl = Super::get(rq); ret->setReply(repl); return ret; }
void XSPFLoader::networkLoadFinished() { NetworkReply* r = qobject_cast<NetworkReply*>( sender() ); r->deleteLater(); if ( r->reply()->error() == QNetworkReply::NoError ) { m_body = r->reply()->readAll(); gotBody(); } }