]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemset.h
Merge branch 'release/20.12'
[dolphin.git] / src / kitemviews / kitemset.h
index 31fe1d24950b8813dbe531aa2c3d5d8d4c012dee..2d0137e0f0d733e1129fec17ab27f8b43d6fe545 100644 (file)
@@ -1,26 +1,15 @@
-/***************************************************************************
- *   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
+ */
+
 
 #ifndef KITEMSET_H
 #define KITEMSET_H
 
-#include <kitemviews/kitemrange.h>
+#include "dolphin_export.h"
+#include "kitemviews/kitemrange.h"
 
 /**
  * @brief Stores a set of integer numbers in a space-efficient way.
@@ -40,7 +29,7 @@
  * The complexity of most operations depends on the number of ranges.
  */
 
-class KItemSet
+class DOLPHIN_EXPORT KItemSet
 {
 public:
     KItemSet();
@@ -161,7 +150,7 @@ public:
         {
         }
 
-        const_iterator(const iterator& other) :
+        explicit const_iterator(const iterator& other) :
             m_rangeIt(other.m_rangeIt),
             m_offset(other.m_offset)
         {
@@ -314,7 +303,7 @@ inline KItemSet& KItemSet::operator=(const KItemSet& other)
 inline int KItemSet::count() const
 {
     int result = 0;
-    foreach (const KItemRange& range, m_itemRanges) {
+    for (const KItemRange& range : qAsConst(m_itemRanges)) {
         result += range.count;
     }
     return result;