Skip to content

Commit

Permalink
Merge pull request #145 from farindk/error-string2
Browse files Browse the repository at this point in the history
also add an errorText parameter to the finished() signal with headers
  • Loading branch information
pipacs committed Aug 30, 2021
2 parents 9819c55 + 6333dee commit 3a25dcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/o2requestor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions src/o2requestor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<QNetworkReply::RawHeaderPair> 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<QNetworkReply::RawHeaderPair> headers);

/// Emitted when an upload has progressed.
void uploadProgress(int id, qint64 bytesSent, qint64 bytesTotal);

Expand Down

0 comments on commit 3a25dcf

Please sign in to comment.