Skip to content

Commit

Permalink
Merge pull request edbee#113 from SlySven/Revise_fixQStringSplitForOl…
Browse files Browse the repository at this point in the history
…derQtVersions

Revise: fix QString::split(...) for older Qt Versions
  • Loading branch information
gamecreature authored Oct 27, 2020
2 parents d01c05f + 56343e5 commit 5dbc329
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions edbee-test/edbee/models/textrangetest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ do { \
/// @param definition the definition. In the format anchor>caret,anchor>caret
static void addRanges( TextRangeSet* sel, const QString& definition )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QStringList ranges = definition.split(",", Qt::SkipEmptyParts);
#else
QStringList ranges = definition.split(",", QString::SkipEmptyParts);
#endif
foreach( QString range, ranges ) {
QStringList values = range.split(">");
Q_ASSERT(values.length() == 2);
Expand Down

0 comments on commit 5dbc329

Please sign in to comment.