mirror of
https://github.com/silverqx/TinyORM.git
synced 2025-12-21 10:29:36 -06:00
made isTrue() case insensitive
This commit is contained in:
@@ -67,10 +67,10 @@ QString Type::prettyFunction(const QString &function)
|
||||
bool Type::isTrue(const QString &value)
|
||||
{
|
||||
return !value.isEmpty() &&
|
||||
value != QLatin1Char('0') &&
|
||||
value != QStringLiteral("false") &&
|
||||
// QVariant::value<bool>() doesn't check conditions below
|
||||
value != QStringLiteral("off");
|
||||
value != QLatin1Char('0') &&
|
||||
value.compare(QStringLiteral("false"), Qt::CaseInsensitive) != 0 &&
|
||||
// QVariant::value<bool>() doesn't check conditions below
|
||||
value.compare(QStringLiteral("off"), Qt::CaseInsensitive) != 0;
|
||||
}
|
||||
|
||||
bool Type::isTrue(const QVariant &value)
|
||||
|
||||
Reference in New Issue
Block a user