summaryrefslogtreecommitdiffstats
path: root/core/metadata.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 07:27:47 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 19:27:03 -0700
commitffecc00f42f2e02f76cf616d03d179e8741f4fba (patch)
tree43cca48ab6f8f64bcf0e6ecfce7164f1ffa32229 /core/metadata.cpp
parentf8f83a9986917de1f879abd474330812c4a1e51a (diff)
downloadsubsurface-ffecc00f42f2e02f76cf616d03d179e8741f4fba.tar.gz
cleanup: SkipEmptyParts syntax has changed
Sadly, the new enum has only been available since Qt 5.14, so this is a rather ugly replacement. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/metadata.cpp')
-rw-r--r--core/metadata.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/metadata.cpp b/core/metadata.cpp
index 81371ba3f..bca750b73 100644
--- a/core/metadata.cpp
+++ b/core/metadata.cpp
@@ -12,6 +12,12 @@
#define UINT64_MAX (~0ULL)
#endif
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+#define SKIP_EMPTY Qt::SkipEmptyParts
+#else
+#define SKIP_EMPTY QString::SkipEmptyParts
+#endif
+
// The following functions fetch an arbitrary-length _unsigned_ integer from either
// a file or a memory location in big-endian or little-endian mode. The size of the
// integer is passed via a template argument [e.g. getBE<uint16_t>(...)].
@@ -287,7 +293,7 @@ static bool parseDate(const QString &s_in, timestamp_t &timestamp)
}
// I've also seen "Weekday Mon Day hh:mm:ss yyyy"(!)
- QStringList items = s.split(' ', QString::SkipEmptyParts);
+ QStringList items = s.split(' ', SKIP_EMPTY);
if (items.size() < 4)
return false;