summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/dive.c6
-rw-r--r--core/dive.h2
-rw-r--r--core/divefilter.cpp4
-rw-r--r--core/divelist.c4
-rw-r--r--core/fulltext.cpp4
-rw-r--r--core/fulltext.h4
-rw-r--r--packaging/ios/Subsurface-mobile.pro4
7 files changed, 8 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
diff --git a/packaging/ios/Subsurface-mobile.pro b/packaging/ios/Subsurface-mobile.pro
index 6264d905e..7c6277c85 100644
--- a/packaging/ios/Subsurface-mobile.pro
+++ b/packaging/ios/Subsurface-mobile.pro
@@ -41,11 +41,13 @@ SOURCES += ../../subsurface-mobile-main.cpp \
../../core/subsurfacesysinfo.cpp \
../../core/windowtitleupdate.cpp \
../../core/file.c \
+ ../../core/fulltext.cpp \
../../core/subsurfacestartup.c \
../../core/ios.cpp \
../../core/profile.c \
../../core/device.c \
../../core/dive.c \
+ ../../core/divefilter.cpp \
../../core/divelist.c \
../../core/gas-model.c \
../../core/gaspressures.c \
@@ -195,11 +197,13 @@ HEADERS += \
../../core/deco.h \
../../core/display.h \
../../core/divecomputer.h \
+ ../../core/divefilter.h \
../../core/divelist.h \
../../core/divelogexportlogic.h \
../../core/divesitehelpers.h \
../../core/exif.h \
../../core/file.h \
+ ../../core/fulltext.h \
../../core/gaspressures.h \
../../core/gettext.h \
../../core/gettextfromc.h \