From cc6b826cad3fd147477f1fddf117f11e74a51f1b Mon Sep 17 00:00:00 2001 From: poixen Date: Tue, 3 Mar 2015 16:53:48 +0100 Subject: [PATCH] Removed comments --- cockatrice/src/carddatabasemodel.cpp | 39 ++-------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/cockatrice/src/carddatabasemodel.cpp b/cockatrice/src/carddatabasemodel.cpp index bd184f32..0eea4cb4 100644 --- a/cockatrice/src/carddatabasemodel.cpp +++ b/cockatrice/src/carddatabasemodel.cpp @@ -148,47 +148,12 @@ bool CardDatabaseDisplayModel::filterAcceptsRow(int sourceRow, const QModelIndex bool show = false; if (!cardName.isEmpty()) { - if (info->getName().contains(cardName, Qt::CaseInsensitive)) { + if (info->getName().contains(cardName, Qt::CaseInsensitive)) show = true; - } } else return true;// search is empty, show all - return show; // term was not found - - - - //if (((isToken == ShowTrue) && !info->getIsToken()) || ((isToken == ShowFalse) && info->getIsToken())) - // return false; - // - //if (!cardNameBeginning.isEmpty()) - // if (!info->getName().startsWith(cardNameBeginning, Qt::CaseInsensitive)) - // return false; - // - //if (!cardName.isEmpty()) - // if (!info->getName().contains(cardName, Qt::CaseInsensitive)) - // return false; - // - //if (!cardNameSet.isEmpty()) - // if (!cardNameSet.contains(info->getName())) - // return false; - // - //if (!cardText.isEmpty()) - // if (!info->getText().contains(cardText, Qt::CaseInsensitive)) - // return false; - // - //if (!cardColors.isEmpty()) - // if (QSet::fromList(info->getColors()).intersect(cardColors).isEmpty() && !(info->getColors().isEmpty() && cardColors.contains("X"))) - // return false; - // - //if (!cardTypes.isEmpty()) - // if (!cardTypes.contains(info->getMainCardType())) - // return false; - - //if (filterTree != NULL) - // return filterTree->acceptsCard(info); - - //return true; + return show; } void CardDatabaseDisplayModel::clearSearch()