]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/private/kitemlistsizehintresolver.cpp
Output of licensedigger + manual cleanup afterwards.
[dolphin.git] / src / kitemviews / private / kitemlistsizehintresolver.cpp
index 1d8067026d15281eac181523337bfb3af4a29a65..7021c5296cbb1c5f1f0ad39f1cf80df33dc07ab2 100644 (file)
@@ -1,30 +1,17 @@
-/***************************************************************************
- *   Copyright (C) 2011 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: 2011 Peter Penz <peter.penz19@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #include "kitemlistsizehintresolver.h"
-
-#include <kitemviews/kitemlistview.h>
+#include "kitemviews/kitemlistview.h"
 
 KItemListSizeHintResolver::KItemListSizeHintResolver(const KItemListView* itemListView) :
     m_itemListView(itemListView),
     m_logicalHeightHintCache(),
     m_logicalWidthHint(0.0),
+    m_minHeightHint(0.0),
     m_needsResolving(false)
 {
 }
@@ -33,6 +20,12 @@ KItemListSizeHintResolver::~KItemListSizeHintResolver()
 {
 }
 
+QSizeF KItemListSizeHintResolver::minSizeHint()
+{
+    updateCache();
+    return QSizeF(m_logicalWidthHint, m_minHeightHint);
+}
+
 QSizeF KItemListSizeHintResolver::sizeHint(int index)
 {
     updateCache();
@@ -129,7 +122,7 @@ void KItemListSizeHintResolver::itemsMoved(const KItemRange& range, const QList<
 
 void KItemListSizeHintResolver::itemsChanged(int index, int count, const QSet<QByteArray>& roles)
 {
-    Q_UNUSED(roles);
+    Q_UNUSED(roles)
     while (count) {
         m_logicalHeightHintCache[index] = 0.0;
         ++index;