From 6333deea62744feabcfd2add38cc5c0837f536d6 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Fri, 27 Aug 2021 20:51:07 +0200 Subject: [PATCH] also add an errorText parameter to finished() with headers --- src/o2requestor.cpp | 1 + src/o2requestor.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/o2requestor.cpp b/src/o2requestor.cpp index 319bbef..9aa1a3e 100644 --- a/src/o2requestor.cpp +++ b/src/o2requestor.cpp @@ -263,6 +263,7 @@ void O2Requestor::finish() { Q_EMIT finished(id_, error_, data); Q_EMIT finished(id_, error_, reply_->errorString(), data); Q_EMIT finished(id_, error_, data, headers); + Q_EMIT finished(id_, error_, reply_->errorString(), data, headers); } void O2Requestor::retry() { diff --git a/src/o2requestor.h b/src/o2requestor.h index 250ecfb..c2ff20a 100644 --- a/src/o2requestor.h +++ b/src/o2requestor.h @@ -78,6 +78,9 @@ public Q_SLOTS: /// Emitted when a request has been completed or failed. Also reply headers will be provided. void finished(int id, QNetworkReply::NetworkError error, QByteArray data, QList headers); + /// Emitted when a request has been completed or failed. Also reply headers will be provided. + void finished(int id, QNetworkReply::NetworkError error, QString errorText, QByteArray data, QList headers); + /// Emitted when an upload has progressed. void uploadProgress(int id, qint64 bytesSent, qint64 bytesTotal);