diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-10-26 07:27:47 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-26 19:27:03 -0700 |
commit | ffecc00f42f2e02f76cf616d03d179e8741f4fba (patch) | |
tree | 43cca48ab6f8f64bcf0e6ecfce7164f1ffa32229 /core/qthelper.cpp | |
parent | f8f83a9986917de1f879abd474330812c4a1e51a (diff) | |
download | subsurface-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/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index d3e225639..1dacbab38 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -1260,9 +1260,15 @@ QString get_taglist_string(struct tag_entry *tag_list) return ret; } +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) +#define SKIP_EMPTY Qt::SkipEmptyParts +#else +#define SKIP_EMPTY QString::SkipEmptyParts +#endif + QStringList stringToList(const QString &s) { - QStringList res = s.split(",", QString::SkipEmptyParts); + QStringList res = s.split(",", SKIP_EMPTY); for (QString &str: res) str = str.trimmed(); return res; |