mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Move parsing of TriStateBool to a static class function
This commit is contained in:
committed by
sledgehammer999
parent
7bea10f507
commit
230fedf069
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user