aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorselsta <selsta@sent.at>2020-04-23 03:13:13 +0200
committerselsta <selsta@sent.at>2020-04-28 19:00:53 +0200
commit02eec351b9a2f64de0dbb7088993f0a622c5561b (patch)
treebe54246d34615ae88ab97ce9513022613d51a896 /src/model
parent585fb2810dc0d9b79255b9bd479559b36aa087d8 (diff)
downloadmonzero-gui-02eec351b9a2f64de0dbb7088993f0a622c5561b.tar.gz
monzero-gui-02eec351b9a2f64de0dbb7088993f0a622c5561b.tar.xz
monzero-gui-02eec351b9a2f64de0dbb7088993f0a622c5561b.zip
src: fix qt 5.15 warnings
Diffstat (limited to 'src/model')
-rw-r--r--src/model/TransactionHistorySortFilterModel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/model/TransactionHistorySortFilterModel.cpp b/src/model/TransactionHistorySortFilterModel.cpp
index 35f03632..fd8c095a 100644
--- a/src/model/TransactionHistorySortFilterModel.cpp
+++ b/src/model/TransactionHistorySortFilterModel.cpp
@@ -30,6 +30,7 @@
#include "TransactionHistoryModel.h"
#include <QDebug>
+#include <QtGlobal>
namespace {
/**
@@ -204,9 +205,14 @@ bool TransactionHistorySortFilterModel::filterAcceptsRow(int source_row, const Q
break;
case TransactionHistoryModel::TransactionTimeStampRole:
{
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+ QDateTime from = dateFromFilter().startOfDay();
+ QDateTime to = dateToFilter().endOfDay();
+#else
QDateTime from = QDateTime(dateFromFilter());
QDateTime to = QDateTime(dateToFilter());
to = to.addDays(1); // including upperbound
+#endif
QDateTime timestamp = data.toDateTime();
bool matchFrom = from.isNull() || timestamp.isNull() || timestamp >= from;
bool matchTo = to.isNull() || timestamp.isNull() || timestamp <= to;