X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/10d6556373fdbfa7b28d278657dbce47c21073aa..a24327cd50ef17b953ecb908d260b73460158107:/src/settings/viewpropertiesdialog.cpp diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index c3078d5df..41893ce25 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * Copyright (C) 2018 by Elvis Angelaccio * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2006 Peter Penz + * SPDX-FileCopyrightText: 2018 Elvis Angelaccio + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "viewpropertiesdialog.h" @@ -91,7 +78,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : m_sorting = new QComboBox(); const QList rolesInfo = KFileItemModel::rolesInformation(); - foreach (const KFileItemModel::RoleInfo& info, rolesInfo) { + for (const KFileItemModel::RoleInfo& info : rolesInfo) { m_sorting->addItem(info.translation, info.role); } @@ -129,7 +116,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : connect(m_listWidget, &QListWidget::itemChanged, this, &ViewPropertiesDialog::slotItemChanged); m_listWidget->setSelectionMode(QAbstractItemView::NoSelection); const QList rolesInfo = KFileItemModel::rolesInformation(); - foreach (const KFileItemModel::RoleInfo& info, rolesInfo) { + for (const KFileItemModel::RoleInfo& info : rolesInfo) { QListWidgetItem* item = new QListWidgetItem(info.translation, m_listWidget); item->setCheckState(visibleRoles.contains(info.role) ? Qt::Checked : Qt::Unchecked); @@ -338,7 +325,7 @@ void ViewPropertiesDialog::applyViewProperties() QList visibleRoles; int index = 0; const QList rolesInfo = KFileItemModel::rolesInformation(); - foreach (const KFileItemModel::RoleInfo& info, rolesInfo) { + for (const KFileItemModel::RoleInfo& info : rolesInfo) { const QListWidgetItem* item = m_listWidget->item(index); if (item->checkState() == Qt::Checked) { visibleRoles.append(info.role);