[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:
parent
8c3146a1cd
commit
3a8d543c72
@ -46,11 +46,16 @@ public:
|
|||||||
InvalidConfiguration = 2
|
InvalidConfiguration = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Can't copy, but you can keep a temporary
|
||||||
JobResult( const JobResult& rhs ) = delete;
|
JobResult( const JobResult& rhs ) = delete;
|
||||||
JobResult( JobResult&& rhs );
|
JobResult( JobResult&& rhs );
|
||||||
|
|
||||||
virtual ~JobResult() {}
|
virtual ~JobResult() {}
|
||||||
|
|
||||||
|
/** @brief Is this JobResult a success?
|
||||||
|
*
|
||||||
|
* Equivalent to errorCode() == 0, might be named isValid().
|
||||||
|
*/
|
||||||
virtual operator bool() const;
|
virtual operator bool() const;
|
||||||
|
|
||||||
virtual QString message() const;
|
virtual QString message() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user