1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Mobile/filtering: add fullTextNoNotes to the dive object helper

This way we can filter with and without the notes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-10-19 21:15:56 -04:00
parent c0540d7682
commit 40536286d2
2 changed files with 8 additions and 1 deletions

View file

@ -438,5 +438,10 @@ QStringList DiveObjectHelper::firstGas() const
// for a full text search / filter function
QString DiveObjectHelper::fullText() const
{
return trip() + ":-:" + location() + ":-:" + buddy() + ":-:" + divemaster() + ":-:" + suit() + ":-:" + tags() + ":-:" + notes();
return fullTextNoNotes() + ":-:" + notes();
}
QString DiveObjectHelper::fullTextNoNotes() const
{
return trip() + ":-:" + location() + ":-:" + buddy() + ":-:" + divemaster() + ":-:" + suit() + ":-:" + tags();
}

View file

@ -50,6 +50,7 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(QStringList endPressure READ endPressure CONSTANT)
Q_PROPERTY(QStringList firstGas READ firstGas CONSTANT)
Q_PROPERTY(QString fullText READ fullText CONSTANT)
Q_PROPERTY(QString fullTextNoNotes READ fullTextNoNotes CONSTANT)
public:
DiveObjectHelper(struct dive *dive = NULL);
~DiveObjectHelper();
@ -95,6 +96,7 @@ public:
QStringList endPressure() const;
QStringList firstGas() const;
QString fullText() const;
QString fullTextNoNotes() const;
private:
struct dive *m_dive;