85 QString resourceName = _resourceName.toLower();
87 if (
m_d->resourceExactMatchesIncluded.count() > 0
88 && !
m_d->resourceExactMatchesIncluded.contains(resourceName)) {
91 if (
m_d->resourceExactMatchesExcluded.contains(resourceName)) {
96 if (
m_d->resourceNamesPartialIncluded.count() > 0) {
97 Q_FOREACH(
const QString& partialName,
m_d->resourceNamesPartialIncluded) {
98 if (!resourceName.contains(partialName) && tagList.filter(partialName, Qt::CaseInsensitive).isEmpty()) {
104 Q_FOREACH(
const QString& partialName,
m_d->resourceNamesPartialExcluded) {
105 if (resourceName.contains(partialName) || tagList.filter(partialName, Qt::CaseInsensitive).size() > 0) {
111 if (
m_d->tagsPartialIncluded.count() > 0 ) {
112 Q_FOREACH(
const QString& partialTag,
m_d->tagsPartialIncluded) {
113 if (tagList.filter(partialTag, Qt::CaseInsensitive).isEmpty()) {
119 if (
m_d->tagsPartialExcluded.count() > 0) {
120 Q_FOREACH(
const QString& partialTag,
m_d->tagsPartialExcluded) {
121 if (tagList.filter(partialTag, Qt::CaseInsensitive).size() > 0) {
128 if (
m_d->tagExactMatchesIncluded.count() > 0) {
129 Q_FOREACH(
const QString& tagName,
m_d->tagExactMatchesIncluded) {
130 if (!tagList.contains(tagName, Qt::CaseInsensitive)) {
136 if (
m_d->tagExactMatchesExcluded.count() > 0) {
137 Q_FOREACH(
const QString excludedTag,
m_d->tagExactMatchesExcluded) {
138 if (tagList.contains(excludedTag, Qt::CaseInsensitive)) {
154 m_d->resourceExactMatchesIncluded.clear();
155 m_d->resourceExactMatchesExcluded.clear();
156 m_d->tagExactMatchesIncluded.clear();
157 m_d->tagExactMatchesExcluded.clear();
159 m_d->resourceNamesPartialIncluded.clear();
160 m_d->resourceNamesPartialExcluded.clear();
161 m_d->tagsPartialIncluded.clear();
162 m_d->tagsPartialExcluded.clear();
169 QString tempFilter(
m_d->filter);
171 QStringList tokens = tempFilter.split(
m_d->searchTokenizer, Qt::SkipEmptyParts);
173 Q_FOREACH(
const QString& token, tokens) {
174 QString workingToken(token.toLower());
181 m_d->tagExactMatchesIncluded.insert(workingToken);
184 m_d->tagExactMatchesExcluded.insert(workingToken);
189 m_d->tagsPartialIncluded.append(workingToken);
192 m_d->tagsPartialExcluded.append(workingToken);
198 m_d->resourceExactMatchesIncluded.insert(workingToken);
201 m_d->resourceExactMatchesExcluded.insert(workingToken);
207 m_d->resourceNamesPartialIncluded.append(workingToken);
210 m_d->resourceNamesPartialExcluded.append(workingToken);