summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-16 20:10:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-16 12:40:08 -0700
commit04b6bb8cc946486efa174722b75378028105250b (patch)
tree2c3f9d647c40205a7d4f2b413bc36733950cbf03 /core
parent1777df405fef2b5ebd7be0de6bdc9084df959d28 (diff)
downloadsubsurface-04b6bb8cc946486efa174722b75378028105250b.tar.gz
filter: include tags in fulltext search
The tags have been forgotten when implementing the fulltext search. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/fulltext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fulltext.cpp b/core/fulltext.cpp
index 8bd41e7ff..2e27d8524 100644
--- a/core/fulltext.cpp
+++ b/core/fulltext.cpp
@@ -3,6 +3,7 @@
#include "fulltext.h"
#include "dive.h"
#include "divesite.h"
+#include "tag.h"
#include "trip.h"
#include "qthelper.h"
#include <QLocale>
@@ -123,6 +124,8 @@ static std::vector<QString> getWords(const dive *d)
tokenize(QString(d->divemaster), res);
tokenize(QString(d->buddy), res);
tokenize(QString(d->suit), res);
+ for (const tag_entry *tag = d->tag_list; tag; tag = tag->next)
+ tokenize(QString(tag->tag->name), res);
for (int i = 0; i < d->cylinders.nr; ++i) {
const cylinder_t &cyl = d->cylinders.cylinders[i];
tokenize(QString(cyl.type.description), res);