aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-12-23 17:29:25 +0100
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-12-23 17:29:25 +0100
commit3bfe40e40183821557845456349e1079af7b4e25 (patch)
tree38ffead247521bc8291694f10b77e80e9fe4bea5
parent84b21debc68b16b7dad7f6ed2e679e1c224956ea (diff)
downloadlibquotient-3bfe40e40183821557845456349e1079af7b4e25.tar.gz
libquotient-3bfe40e40183821557845456349e1079af7b4e25.zip
BaseJob::Status: add comparison with int
Since Status single-parameter constructor is (intentionally) not explicit, comparisons may not do what's expected in cases like the one fixed by 3ef036cd. This makes comparisons "do the right thing".
-rw-r--r--lib/jobs/basejob.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h
index 5c054ed1..a0b89ef7 100644
--- a/lib/jobs/basejob.h
+++ b/lib/jobs/basejob.h
@@ -136,6 +136,14 @@ public:
{
return !operator==(other);
}
+ bool operator==(int otherCode) const
+ {
+ return code == otherCode;
+ }
+ bool operator!=(int otherCode) const
+ {
+ return !operator==(otherCode);
+ }
int code;
QString message;