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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue