mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
Move utilities to core/utils folder.
Also move the names to Utils namespace.
This commit is contained in:
parent
427688cb34
commit
191cdc2849
67 changed files with 1172 additions and 1135 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue