Exemple #1
0
void
XSPFLoader::networkError( QNetworkReply::NetworkError /* error */ )
{
    reportError();

    NetworkReply* r = qobject_cast<NetworkReply*>( sender() );
    r->deleteLater();
}
Exemple #2
0
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;
}
Exemple #4
0
void
XSPFLoader::networkLoadFinished()
{
    NetworkReply* r = qobject_cast<NetworkReply*>( sender() );
    r->deleteLater();

    if ( r->reply()->error() == QNetworkReply::NoError )
    {
        m_body = r->reply()->readAll();
        gotBody();
    }
}