diff options
Diffstat (limited to 'jobs/basejob.h')
-rw-r--r-- | jobs/basejob.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/jobs/basejob.h b/jobs/basejob.h index a5b457c5..ed630a67 100644 --- a/jobs/basejob.h +++ b/jobs/basejob.h @@ -62,6 +62,7 @@ namespace QMatrixClient , NotFoundError , IncorrectRequestError , IncorrectResponseError + , TooManyRequestsError , UserDefinedError = 200 }; @@ -98,7 +99,12 @@ namespace QMatrixClient Status(int c, QString m) : code(c), message(std::move(m)) { } bool good() const { return code < ErrorLevel; } - friend QDebug operator<<(QDebug dbg, const Status& s); + friend QDebug operator<<(QDebug dbg, const Status& s) + { + QDebug(dbg).noquote().nospace() + << s.code << ": " << s.message; + return dbg; + } int code; QString message; @@ -124,6 +130,11 @@ namespace QMatrixClient Q_INVOKABLE duration_t getNextRetryInterval() const; Q_INVOKABLE duration_t millisToRetry() const; + friend QDebug operator<<(QDebug dbg, const BaseJob* j) + { + return dbg << j->objectName(); + } + public slots: void start(const ConnectionData* connData); |