mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Replace naturalSort()
with naturalCompare()
.
This commit is contained in:
parent
484cd2f1ce
commit
d65ff87148
9 changed files with 82 additions and 149 deletions
|
@ -51,19 +51,19 @@ namespace Utils
|
|||
// Taken from https://crackstation.net/hashing-security.htm
|
||||
bool slowEquals(const QByteArray &a, const QByteArray &b);
|
||||
|
||||
bool naturalSort(const QString &left, const QString &right, bool &result);
|
||||
|
||||
class NaturalCompare
|
||||
{
|
||||
public:
|
||||
NaturalCompare();
|
||||
bool operator()(const QString &l, const QString &r);
|
||||
bool operator()(const QString &left, const QString &right);
|
||||
bool lessThan(const QString &left, const QString &right);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
|
||||
private:
|
||||
QCollator m_collator;
|
||||
#endif
|
||||
};
|
||||
|
||||
bool naturalCompare(const QString &left, const QString &right);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue