mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
More detailed strings for the progress kind.
This commit is contained in:
parent
4d8a371e43
commit
3502edf71b
3 changed files with 47 additions and 3 deletions
|
@ -533,7 +533,7 @@ void AccountSettings::slotSetProgress(const QString& folder, const Progress::Inf
|
|||
|
||||
// stay with the previous kind-string for Context.
|
||||
if( progress.kind != Progress::Context ) {
|
||||
_kindContext = Progress::asString(progress.kind);
|
||||
_kindContext = Progress::asActionString(progress.kind);
|
||||
}
|
||||
QString kindString = _kindContext;
|
||||
|
||||
|
|
|
@ -21,8 +21,51 @@
|
|||
namespace Mirall {
|
||||
|
||||
ProgressDispatcher* ProgressDispatcher::_instance = 0;
|
||||
QString Progress::asResultString( Kind kind )
|
||||
{
|
||||
QString re;
|
||||
|
||||
QString Progress::asString( Kind kind )
|
||||
switch(kind) {
|
||||
case Download:
|
||||
case EndDownload:
|
||||
re = QObject::tr("Download");
|
||||
break;
|
||||
case Upload:
|
||||
re = QObject::tr("Upload");
|
||||
break;
|
||||
case Context:
|
||||
re = QObject::tr("Context");
|
||||
break;
|
||||
case Inactive:
|
||||
re = QObject::tr("Inactive");
|
||||
break;
|
||||
case StartDownload:
|
||||
re = QObject::tr("Download");
|
||||
break;
|
||||
case StartUpload:
|
||||
case EndUpload:
|
||||
re = QObject::tr("Upload");
|
||||
break;
|
||||
case StartSync:
|
||||
re = QObject::tr("Start");
|
||||
break;
|
||||
case EndSync:
|
||||
re = QObject::tr("Finished");
|
||||
break;
|
||||
case StartDelete:
|
||||
re = QObject::tr("For deletion");
|
||||
break;
|
||||
case EndDelete:
|
||||
re = QObject::tr("deleted");
|
||||
break;
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
return re;
|
||||
|
||||
}
|
||||
|
||||
QString Progress::asActionString( Kind kind )
|
||||
{
|
||||
QString re;
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ public:
|
|||
QTime timestamp;
|
||||
} SyncProblem;
|
||||
|
||||
static QString asString( Kind );
|
||||
static QString asActionString( Kind );
|
||||
static QString asResultString( Kind );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue