]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kstandarditemmodel.cpp
Merge branch 'release/21.12'
[dolphin.git] / src / kitemviews / kstandarditemmodel.cpp
index c40050c7e6e9505a4f155b13c7be76efc899536a..128841ca8496f25a56dec4897aeb76955a900875 100644 (file)
@@ -1,21 +1,8 @@
-/***************************************************************************
- *   Copyright (C) 2012 by Peter Penz <peter.penz19@gmail.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: 2012 Peter Penz <peter.penz19@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #include "kstandarditemmodel.h"
 
@@ -56,7 +43,7 @@ void KStandardItemModel::insertItem(int index, KStandardItem* item)
         // TODO: no hierarchical items are handled yet
 
         onItemInserted(index);
-        emit itemsInserted(KItemRangeList() << KItemRange(index, 1));
+        Q_EMIT itemsInserted(KItemRangeList() << KItemRange(index, 1));
     }
 }
 
@@ -94,7 +81,7 @@ void KStandardItemModel::changeItem(int index, KStandardItem* item)
     m_indexesForItems.insert(item, index);
 
     onItemChanged(index, changedRoles);
-    emit itemsChanged(KItemRangeList() << KItemRange(index, 1), changedRoles);
+    Q_EMIT itemsChanged(KItemRangeList() << KItemRange(index, 1), changedRoles);
 }
 
 void KStandardItemModel::removeItem(int index)
@@ -115,7 +102,7 @@ void KStandardItemModel::removeItem(int index)
         item->deleteLater();
         item = nullptr;
 
-        emit itemsRemoved(KItemRangeList() << KItemRange(index, 1));
+        Q_EMIT itemsRemoved(KItemRangeList() << KItemRange(index, 1));
 
         // TODO: no hierarchical items are handled yet
     }
@@ -127,7 +114,7 @@ void KStandardItemModel::clear()
     m_items.clear();
     m_indexesForItems.clear();
 
-    emit itemsRemoved(KItemRangeList() << KItemRange(0, size));
+    Q_EMIT itemsRemoved(KItemRangeList() << KItemRange(0, size));
 }
 
 KStandardItem* KStandardItemModel::item(int index) const