Added support method statusToString

This commit is contained in:
Klaas Freitag 2012-07-30 17:09:49 +03:00
parent 1ff94e86bd
commit ae847e46e7
2 changed files with 29 additions and 0 deletions

View file

@ -34,6 +34,34 @@ SyncResult::Status SyncResult::status() const
return _status;
}
QString SyncResult::statusString() const
{
QString re;
Status stat = status();
switch( stat ){
case Undefined:
re = QLatin1String("Undefined");
break;
case NotYetStarted:
re = QLatin1String("Not yet Started");
break;
case SyncRunning:
re = QLatin1String("Sync Running");
break;
case Success:
re = QLatin1String("Success");
break;
case Error:
re = QLatin1String("Error");
break;
case SetupError:
re = QLatin1String("SetupError");
break;
}
return re;
}
void SyncResult::setStatus( Status stat )
{
_status = stat;

View file

@ -48,6 +48,7 @@ public:
void setStatus( Status );
Status status() const;
QString statusString() const;
bool localRunOnly() const;
void setLocalRunOnly( bool );