Commit f939caa9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to for(..:..)

parent 3a327d1e
......@@ -206,7 +206,7 @@ void IncidenceAttendee::load(const KCalCore::Incidence::Ptr &incidence)
KCalCore::Attendee::List attendees;
const KCalCore::Attendee::List incidenceAttendees = incidence->attendees();
attendees.reserve(incidenceAttendees.count());
foreach (const KCalCore::Attendee::Ptr &a, incidenceAttendees) {
for (const KCalCore::Attendee::Ptr &a : incidenceAttendees) {
attendees << KCalCore::Attendee::Ptr(new KCalCore::Attendee(*a));
}
......
......@@ -402,7 +402,7 @@ void IncidenceDialogPrivate::storeTemplatesInConfig(const QStringList &templateN
QStringLiteral("korganizer/templates/") +
typeToString(mEditor->type()) + QLatin1Char('/');
QDir::root().mkpath(defaultPath);
Q_FOREACH (const QString &tmpl, origTemplates) {
for (const QString &tmpl : origTemplates) {
if (!templateNames.contains(tmpl)) {
const QString fileName = defaultPath + tmpl;
QFile file(fileName);
......
......@@ -616,8 +616,8 @@ void IncidenceRecurrence::handleRecurrenceTypeChange(int currentIndex)
void IncidenceRecurrence::removeExceptions()
{
QList<QListWidgetItem *> selectedExceptions = mUi->mExceptionList->selectedItems();
foreach (QListWidgetItem *selectedException, selectedExceptions) {
const QList<QListWidgetItem *> selectedExceptions = mUi->mExceptionList->selectedItems();
for (QListWidgetItem *selectedException : selectedExceptions) {
const int row = mUi->mExceptionList->row(selectedException);
mExceptionDates.removeAt(row);
delete mUi->mExceptionList->takeItem(row);
......
......@@ -228,7 +228,7 @@ void ResourceManagement::showDetails(const KLDAP::LdapObject &obj, const KLDAP::
QStringList list;
const QList<QByteArray> values = it.value();
list.reserve(values.count());
foreach (const QByteArray &value, values) {
for (const QByteArray &value: values) {
list << QString::fromUtf8(value);
}
mUi->formDetails->addRow(translateLDAPAttributeForDisplay(key), new QLabel(list.join(QLatin1Char('\n'))));
......
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