X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/848abc5922167a467bb73107ee6b72e9af3c8317..d0c71a1435bc9d:/src/kitemviews/kstandarditem.cpp diff --git a/src/kitemviews/kstandarditem.cpp b/src/kitemviews/kstandarditem.cpp index 4fb3f8f98..39121ab31 100644 --- a/src/kitemviews/kstandarditem.cpp +++ b/src/kitemviews/kstandarditem.cpp @@ -1,36 +1,21 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz * - * * - * 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 + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kstandarditem.h" #include "kstandarditemmodel.h" KStandardItem::KStandardItem(KStandardItem* parent) : - m_parent(parent), - m_children(), + QObject(parent), m_model(nullptr), m_data() { } KStandardItem::KStandardItem(const QString& text, KStandardItem* parent) : - m_parent(parent), - m_children(), + QObject(parent), m_model(nullptr), m_data() { @@ -38,8 +23,7 @@ KStandardItem::KStandardItem(const QString& text, KStandardItem* parent) : } KStandardItem::KStandardItem(const QString& icon, const QString& text, KStandardItem* parent) : - m_parent(parent), - m_children(), + QObject(parent), m_model(nullptr), m_data() { @@ -47,14 +31,6 @@ KStandardItem::KStandardItem(const QString& icon, const QString& text, KStandard 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() { } @@ -123,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& values) { const QHash previous = m_data; @@ -146,24 +111,19 @@ QHash KStandardItem::data() const return m_data; } -QList 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& current, const QHash& previous) { - Q_UNUSED(current); - Q_UNUSED(previous); + Q_UNUSED(current) + Q_UNUSED(previous) }