diff options
Diffstat (limited to 'src/filter.cpp')
-rw-r--r-- | src/filter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/filter.cpp b/src/filter.cpp index 1a0c67c..b1c522b 100644 --- a/src/filter.cpp +++ b/src/filter.cpp @@ -35,9 +35,9 @@ bool FilterRule::matches(Data::EntryPtr entry_) const { case FuncNotEquals: return !equals(entry_); case FuncContains: - return tqcontains(entry_); + return contains(entry_); case FuncNotContains: - return !tqcontains(entry_); + return !contains(entry_); case FuncRegExp: return matchesRegExp(entry_); case FuncNotRegExp: @@ -66,19 +66,19 @@ bool FilterRule::equals(Data::EntryPtr entry_) const { return false; } -bool FilterRule::tqcontains(Data::EntryPtr entry_) const { +bool FilterRule::contains(Data::EntryPtr entry_) const { // empty field name means search all if(m_fieldName.isEmpty()) { TQStringList list = entry_->fieldValues() + entry_->formattedFieldValues(); // match is true if any strings match for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - if((*it).tqfind(m_pattern, 0, false) >= 0) { + if((*it).find(m_pattern, 0, false) >= 0) { return true; } } } else { - return entry_->field(m_fieldName).tqfind(m_pattern, 0, false) >= 0 - || entry_->formattedField(m_fieldName).tqfind(m_pattern, 0, false) >= 0; + return entry_->field(m_fieldName).find(m_pattern, 0, false) >= 0 + || entry_->formattedField(m_fieldName).find(m_pattern, 0, false) >= 0; } return false; @@ -90,14 +90,14 @@ bool FilterRule::matchesRegExp(Data::EntryPtr entry_) const { if(m_fieldName.isEmpty()) { TQStringList list = entry_->fieldValues() + entry_->formattedFieldValues(); for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - if((*it).tqfind(rx) >= 0) { + if((*it).find(rx) >= 0) { return true; break; } } } else { - return entry_->field(m_fieldName).tqfind(rx) >= 0 - || entry_->formattedField(m_fieldName).tqfind(rx) >= 0; + return entry_->field(m_fieldName).find(rx) >= 0 + || entry_->formattedField(m_fieldName).find(rx) >= 0; } return false; |