mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 17:35:37 -04:00
Move implementation to cpp file.
This commit is contained in:
parent
6881fdab6e
commit
d1151d87cf
2 changed files with 50 additions and 25 deletions
|
@ -21,12 +21,56 @@
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
Calamares::JobResult::operator bool() const
|
||||||
|
{
|
||||||
|
return m_ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
JobResult::message() const
|
||||||
|
{
|
||||||
|
return m_message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString
|
||||||
|
JobResult::details() const
|
||||||
|
{
|
||||||
|
return m_details;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
JobResult
|
||||||
|
JobResult::ok()
|
||||||
|
{
|
||||||
|
return JobResult( true, QString(), QString() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
JobResult
|
||||||
|
JobResult::error( const QString& message, const QString& details )
|
||||||
|
{
|
||||||
|
return JobResult( false, message, details );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
JobResult::JobResult( bool ok, const QString& message, const QString& details )
|
||||||
|
: m_ok( ok )
|
||||||
|
, m_message( message )
|
||||||
|
, m_details( details )
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
Job::Job( QObject* parent )
|
Job::Job( QObject* parent )
|
||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Job::~Job()
|
Job::~Job()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Calamares
|
} // namespace Calamares
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue