Fix a type mismatch
This commit is contained in:
parent
ee36b1f451
commit
93987b3703
1 changed files with 8 additions and 0 deletions
|
|
@ -2051,7 +2051,11 @@ QString TagWithRemoved(const QString &tag, const QString &removed) {
|
||||||
if (tag == removed) {
|
if (tag == removed) {
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
auto list = QStringView(tag).split('|');
|
auto list = QStringView(tag).split('|');
|
||||||
|
#else // Qt >= 6.0.0
|
||||||
|
auto list = QStringView(tag).split('|').toVector();
|
||||||
|
#endif // Qt < 6.0.0
|
||||||
list.erase(ranges::remove(list, QStringView(removed)), list.end());
|
list.erase(ranges::remove(list, QStringView(removed)), list.end());
|
||||||
return JoinTag(list);
|
return JoinTag(list);
|
||||||
}
|
}
|
||||||
|
|
@ -2060,7 +2064,11 @@ QString TagWithAdded(const QString &tag, const QString &added) {
|
||||||
if (tag.isEmpty() || tag == added) {
|
if (tag.isEmpty() || tag == added) {
|
||||||
return added;
|
return added;
|
||||||
}
|
}
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
auto list = QStringView(tag).split('|');
|
auto list = QStringView(tag).split('|');
|
||||||
|
#else // Qt >= 6.0.0
|
||||||
|
auto list = QStringView(tag).split('|').toVector();
|
||||||
|
#endif // Qt < 6.0.0
|
||||||
const auto ref = QStringView(added);
|
const auto ref = QStringView(added);
|
||||||
if (list.contains(ref)) {
|
if (list.contains(ref)) {
|
||||||
return tag;
|
return tag;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue