]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/kfileitemmodelbenchmark.cpp
Merge branch 'release/20.12'
[dolphin.git] / src / tests / kfileitemmodelbenchmark.cpp
index 8dfb4f622f8a0a52b1a52caaf650f98d661ff24a..37874cea8a205019b5d6c0918820d8c8097258c6 100644 (file)
@@ -1,22 +1,9 @@
-/***************************************************************************
- *   Copyright (C) 2011 by Peter Penz <peter.penz19@gmail.com>             *
- *   Copyright (C) 2013 by Frank Reininghaus <frank78ac@googlemail.com>    *
- *                                                                         *
- *   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: 2011 Peter Penz <peter.penz19@gmail.com>
+ * SPDX-FileCopyrightText: 2013 Frank Reininghaus <frank78ac@googlemail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #include <QTest>
 #include <QSignalSpy>
@@ -80,7 +67,7 @@ void KFileItemModelBenchmark::insertAndRemoveManyItems_data()
     QList<int> sizes;
     sizes << 100000;
 
-    foreach (int n, sizes) {
+    for (int n : qAsConst(sizes)) {
         QStringList allStrings;
         for (int i = 0; i < n; ++i) {
             allStrings << QString::number(i);
@@ -210,7 +197,7 @@ KFileItemList KFileItemModelBenchmark::createFileItemList(const QStringList& fil
     qInstallMessageHandler(myMessageOutput);
 
     KFileItemList result;
-    foreach (const QString& name, fileNames) {
+    for (const QString& name : fileNames) {
         const KFileItem item(QUrl::fromLocalFile(prefix + name), QString(), KFileItem::Unknown);
         result << item;
     }