mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
in filters allow specifiying boolean columns as strings
This commit is contained in:
parent
9cb121bd04
commit
1744a64f77
@ -120,7 +120,7 @@ CSMFilter::Token CSMFilter::Parser::getStringToken()
|
||||
}
|
||||
|
||||
if (string[0]=='"')
|
||||
string = string.substr (1, string.size()-2);
|
||||
return string.substr (1, string.size()-2);
|
||||
}
|
||||
|
||||
return checkKeywords (string);
|
||||
|
@ -45,6 +45,10 @@ bool CSMFilter::TextNode::test (const CSMWorld::IdTable& table, int row,
|
||||
if (value>=0 && value<static_cast<int> (enums.size()))
|
||||
string = QString::fromUtf8 (enums[value].c_str());
|
||||
}
|
||||
else if (data.type()==QVariant::Bool)
|
||||
{
|
||||
string = data.toBool() ? "true" : " false";
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user