[libcalamares] Document operator bool() of JobResult

- this could be named isValid() instead, but basically the idea
   is that this code makes sense:

      JobResult r = do_thing();
      if ( !r ) { /* Error happened! */ return r; }
      /* Carry on .. */
This commit is contained in:
Adriaan de Groot 2019-10-01 15:58:02 +02:00
parent 8c3146a1cd
commit 3a8d543c72

View File

@ -46,11 +46,16 @@ public:
InvalidConfiguration = 2
};
// Can't copy, but you can keep a temporary
JobResult( const JobResult& rhs ) = delete;
JobResult( JobResult&& rhs );
virtual ~JobResult() {}
/** @brief Is this JobResult a success?
*
* Equivalent to errorCode() == 0, might be named isValid().
*/
virtual operator bool() const;
virtual QString message() const;