Fix compilation on MSVC2013 by moving unicode strings to

"unicodestrings.h". Closes #3059.
This commit is contained in:
Chocobo1 2015-06-15 17:36:14 +08:00
parent bc97208516
commit e739e81205
8 changed files with 187 additions and 99 deletions

View file

@ -67,6 +67,7 @@ const int UNLEN = 256;
#endif // DISABLE_GUI
#include "core/utils/string.h"
#include "core/unicodestrings.h"
#include "misc.h"
static struct { const char *source; const char *comment; } units[] = {
@ -345,7 +346,7 @@ QString Utils::Misc::bcLinkToMagnet(QString bc_link)
QString Utils::Misc::userFriendlyDuration(qlonglong seconds)
{
if (seconds < 0 || seconds >= MAX_ETA)
return QString::fromUtf8("");
return QString::fromUtf8(C_INFINITY);
if (seconds == 0)
return "0";
if (seconds < 60)
@ -361,7 +362,7 @@ QString Utils::Misc::userFriendlyDuration(qlonglong seconds)
hours = hours - days * 24;
if (days < 100)
return QCoreApplication::translate("misc", "%1d %2h", "e.g: 2days 10hours").arg(QString::number(days)).arg(QString::number(hours));
return QString::fromUtf8("");
return QString::fromUtf8(C_INFINITY);
}
QString Utils::Misc::getUserIDString()