From 313531bc4b7954c070f842c3ea223838151ed221 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 7 Jul 2020 23:04:39 +0200 Subject: [PATCH] [partition] Remove unused parameter - there are no consumers for checking-the-capacity-of-the-drive This parameter was introduced in 3cd18fd285 as "preparatory work" but never completed. The architecture of the PartitionCoreModule makes it very difficult to get the necessary parameters to the right place, and it would probably be better to put a SortFilterProxyModel in front of a partitioning model anyway. Since the display code can already filter on size, just drop this one. --- src/modules/partition/core/DeviceList.cpp | 7 +------ src/modules/partition/core/DeviceList.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index 1eb7d26eb..72786d5a5 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -125,7 +125,7 @@ erase( DeviceList& l, DeviceList::iterator& it ) } QList< Device* > -getDevices( DeviceType which, qint64 minimumSize ) +getDevices( DeviceType which ) { bool writableOnly = ( which == DeviceType::WritableOnly ); @@ -171,11 +171,6 @@ getDevices( DeviceType which, qint64 minimumSize ) cDebug() << Logger::SubEntry << "Removing device with iso9660 filesystem (probably a CD) on it" << it; it = erase( devices, it ); } - else if ( ( minimumSize >= 0 ) && !( ( *it )->capacity() > minimumSize ) ) - { - cDebug() << Logger::SubEntry << "Removing too-small" << it; - it = erase( devices, it ); - } else { ++it; diff --git a/src/modules/partition/core/DeviceList.h b/src/modules/partition/core/DeviceList.h index 6823d6951..51c71feeb 100644 --- a/src/modules/partition/core/DeviceList.h +++ b/src/modules/partition/core/DeviceList.h @@ -45,7 +45,7 @@ enum class DeviceType * greater than @p minimumSize will be returned. * @return a list of Devices meeting this criterium. */ -QList< Device* > getDevices( DeviceType which = DeviceType::All, qint64 minimumSize = -1 ); +QList< Device* > getDevices( DeviceType which = DeviceType::All ); } // namespace PartUtils