summaryrefslogtreecommitdiffstats
path: root/src/xsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xsession.cpp')
-rw-r--r--src/xsession.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/xsession.cpp b/src/xsession.cpp
index 3ae4320..ff5de57 100644
--- a/src/xsession.cpp
+++ b/src/xsession.cpp
@@ -149,6 +149,13 @@ bool XSession::operator<(const Session& other) const {
return false;
}
-bool XSession::containsKeywords(const QList<QString>&) const {
- return true;
+bool XSession::containsKeywords(const QList<QString>& keywords) const {
+ for (int j = 0; j < keywords.length(); ++j) {
+ if (!this->shortDescription().contains(keywords[j], Qt::CaseInsensitive)
+ && !this->description().contains(keywords[j], Qt::CaseInsensitive)) {
+ return false;
+ }
+ }
+ return true;
}
+