Move utilities to core/utils folder.

Also move the names to Utils namespace.
This commit is contained in:
Vladimir Golovnev (Glassez) 2015-05-06 14:53:27 +03:00
parent 427688cb34
commit 191cdc2849
67 changed files with 1172 additions and 1135 deletions

View file

@ -33,11 +33,21 @@
#include <string>
class QString;
class QByteArray;
namespace String
namespace Utils
{
QString fromStdString(const std::string &str);
std::string toStdString(const QString &str);
namespace String
{
QString fromStdString(const std::string &str);
std::string toStdString(const QString &str);
bool naturalSort(QString left, QString right, bool &result);
QString fromDouble(double n, int precision);
// Implements constant-time comparison to protect against timing attacks
// Taken from https://crackstation.net/hashing-security.htm
bool slowEquals(const QByteArray &a, const QByteArray &b);
}
}
#endif // UTILS_STRING_H