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 /qt-models | |
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 'qt-models')
-rw-r--r-- | qt-models/completionmodels.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qt-models/completionmodels.cpp b/qt-models/completionmodels.cpp index 0ffc8075e..701848384 100644 --- a/qt-models/completionmodels.cpp +++ b/qt-models/completionmodels.cpp @@ -22,6 +22,12 @@ setStringList(list); \ } +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) +#define SKIP_EMPTY Qt::SkipEmptyParts +#else +#define SKIP_EMPTY QString::SkipEmptyParts +#endif + #define CREATE_CSV_UPDATE_METHOD(Class, diveStructMember) \ void Class::updateModel() \ { \ @@ -31,7 +37,7 @@ for_each_dive (i, dive) \ { \ QString buddy(dive->diveStructMember); \ - foreach (const QString &value, buddy.split(",", QString::SkipEmptyParts)) \ + foreach (const QString &value, buddy.split(",", SKIP_EMPTY)) \ { \ set.insert(value.trimmed()); \ } \ |