summaryrefslogtreecommitdiffstats
path: root/qt-models/divelistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r--qt-models/divelistmodel.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index bc7e38a98..5a1cf1403 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -2,6 +2,7 @@
#include "qt-models/divelistmodel.h"
#include "core/qthelper.h"
#include <QDateTime>
+#include "core/settings/qPrefGeneral.h"
DiveListSortModel::DiveListSortModel(QObject *parent) : QSortFilterProxyModel(parent)
{
@@ -10,9 +11,14 @@ DiveListSortModel::DiveListSortModel(QObject *parent) : QSortFilterProxyModel(pa
void DiveListSortModel::setFilter(QString f)
{
- setFilterRole(DiveListModel::FullTextRole);
+ if (qPrefGeneral::filterFullTextNotes())
+ setFilterRole(DiveListModel::FullTextRole);
+ else
+ setFilterRole(DiveListModel::FullTextNoNotesRole);
+
setFilterRegExp(QString(".*%1.*").arg(f));
- setFilterCaseSensitivity(Qt::CaseInsensitive);
+ if (!qPrefGeneral::filterCaseSensitive())
+ setFilterCaseSensitivity(Qt::CaseInsensitive);
}
void DiveListSortModel::resetFilter()