mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +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());
|
QString s(string.trimmed().toLower());
|
||||||
if (s.isEmpty()) { return false; }
|
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 == '1' || c == 't' || c == 'y' || c == 'x') { return true; }
|
||||||
if (c == '0' || c == 'f' || c == 'n' || c == '_') { return false; }
|
if (c == '0' || c == 'f' || c == 'n' || c == '_') { return false; }
|
||||||
|
|
||||||
|
// full words
|
||||||
|
if (s == "on") { return true; }
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user