From c8229733b0b71844c5c0daff7c4349a2f039e0c7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 1 Oct 2019 16:05:03 +0200 Subject: [PATCH] [libcalamares] Document the pseudo-constructors for JobResult --- src/libcalamares/Job.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/Job.h b/src/libcalamares/Job.h index bddd0277c..3a68297ca 100644 --- a/src/libcalamares/Job.h +++ b/src/libcalamares/Job.h @@ -68,9 +68,16 @@ public: /// @brief an "ok status" result static JobResult ok(); - /// @brief an "error" result resulting from the execution of the job + /** @brief an "error" result resulting from the execution of the job + * + * The error code is set to GenericError. + */ static JobResult error( const QString& message, const QString& details = QString() ); - /// @brief an "internal error" meaning the job itself has a problem (usually for python) + /** @brief an "internal error" meaning the job itself has a problem (usually for python) + * + * Pass in a suitable error code; using 0 (which would normally mean "ok") instead + * gives you a GenericError code. + */ static JobResult internalError( const QString&, const QString& details, int errorCode ); protected: