aboutsummaryrefslogtreecommitdiff
path: root/jobs/basejob.h
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/basejob.h')
-rw-r--r--jobs/basejob.h6
1 files changed, 6 insertions, 0 deletions
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