diff options
Diffstat (limited to 'src/vsession.cpp')
-rw-r--r-- | src/vsession.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp index 45587f1..79d3956 100644 --- a/src/vsession.cpp +++ b/src/vsession.cpp @@ -134,17 +134,18 @@ void VSession::readKeywords() { bool VSession::containsKeywords(const QList<QString>& keywords) const { for (int j = 0; j < keywords.length(); ++j) { - bool keywordFlag = true; if (!this->shortDescription().contains(keywords[j], Qt::CaseInsensitive) && !this->description().contains(keywords[j], Qt::CaseInsensitive) && !this->getAttribute("creator", "param").contains(keywords[j], Qt::CaseInsensitive)) { - keywordFlag = false; + bool match = false; for (int i = 0; i < this->keywords().length(); ++i) { if (this->keywords()[i].contains(keywords[j], Qt::CaseInsensitive)) { - keywordFlag = true; + match = true; + break; } } - if (!keywordFlag) return false; + if (!match) + return false; } } return true; |