If the PROPFIND return an invalid code (like 200) then we would
not recieve the error signal and we would never sync again.
Found while investigating https://github.com/owncloud/enterprise/issues/1068
job->setTimeout(timeoutToUseMsec);
job->setProperties(QList<QByteArray>() << "getlastmodified");
connect(job, SIGNAL(result(QVariantMap)), SLOT(slotAuthSuccess()));
- connect(job, SIGNAL(networkError(QNetworkReply*)), SLOT(slotAuthFailed(QNetworkReply*)));
+ connect(job, SIGNAL(finishedWithError(QNetworkReply*)), SLOT(slotAuthFailed(QNetworkReply*)));
job->start();
}
} else {
qDebug() << "PROPFIND request *not* successful, http result code is" << http_result_code
<< (http_result_code == 302 ? reply()->header(QNetworkRequest::LocationHeader).toString() : QLatin1String(""));
- emit finishedWithError();
+ emit finishedWithError(reply());
}
return true;
}
signals:
void result(const QVariantMap &values);
- void finishedWithError();
+ void finishedWithError(QNetworkReply *reply = 0);
private slots:
virtual bool finished() Q_DECL_OVERRIDE;