mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 03:15:44 -05:00
Make JobResult inheritable and remove obsolete Status enum.
This commit is contained in:
parent
f3fa124f8d
commit
3170067089
1 changed files with 10 additions and 14 deletions
|
@ -29,37 +29,33 @@ namespace Calamares {
|
|||
class DLLEXPORT JobResult
|
||||
{
|
||||
public:
|
||||
operator bool() const;
|
||||
virtual ~JobResult() {}
|
||||
|
||||
QString message() const;
|
||||
void setMessage( const QString& message );
|
||||
virtual operator bool() const;
|
||||
|
||||
QString details() const;
|
||||
void setDetails( const QString& details );
|
||||
virtual QString message() const;
|
||||
virtual void setMessage( const QString& message );
|
||||
|
||||
virtual QString details() const;
|
||||
virtual void setDetails( const QString& details );
|
||||
|
||||
static JobResult ok();
|
||||
|
||||
static JobResult error( const QString& message, const QString& details = QString() );
|
||||
|
||||
protected:
|
||||
explicit JobResult( bool ok, const QString& message, const QString& details );
|
||||
|
||||
private:
|
||||
bool m_ok;
|
||||
QString m_message;
|
||||
QString m_details;
|
||||
|
||||
JobResult( bool ok, const QString& message, const QString& details );
|
||||
};
|
||||
|
||||
class DLLEXPORT Job : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum State
|
||||
{
|
||||
Pending = 0,
|
||||
Running,
|
||||
Finished
|
||||
};
|
||||
|
||||
explicit Job( QObject* parent = nullptr );
|
||||
virtual ~Job();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue