]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kstandarditem.cpp
Output of licensedigger + manual cleanup afterwards.
[dolphin.git] / src / kitemviews / kstandarditem.cpp
index 6cb5b049b45b4095bc6e28e9e7469abceaaa2830..39121ab3169a048b883dac789e30b85c7f13b67c 100644 (file)
@@ -1,62 +1,36 @@
-/***************************************************************************
- *   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 "kstandarditem.h"
-
-#include <KDebug>
 #include "kstandarditemmodel.h"
 
 KStandardItem::KStandardItem(KStandardItem* parent) :
-    m_parent(parent),
-    m_children(),
-    m_model(0),
+    QObject(parent),
+    m_model(nullptr),
     m_data()
 {
 }
 
 KStandardItem::KStandardItem(const QString& text, KStandardItem* parent) :
-    m_parent(parent),
-    m_children(),
-    m_model(0),
+    QObject(parent),
+    m_model(nullptr),
     m_data()
 {
     setText(text);
 }
 
 KStandardItem::KStandardItem(const QString& icon, const QString& text, KStandardItem* parent) :
-    m_parent(parent),
-    m_children(),
-    m_model(0),
+    QObject(parent),
+    m_model(nullptr),
     m_data()
 {
     setIcon(icon);
     setText(text);
 }
 
-KStandardItem::KStandardItem(const KStandardItem& item) :
-    m_parent(item.m_parent),
-    m_children(item.m_children),
-    m_model(item.m_model),
-    m_data(item.m_data)
-{
-}
-
 KStandardItem::~KStandardItem()
 {
 }
@@ -125,17 +99,6 @@ QVariant KStandardItem::dataValue(const QByteArray& role) const
     return m_data[role];
 }
 
-void KStandardItem::setParent(KStandardItem* parent)
-{
-    // TODO: not implemented yet
-    m_parent = parent;
-}
-
-KStandardItem* KStandardItem::parent() const
-{
-    return m_parent;
-}
-
 void KStandardItem::setData(const QHash<QByteArray, QVariant>& values)
 {
     const QHash<QByteArray, QVariant> previous = m_data;
@@ -148,24 +111,19 @@ QHash<QByteArray, QVariant> KStandardItem::data() const
     return m_data;
 }
 
-QList<KStandardItem*> KStandardItem::children() const
-{
-    return m_children;
-}
-
 void KStandardItem::onDataValueChanged(const QByteArray& role,
                                        const QVariant& current,
                                        const QVariant& previous)
 {
-    Q_UNUSED(role);
-    Q_UNUSED(current);
-    Q_UNUSED(previous);
+    Q_UNUSED(role)
+    Q_UNUSED(current)
+    Q_UNUSED(previous)
 }
 
 void KStandardItem::onDataChanged(const QHash<QByteArray, QVariant>& current,
                                   const QHash<QByteArray, QVariant>& previous)
 {
-    Q_UNUSED(current);
-    Q_UNUSED(previous);
+    Q_UNUSED(current)
+    Q_UNUSED(previous)
 }