X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/848abc5922167a467bb73107ee6b72e9af3c8317..d0c71a1435bc9d:/src/kitemviews/kstandarditemmodel.cpp diff --git a/src/kitemviews/kstandarditemmodel.cpp b/src/kitemviews/kstandarditemmodel.cpp index a4d42b571..ceadff257 100644 --- a/src/kitemviews/kstandarditemmodel.cpp +++ b/src/kitemviews/kstandarditemmodel.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * 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 "kstandarditemmodel.h" @@ -112,7 +99,7 @@ void KStandardItemModel::removeItem(int index) onItemRemoved(index, item); - delete item; + item->deleteLater(); item = nullptr; emit itemsRemoved(KItemRangeList() << KItemRange(index, 1)); @@ -166,7 +153,7 @@ QHash KStandardItemModel::data(int index) const bool KStandardItemModel::setData(int index, const QHash& values) { - Q_UNUSED(values); + Q_UNUSED(values) if (index < 0 || index >= count()) { return false; } @@ -176,26 +163,26 @@ bool KStandardItemModel::setData(int index, const QHash& v QMimeData* KStandardItemModel::createMimeData(const KItemSet& indexes) const { - Q_UNUSED(indexes); + Q_UNUSED(indexes) return nullptr; } int KStandardItemModel::indexForKeyboardSearch(const QString& text, int startFromIndex) const { - Q_UNUSED(text); - Q_UNUSED(startFromIndex); + Q_UNUSED(text) + Q_UNUSED(startFromIndex) return -1; } bool KStandardItemModel::supportsDropping(int index) const { - Q_UNUSED(index); + Q_UNUSED(index) return false; } QString KStandardItemModel::roleDescription(const QByteArray& role) const { - Q_UNUSED(role); + Q_UNUSED(role) return QString(); } @@ -221,18 +208,18 @@ QList > KStandardItemModel::groups() const void KStandardItemModel::onItemInserted(int index) { - Q_UNUSED(index); + Q_UNUSED(index) } void KStandardItemModel::onItemChanged(int index, const QSet& changedRoles) { - Q_UNUSED(index); - Q_UNUSED(changedRoles); + Q_UNUSED(index) + Q_UNUSED(changedRoles) } void KStandardItemModel::onItemRemoved(int index, KStandardItem* removedItem) { - Q_UNUSED(index); - Q_UNUSED(removedItem); + Q_UNUSED(index) + Q_UNUSED(removedItem) }