diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-02-25 15:15:12 +0100 |
---|---|---|
committer | Chris Adams <chris.adams@qinetic.com.au> | 2020-11-02 13:17:06 +1000 |
commit | 848d4a2b49adca12666081788a05a8fc5d9fbb56 (patch) | |
tree | 1832e9c71da16e7f2905b6565d113449d5a0851d /src/versit/qversitreader_p.cpp | |
parent | 2515b36984e3b480543b8b08cb87cb1dcb0f0127 (diff) |
Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.
De-UKified spelling of "behavior" in the process.
Change-Id: I13b4fdc82fdee779b2e4d03ce287b749dadd1b71
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Diffstat (limited to 'src/versit/qversitreader_p.cpp')
-rw-r--r-- | src/versit/qversitreader_p.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/versit/qversitreader_p.cpp b/src/versit/qversitreader_p.cpp index 5793cb37a..66203f906 100644 --- a/src/versit/qversitreader_p.cpp +++ b/src/versit/qversitreader_p.cpp @@ -1042,7 +1042,7 @@ QMultiHash<QString,QString> QVersitReaderPrivate::extractVCard30PropertyParams( QString name(paramName(param, codec)); removeBackSlashEscaping(&name); QString values = paramValue(param, codec); - QStringList valueList = splitValue(values, QLatin1Char(','), QString::SkipEmptyParts, true); + QStringList valueList = splitValue(values, QLatin1Char(','), Qt::SkipEmptyParts, true); foreach (QString value, valueList) { removeBackSlashEscaping(&value); result.insert(name, value); @@ -1189,12 +1189,12 @@ bool QVersitReaderPrivate::splitStructuredValue( QVariant variant = property->variantValue(); if (property->valueType() == QVersitProperty::CompoundType) { variant.setValue(splitValue(variant.toString(), QLatin1Char(';'), - QString::KeepEmptyParts, hasEscapedBackslashes)); + Qt::KeepEmptyParts, hasEscapedBackslashes)); property->setValue(variant); return true; } else if (property->valueType() == QVersitProperty::ListType) { variant.setValue(splitValue(variant.toString(), QLatin1Char(','), - QString::SkipEmptyParts, hasEscapedBackslashes)); + Qt::SkipEmptyParts, hasEscapedBackslashes)); property->setValue(variant); return true; } @@ -1210,7 +1210,7 @@ bool QVersitReaderPrivate::splitStructuredValue( */ QStringList QVersitReaderPrivate::splitValue(const QString& string, const QChar& sep, - QString::SplitBehavior behaviour, + Qt::SplitBehavior behavior, bool hasEscapedBackslashes) { QStringList list; @@ -1231,7 +1231,7 @@ QStringList QVersitReaderPrivate::splitValue(const QString& string, } else { // we see a separator segment += string.midRef(segmentStartIndex, i - segmentStartIndex); - if (behaviour == QString::KeepEmptyParts || !segment.isEmpty()) + if (behavior == Qt::KeepEmptyParts || !segment.isEmpty()) list.append(segment); segment.clear(); } @@ -1243,7 +1243,7 @@ QStringList QVersitReaderPrivate::splitValue(const QString& string, } // The rest of the string after the last sep. segment += string.midRef(segmentStartIndex); - if (behaviour == QString::KeepEmptyParts || !segment.isEmpty()) + if (behavior == Qt::KeepEmptyParts || !segment.isEmpty()) list.append(segment); return list; } |