]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/kitemsettest.cpp
DolphinTabWidget: prefer QUrl::toDisplayString() for tooltips
[dolphin.git] / src / tests / kitemsettest.cpp
index f559475a60218a415b1060622d7d268eef52367c..880d9d966930fd0b0d72c50cca3decb5fadfc1e5 100644 (file)
@@ -1,28 +1,14 @@
-/***************************************************************************
- *   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: 2013 Frank Reininghaus <frank78ac@googlemail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #include "kitemviews/kitemset.h"
 
 #include <QTest>
-#include <QVector>
 
-Q_DECLARE_METATYPE(KItemRangeList);
+Q_DECLARE_METATYPE(KItemRangeList)
 
 /**
  * Converts a KItemRangeList to a KItemSet.
@@ -204,7 +190,7 @@ void KItemSetTest::testIterators()
     QVERIFY(itemSet.isValid());
     QVERIFY(itemSet.count() == itemsQVector.count());
 
-    if (itemSet.count() == 0) {
+    if (itemSet.isEmpty()) {
         QVERIFY(itemSet.isEmpty());
         QVERIFY(itemSet.begin() == itemSet.end());
         QVERIFY(itemSet.constBegin() == itemSet.constEnd());
@@ -327,7 +313,7 @@ void KItemSetTest::testFind_data()
 
 /**
  * Test all functions that find items:
- * contais(int), find(int), constFind(int)
+ * contains(int), find(int), constFind(int)
  */
 void KItemSetTest::testFind()
 {
@@ -343,7 +329,7 @@ void KItemSetTest::testFind()
     int min;
     int max;
 
-    if (itemSet.count() == 0) {
+    if (itemSet.isEmpty()) {
         // Use some arbitrary values for the upcoming tests.
         min = 0;
         max = 5;
@@ -402,7 +388,7 @@ void KItemSetTest::testChangingOneItem()
     int min;
     int max;
 
-    if (itemSet.count() == 0) {
+    if (itemSet.isEmpty()) {
         // Use some arbitrary values for the upcoming tests.
         min = 0;
         max = 5;
@@ -499,7 +485,7 @@ void KItemSetTest::testChangingOneItem()
             QCOMPARE(tmp.end(), tmp.find(i));
             QCOMPARE(tmp.constEnd(), tmp.constFind(i));
 
-            // Check the returen value, now contained in 'it'.
+            // Check the returned value, now contained in 'it'.
             if (i == max) {
                 QCOMPARE(it, tmp.end());
             } else {