X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/61ce7cea1d90ba1b83300e325d755789f67c8ca1..576a97d8eb9601f4ad74def6528cc90fffe97b1c:/src/kitemviews/kfileitemmodel.cpp diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 5e9603ba1..28376c5d0 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1,23 +1,10 @@ -/***************************************************************************** - * Copyright (C) 2011 by Peter Penz * - * Copyright (C) 2013 by Frank Reininghaus * - * Copyright (C) 2013 by Emmanuel Pescosta * - * * - * 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: 2011 Peter Penz + * SPDX-FileCopyrightText: 2013 Frank Reininghaus + * SPDX-FileCopyrightText: 2013 Emmanuel Pescosta + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kfileitemmodel.h" @@ -247,7 +234,7 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const // The following code has been taken from KDirModel::mimeData() // (kdelibs/kio/kio/kdirmodel.cpp) - // Copyright (C) 2006 David Faure + // SPDX-FileCopyrightText: 2006 David Faure QList urls; QList mostLocalUrls; const ItemData* lastAddedItem = nullptr; @@ -1770,12 +1757,12 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const QVariant valueA, valueB; if (DetailsModeSettings::directorySizeCount()) { + valueA = a->values.value("count"); + valueB = b->values.value("count"); + } else { // use dir size then valueA = a->values.value("size"); valueB = b->values.value("size"); - } else { - valueA = a->values.value("count"); - valueB = b->values.value("count"); } if (valueA.isNull() && valueB.isNull()) { result = 0;