More detailed strings for the progress kind.

This commit is contained in:
Klaas Freitag 2013-08-06 18:06:39 +02:00
parent 4d8a371e43
commit 3502edf71b
3 changed files with 47 additions and 3 deletions

View file

@ -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;

View file

@ -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;

View file

@ -69,7 +69,8 @@ public:
QTime timestamp;
} SyncProblem;
static QString asString( Kind );
static QString asActionString( Kind );
static QString asResultString( Kind );
};
/**