From a93126a6d0602d531ad90074ffa5886281212a5f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 17 Jan 2022 14:19:28 +0100 Subject: [PATCH] [libcalamares] More meaningful name for JobResult success --- src/libcalamares/Job.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libcalamares/Job.h b/src/libcalamares/Job.h index 33965e15f..dc89f1c49 100644 --- a/src/libcalamares/Job.h +++ b/src/libcalamares/Job.h @@ -47,7 +47,7 @@ public: /** @brief Is this JobResult a success? * - * Equivalent to errorCode() == 0, might be named isValid(). + * Equivalent to errorCode() == 0, see succeeded(). */ virtual operator bool() const; @@ -58,6 +58,11 @@ public: virtual void setDetails( const QString& details ); int errorCode() const { return m_number; } + /** @brief Is this JobResult a success? + * + * Equivalent to errorCode() == 0. + */ + bool succeeded() const { return this->operator bool(); } /// @brief an "ok status" result static JobResult ok();