Redesign Web API

Normalize Web API method names.
Allow to use alternative Web UI.
Switch Web API version to standard form (i.e. "2.0").
Improve Web UI translation code.
Retranslate changed files.
Add Web API for RSS subsystem.
This commit is contained in:
Vladimir Golovnev (Glassez)
2017-10-14 16:27:21 +03:00
parent 0fc1ad664f
commit 27d8dbf13b
90 changed files with 4817 additions and 3038 deletions

View File

@@ -40,6 +40,8 @@
#include <QThreadStorage>
#endif
#include "../tristatebool.h"
namespace
{
class NaturalCompare
@@ -184,3 +186,19 @@ QString Utils::String::wildcardToRegex(const QString &pattern)
{
return qt_regexp_toCanonical(pattern, QRegExp::Wildcard);
}
bool Utils::String::parseBool(const QString &string, const bool defaultValue)
{
if (defaultValue)
return (string.compare("false", Qt::CaseInsensitive) == 0) ? false : true;
return (string.compare("true", Qt::CaseInsensitive) == 0) ? true : false;
}
TriStateBool Utils::String::parseTriStateBool(const QString &string)
{
if (string.compare("true", Qt::CaseInsensitive) == 0)
return TriStateBool::True;
if (string.compare("false", Qt::CaseInsensitive) == 0)
return TriStateBool::False;
return TriStateBool::Undefined;
}