mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Ref T180, "on" is valid true value
This commit is contained in:
@@ -48,11 +48,14 @@ namespace BlackMisc
|
||||
{
|
||||
QString s(string.trimmed().toLower());
|
||||
if (s.isEmpty()) { return false; }
|
||||
const QChar c = s.at(0);
|
||||
|
||||
// explicit values
|
||||
// 1 char values
|
||||
const QChar c = s.at(0);
|
||||
if (c == '1' || c == 't' || c == 'y' || c == 'x') { return true; }
|
||||
if (c == '0' || c == 'f' || c == 'n' || c == '_') { return false; }
|
||||
|
||||
// full words
|
||||
if (s == "on") { return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user