mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 12:19:03 +03:00
Added support method statusToString
This commit is contained in:
parent
1ff94e86bd
commit
ae847e46e7
2 changed files with 29 additions and 0 deletions
|
@ -34,6 +34,34 @@ SyncResult::Status SyncResult::status() const
|
||||||
return _status;
|
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 )
|
void SyncResult::setStatus( Status stat )
|
||||||
{
|
{
|
||||||
_status = stat;
|
_status = stat;
|
||||||
|
|
|
@ -48,6 +48,7 @@ public:
|
||||||
|
|
||||||
void setStatus( Status );
|
void setStatus( Status );
|
||||||
Status status() const;
|
Status status() const;
|
||||||
|
QString statusString() const;
|
||||||
|
|
||||||
bool localRunOnly() const;
|
bool localRunOnly() const;
|
||||||
void setLocalRunOnly( bool );
|
void setLocalRunOnly( bool );
|
||||||
|
|
Loading…
Reference in a new issue