|
|
@ -29,41 +29,22 @@ namespace Calamares {
|
|
|
|
class DLLEXPORT JobResult
|
|
|
|
class DLLEXPORT JobResult
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
operator bool() const
|
|
|
|
operator bool() const;
|
|
|
|
{
|
|
|
|
|
|
|
|
return m_ok;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString message() const
|
|
|
|
QString message() const;
|
|
|
|
{
|
|
|
|
|
|
|
|
return m_message;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString details() const
|
|
|
|
QString details() const;
|
|
|
|
{
|
|
|
|
|
|
|
|
return m_details;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static JobResult ok()
|
|
|
|
static JobResult ok();
|
|
|
|
{
|
|
|
|
|
|
|
|
return JobResult( true, QString(), QString() );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static JobResult error( const QString& message, const QString& details = QString() )
|
|
|
|
static JobResult error( const QString& message, const QString& details = QString() );
|
|
|
|
{
|
|
|
|
|
|
|
|
return JobResult( false, message, details );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
bool m_ok;
|
|
|
|
bool m_ok;
|
|
|
|
QString m_message;
|
|
|
|
QString m_message;
|
|
|
|
QString m_details;
|
|
|
|
QString m_details;
|
|
|
|
|
|
|
|
|
|
|
|
JobResult( bool ok, const QString& message, const QString& details )
|
|
|
|
JobResult( bool ok, const QString& message, const QString& details );
|
|
|
|
: m_ok( ok )
|
|
|
|
|
|
|
|
, m_message( message )
|
|
|
|
|
|
|
|
, m_details( details )
|
|
|
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class DLLEXPORT Job : public QObject
|
|
|
|
class DLLEXPORT Job : public QObject
|
|
|
|