mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
f8f83a9986
commit
ffecc00f42
6 changed files with 44 additions and 8 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue