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

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

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