Commit 8eb4cb4e authored by Laurent Montel's avatar Laurent Montel 😁

Port to for(...:...)

parent 74e0f088
......@@ -1415,7 +1415,7 @@ void ActionManager::keyBindings()
dlg.addCollection(mMainWindow->getActionCollection());
}
foreach (KOrg::Part *part, mParts) {
for (KOrg::Part *part : qAsConst(mParts)) {
if (part) {
dlg.addCollection(part->actionCollection(), part->shortInfo());
}
......
......@@ -632,7 +632,7 @@ AkonadiCollectionView::AkonadiCollectionView(CalendarView *view, bool hasContext
<< Akonadi::StandardActionManager::CopyCollectionToMenu
<< Akonadi::StandardActionManager::MoveCollectionToMenu;
Q_FOREACH (Akonadi::StandardActionManager::Type standardAction, standardActions) {
for (Akonadi::StandardActionManager::Type standardAction : qAsConst(standardActions)) {
mActionManager->createAction(standardAction);
}
......@@ -643,7 +643,7 @@ AkonadiCollectionView::AkonadiCollectionView(CalendarView *view, bool hasContext
<< Akonadi::StandardCalendarActionManager::CreateJournal
<< Akonadi::StandardCalendarActionManager::EditIncidence;
Q_FOREACH (Akonadi::StandardCalendarActionManager::Type calendarAction, calendarActions) {
for (Akonadi::StandardCalendarActionManager::Type calendarAction : qAsConst(calendarActions)) {
mActionManager->createAction(calendarAction);
}
......
......@@ -515,7 +515,7 @@ void CalendarView::writeFilterSettings(KConfig *config)
}
filterList.reserve(mFilters.count());
foreach (KCalCore::CalFilter *filter, mFilters) {
for (KCalCore::CalFilter *filter : qAsConst(mFilters)) {
filterList << filter->name();
KConfigGroup filterConfig(config, QStringLiteral("Filter_") + filter->name());
filterConfig.writeEntry("Criteria", filter->criteria());
......@@ -2006,7 +2006,7 @@ void CalendarView::updateFilter()
}
filters << i18n("No filter");
foreach (KCalCore::CalFilter *filter, mFilters) {
for (KCalCore::CalFilter *filter : qAsConst(mFilters)) {
if (filter) {
filters << filter->name();
}
......
......@@ -317,12 +317,12 @@ void KODayMatrix::updateTodos()
!(recurType == KCalCore::Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) {
// It's a recurring todo, find out in which days it occurs
KCalCore::DateTimeList timeDateList =
const KCalCore::DateTimeList timeDateList =
t->recurrence()->timesInInterval(
KDateTime(mDays[0], mCalendar->timeSpec()),
KDateTime(mDays[NUMDAYS - 1], mCalendar->timeSpec()));
foreach (const KDateTime &dt, timeDateList) {
for (const KDateTime &dt : timeDateList) {
d = dt.toTimeSpec(mCalendar->timeSpec()).date();
if (!mEvents.contains(d)) {
mEvents.append(d);
......
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