diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-18 16:25:01 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-01 10:21:44 -0800 |
commit | 5bbc0fdb586547fa1db887e82ff6556febbabc43 (patch) | |
tree | 845552cd10fc9448d1d2f7364c00f3465bb177dd /core | |
parent | 2c038a24b0931670f94c991a239223fc57ff85f4 (diff) | |
download | subsurface-5bbc0fdb586547fa1db887e82ff6556febbabc43.tar.gz |
filter: compile fulltext index on mobile
The code is not used yet.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r-- | core/dive.c | 6 | ||||
-rw-r--r-- | core/dive.h | 2 | ||||
-rw-r--r-- | core/divefilter.cpp | 4 | ||||
-rw-r--r-- | core/divelist.c | 4 | ||||
-rw-r--r-- | core/fulltext.cpp | 4 | ||||
-rw-r--r-- | core/fulltext.h | 4 |
6 files changed, 4 insertions, 20 deletions
diff --git a/core/dive.c b/core/dive.c index e1bf92e0a..ca4b0b705 100644 --- a/core/dive.c +++ b/core/dive.c @@ -17,9 +17,7 @@ #include "tag.h" #include "trip.h" #include "structured_list.h" -#ifndef SUBSURFACE_MOBILE #include "fulltext.h" -#endif /* one could argue about the best place to have this variable - @@ -360,9 +358,7 @@ static void free_dive_structures(struct dive *d) { if (!d) return; -#ifndef SUBSURFACE_MOBILE fulltext_unregister(d); -#endif /* free the strings */ free(d->buddy); free(d->divemaster); @@ -408,9 +404,7 @@ static void copy_dive_nodc(const struct dive *s, struct dive *d) *d = *s; memset(&d->cylinders, 0, sizeof(d->cylinders)); memset(&d->weightsystems, 0, sizeof(d->weightsystems)); -#ifndef SUBSURFACE_MOBILE d->full_text = NULL; -#endif invalidate_dive_cache(d); d->buddy = copy_string(s->buddy); d->divemaster = copy_string(s->divemaster); diff --git a/core/dive.h b/core/dive.h index a57021976..e64164e75 100644 --- a/core/dive.h +++ b/core/dive.h @@ -171,9 +171,7 @@ struct dive { bool notrip; /* Don't autogroup this dive to a trip */ bool selected; bool hidden_by_filter; -#if !defined(SUBSURFACE_MOBILE) struct full_text_cache *full_text; /* word cache for full text search */ -#endif #if defined(SUBSURFACE_MOBILE) uint8_t collapsed; /* four values: 0 = don't show, 1 = show as dive, 2 = show corresponding trip, 3 = show dive and trip */ #endif diff --git a/core/divefilter.cpp b/core/divefilter.cpp index 2953d2e65..a867dc58f 100644 --- a/core/divefilter.cpp +++ b/core/divefilter.cpp @@ -10,10 +10,14 @@ DiveFilter::DiveFilter() ShownChange DiveFilter::update(const QVector<dive *> &) const { + ShownChange res; + return res; } ShownChange DiveFilter::updateAll() const { + ShownChange res; + return res; } #else // SUBSURFACE_MOBILE diff --git a/core/divelist.c b/core/divelist.c index 5a60594d7..df28bba69 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -831,9 +831,7 @@ void process_loaded_dives() /* Autogroup dives if desired by user. */ autogroup_dives(&dive_table, &trip_table); -#ifndef SUBSURFACE_MOBILE fulltext_reload(); -#endif } /* @@ -1343,9 +1341,7 @@ int get_dive_id_closest_to(timestamp_t when) void clear_dive_file_data() { -#ifndef SUBSURFACE_MOBILE fulltext_unregister_all(); -#endif while (dive_table.nr) delete_single_dive(0); diff --git a/core/fulltext.cpp b/core/fulltext.cpp index 5ed0c9a17..2d7af752c 100644 --- a/core/fulltext.cpp +++ b/core/fulltext.cpp @@ -7,8 +7,6 @@ #include <QLocale> #include <map> -#ifndef SUBSURFACE_MOBILE - // This class caches each dives words, so that we can unregister a dive from the full text search struct full_text_cache { std::vector<QString> words; @@ -287,5 +285,3 @@ bool FullTextResult::dive_matches(const struct dive *d) const { return std::find(dives.begin(), dives.end(), d) != dives.end(); } - -#endif diff --git a/core/fulltext.h b/core/fulltext.h index c22a118b8..fe6aa333b 100644 --- a/core/fulltext.h +++ b/core/fulltext.h @@ -13,9 +13,6 @@ #ifndef FULLTEXT_H #define FULLTEXT_H -// For now only compile on desktop -#ifndef SUBSURFACE_MOBILE - // 1) The C-accessible interface #ifdef __cplusplus @@ -65,5 +62,4 @@ FullTextResult fulltext_find_dives(const FullTextQuery &q, StringFilterMode); bool fulltext_dive_matches(const struct dive *d, const FullTextQuery &q, StringFilterMode); #endif -#endif // SUBSURFACE_MOBILE #endif |