mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 13:11:25 -07:00
Move parsing of TriStateBool to a static class function
This commit is contained in:
parent
cfb55d9d77
commit
e022c371ff
5 changed files with 18 additions and 17 deletions
|
@ -42,8 +42,6 @@
|
|||
#include <QThreadStorage>
|
||||
#endif
|
||||
|
||||
#include "base/tristatebool.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
class NaturalCompare
|
||||
|
@ -199,15 +197,6 @@ bool Utils::String::parseBool(const QString &string, const bool defaultValue)
|
|||
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;
|
||||
}
|
||||
|
||||
QString Utils::String::join(const QVector<QStringRef> &strings, const QString &separator)
|
||||
{
|
||||
if (strings.empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue