aboutsummaryrefslogtreecommitdiff
path: root/jobs/basejob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/basejob.cpp')
-rw-r--r--jobs/basejob.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index b7e1b718..86109feb 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -97,6 +97,7 @@ void BaseJob::start()
d->reply = d->connection->nam()->put(req, data.toJson());
break;
}
+ connect( d->reply, &QNetworkReply::sslErrors, this, &BaseJob::sslErrors );
connect( d->reply, &QNetworkReply::finished, this, &BaseJob::gotReply );
QTimer::singleShot( 120*1000, this, SLOT(timeout()) );
// connect( d->reply, static_cast<void(QNetworkReply::*)(QNetworkReply::NetworkError)>(&QNetworkReply::error),
@@ -124,7 +125,7 @@ void BaseJob::gotReply()
{
if( d->reply->error() != QNetworkReply::NoError )
{
- qDebug() << "NetworkError!!!";
+ qDebug() << "NetworkError:" << d->reply->errorString();
fail( NetworkError, d->reply->errorString() );
return;
}
@@ -144,3 +145,11 @@ void BaseJob::timeout()
if( d->reply->isRunning() )
d->reply->abort();
}
+
+void BaseJob::sslErrors(const QList<QSslError>& errors)
+{
+ foreach (const QSslError &error, errors) {
+ qWarning() << "SSL ERROR" << error.errorString();
+ }
+ d->reply->ignoreSslErrors(); // TODO: insecure! should prompt user first
+}