From ffecc00f42f2e02f76cf616d03d179e8741f4fba Mon Sep 17 00:00:00 2001 From: Dirk Hohndel <dirk@hohndel.org> Date: Mon, 26 Oct 2020 07:27:47 -0700 Subject: 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> --- core/metadata.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'core/metadata.cpp') 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 ×tamp) } // 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; -- cgit v1.2.3-70-g09d2