Commit d43aa2b5 authored by Volker Krause's avatar Volker Krause
Browse files

Build with latest Qt 5.14, QSet::fromList is deprecated there

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D27745
parent a4ccf77a
......@@ -57,7 +57,12 @@ PimCalendarsModel::PimCalendarsModel(QObject *parent)
auto config = KSharedConfig::openConfig();
auto group = config->group("PIMEventsPlugin");
mEnabledCalendars = QSet<qint64>::fromList(group.readEntry(QStringLiteral("calendars"), QList<qint64>()));
const auto enabledCalendarIds = group.readEntry(QStringLiteral("calendars"), QList<qint64>());
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
mEnabledCalendars = QSet<qint64>::fromList(enabledCalendarIds);
#else
mEnabledCalendars = QSet<qint64>(enabledCalendarIds.begin(), enabledCalendarIds.end());
#endif
}
PimCalendarsModel::~PimCalendarsModel()
......
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