Move implementation to cpp file.

main
Teo Mrnjavac 11 years ago
parent 6881fdab6e
commit d1151d87cf

@ -21,12 +21,56 @@
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 )
: QObject( parent )
{
}
Job::~Job()
{}
} // namespace Calamares

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

Loading…
Cancel
Save