Fix for filter

fix for #749
+ You can now search for sets using lower case: "frf", "dtk", "rtr" and
so on.
+ You now need exact matches on set short and full names. "rtr" and
"return to ravnica" will work. "return" will not work.
This commit is contained in:
Matt Lowe 2015-03-19 00:55:50 +01:00
parent adcae59eb0
commit 5218e2f710

View file

@ -202,8 +202,8 @@ bool FilterItem::acceptSet(const CardInfo *info) const
status = false;
for (i = info->getSets().constBegin(); i != info->getSets().constEnd(); i++)
if ((*i)->getShortName() == term
|| (*i)->getLongName().contains(term, Qt::CaseInsensitive)) {
if ((*i)->getShortName().compare(term, Qt::CaseInsensitive) == 0
|| (*i)->getLongName().compare(term, Qt::CaseInsensitive) == 0) {
status = true;
break;
}