Commit 7bce7dee authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port toSet() method

parent c3ecb5ad
......@@ -134,7 +134,11 @@ KCalendarCore::Period::List FreePeriodModel::splitPeriodsByDay(
// Perform some jiggery pokery to remove duplicates
QList<KCalendarCore::Period> tmpList = splitList.toList();
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
const QSet<KCalendarCore::Period> set = tmpList.toSet();
#else
const QSet<KCalendarCore::Period> set = QSet<KCalendarCore::Period>(tmpList.begin(), tmpList.end());
#endif
tmpList = QList<KCalendarCore::Period>::fromSet(set);
return KCalendarCore::Period::List::fromList(tmpList);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment