diff options
Diffstat (limited to 'jobs/basejob.h')
-rw-r--r-- | jobs/basejob.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/jobs/basejob.h b/jobs/basejob.h index a5b457c5..fa253d96 100644 --- a/jobs/basejob.h +++ b/jobs/basejob.h @@ -98,7 +98,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 +129,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); |