1
0
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:
Marc Zinnschlag 2013-09-03 12:32:06 +02:00
parent 9cb121bd04
commit 1744a64f77
2 changed files with 5 additions and 1 deletions

View File

@ -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);

View File

@ -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;