diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-09 11:53:38 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-09 11:53:38 +0900 |
commit | dca271aaf0142e2722219df8fcc03bf8fc03c150 (patch) | |
tree | dce2f3d908c2e21c65db89de41c9b62a5ebe241d /jobs | |
parent | a568ea9a2a6b5ffb4b47520bbacb71943d8f8174 (diff) | |
parent | 8fb9e3560ebf24ed6b697e3142a4fc7c6bd23393 (diff) | |
download | libquotient-dca271aaf0142e2722219df8fcc03bf8fc03c150.tar.gz libquotient-dca271aaf0142e2722219df8fcc03bf8fc03c150.zip |
Merge branch 'master' into kitsune-gtad
Diffstat (limited to 'jobs')
-rw-r--r-- | jobs/basejob.cpp | 2 | ||||
-rw-r--r-- | jobs/basejob.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp index 2a28f11e..1f079966 100644 --- a/jobs/basejob.cpp +++ b/jobs/basejob.cpp @@ -70,7 +70,7 @@ class BaseJob::Private QByteArrayList expectedContentTypes; QScopedPointer<QNetworkReply, NetworkReplyDeleter> reply; - Status status = NoError; + Status status = Pending; QTimer timer; QTimer retryTimer; diff --git a/jobs/basejob.h b/jobs/basejob.h index daca1e79..1fe3a24d 100644 --- a/jobs/basejob.h +++ b/jobs/basejob.h @@ -50,6 +50,7 @@ namespace QMatrixClient * (which BaseJob used to inherit from). */ enum StatusCode { NoError = 0 // To be compatible with Qt conventions , Success = 0 + , Pending = 1 , ErrorLevel = 100 // Errors have codes starting from this , NetworkError = 100 , JsonParseError @@ -291,4 +292,9 @@ namespace QMatrixClient class Private; QScopedPointer<Private> d; }; + + inline bool isJobRunning(BaseJob* job) + { + return job && job->error() == BaseJob::Pending; + } } // namespace QMatrixClient |