86 QString resourceName = _resourceName.toLower();
88 if (
m_d->resourceExactMatchesIncluded.count() > 0
89 && !
m_d->resourceExactMatchesIncluded.contains(resourceName)) {
92 if (
m_d->resourceExactMatchesExcluded.contains(resourceName)) {
97 if (
m_d->resourceNamesPartialIncluded.count() > 0) {
98 Q_FOREACH(
const QString& partialName,
m_d->resourceNamesPartialIncluded) {
99 if (!resourceName.contains(partialName) && tagList.filter(partialName, Qt::CaseInsensitive).isEmpty()) {
105 Q_FOREACH(
const QString& partialName,
m_d->resourceNamesPartialExcluded) {
106 if (resourceName.contains(partialName) || tagList.filter(partialName, Qt::CaseInsensitive).size() > 0) {
112 if (
m_d->tagsPartialIncluded.count() > 0 ) {
113 Q_FOREACH(
const QString& partialTag,
m_d->tagsPartialIncluded) {
114 if (tagList.filter(partialTag, Qt::CaseInsensitive).isEmpty()) {
120 if (
m_d->tagsPartialExcluded.count() > 0) {
121 Q_FOREACH(
const QString& partialTag,
m_d->tagsPartialExcluded) {
122 if (tagList.filter(partialTag, Qt::CaseInsensitive).size() > 0) {
129 if (
m_d->tagExactMatchesIncluded.count() > 0) {
130 Q_FOREACH(
const QString& tagName,
m_d->tagExactMatchesIncluded) {
131 if (!tagList.contains(tagName, Qt::CaseInsensitive)) {
137 if (
m_d->tagExactMatchesExcluded.count() > 0) {
138 Q_FOREACH(
const QString excludedTag,
m_d->tagExactMatchesExcluded) {
139 if (tagList.contains(excludedTag, Qt::CaseInsensitive)) {
155 m_d->resourceExactMatchesIncluded.clear();
156 m_d->resourceExactMatchesExcluded.clear();
157 m_d->tagExactMatchesIncluded.clear();
158 m_d->tagExactMatchesExcluded.clear();
160 m_d->resourceNamesPartialIncluded.clear();
161 m_d->resourceNamesPartialExcluded.clear();
162 m_d->tagsPartialIncluded.clear();
163 m_d->tagsPartialExcluded.clear();
170 QString tempFilter(
m_d->filter);
172 QStringList tokens = tempFilter.split(
m_d->searchTokenizer, Qt::SkipEmptyParts);
174 Q_FOREACH(
const QString& token, tokens) {
175 QString workingToken(token.toLower());
182 m_d->tagExactMatchesIncluded.insert(workingToken);
185 m_d->tagExactMatchesExcluded.insert(workingToken);
190 m_d->tagsPartialIncluded.append(workingToken);
193 m_d->tagsPartialExcluded.append(workingToken);
199 m_d->resourceExactMatchesIncluded.insert(workingToken);
202 m_d->resourceExactMatchesExcluded.insert(workingToken);
208 m_d->resourceNamesPartialIncluded.append(workingToken);
211 m_d->resourceNamesPartialExcluded.append(workingToken);