pipacs / o2

OAuth 2.0 for Qt
BSD 2-Clause "Simplified" License
317 stars 147 forks source link

textual error strings for network errors #142

Closed farindk closed 3 years ago

farindk commented 3 years ago

Currently, the finished-signal of O2Requestor passes an error code. In order to get a textual error message, the preferred way is to get it from QNetworkReply::errorString(). However, this is not available when the finished signal has been emitted as the QNetworkReply object is not accessible and may already have been destroyed.

How about adding the error string as a parameter to the finished signal?

In order to avoid breaking existing code, one could add another finished signal overload with the error string parameter. What do you think about this? I can provide a pull-request if needed.