Make qget manual test compile without ssl support

Change-Id: I35f92328b79df1cfcae52fa6ff8290f260183aea
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Shane Kearns 2012-02-20 16:40:55 +00:00 committed by Qt by Nokia
parent 49a7c2fe6e
commit 3fe79f23a9
2 changed files with 6 additions and 0 deletions

View File

@ -57,7 +57,9 @@ DownloadManager::DownloadManager()
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()
@ -117,6 +119,7 @@ void DownloadManager::proxyAuthenticationRequired(const QNetworkProxy& proxy, QA
}
}
#ifndef QT_NO_SSL
void DownloadManager::sslErrors(QNetworkReply* reply, const QList<QSslError>& errors)
{
qDebug() << "sslErrors";
@ -125,6 +128,7 @@ void DownloadManager::sslErrors(QNetworkReply* reply, const QList<QSslError>& er
qDebug() << error.certificate().toPem();
}
}
#endif
DownloadItem::DownloadItem(QNetworkReply* r, QNetworkAccessManager& manager) : reply(r), nam(manager)
{

View File

@ -87,7 +87,9 @@ private slots:
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;