connect(&nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(finished(QNetworkReply*)));
connect(&nam, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*, QAuthenticator*)));
connect(&nam, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)));
+#ifndef QT_NO_SSL
connect(&nam, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)), this, SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&)));
+#endif
}
DownloadManager::~DownloadManager()
}
}
+#ifndef QT_NO_SSL
void DownloadManager::sslErrors(QNetworkReply* reply, const QList<QSslError>& errors)
{
qDebug() << "sslErrors";
qDebug() << error.certificate().toPem();
}
}
+#endif
DownloadItem::DownloadItem(QNetworkReply* r, QNetworkAccessManager& manager) : reply(r), nam(manager)
{
void finished(QNetworkReply* reply);
void authenticationRequired(QNetworkReply* reply, QAuthenticator* authenticator);
void proxyAuthenticationRequired(const QNetworkProxy& proxy, QAuthenticator* authenticator);
+#ifndef QT_NO_SSL
void sslErrors(QNetworkReply* reply, const QList<QSslError>& errors);
+#endif
void downloadFinished(DownloadItem *item);
private:
QNetworkAccessManager nam;