From bb3f4442f5f5e203a3c0ce673cd362aadb02882c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 7 Dec 2021 15:30:21 +0100 Subject: [PATCH] [partition] Warnings-reduction - use consistent size-formatting - needs an out-of-line virtual function --- src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp | 7 ++++--- src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp b/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp index 1e8a9e573..8eeafcbf4 100644 --- a/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp +++ b/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.cpp @@ -9,11 +9,10 @@ #include "ListPhysicalVolumeWidgetItem.h" -#include +#include "core/SizeUtils.h" ListPhysicalVolumeWidgetItem::ListPhysicalVolumeWidgetItem( const Partition* partition, bool checked ) - : QListWidgetItem( - QString( "%1 | %2" ).arg( partition->deviceNode(), Capacity::formatByteSize( partition->capacity() ) ) ) + : QListWidgetItem( QString( "%1 | %2" ).arg( partition->deviceNode(), formatByteSize( partition->capacity() ) ) ) , m_partition( partition ) { setToolTip( partition->deviceNode() ); @@ -26,3 +25,5 @@ ListPhysicalVolumeWidgetItem::partition() const { return m_partition; } + +ListPhysicalVolumeWidgetItem::~ListPhysicalVolumeWidgetItem() {} diff --git a/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h b/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h index 6e0b1c85a..5d7fdcb76 100644 --- a/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h +++ b/src/modules/partition/gui/ListPhysicalVolumeWidgetItem.h @@ -18,6 +18,7 @@ class ListPhysicalVolumeWidgetItem : public QListWidgetItem { public: ListPhysicalVolumeWidgetItem( const Partition* partition, bool checked ); + ~ListPhysicalVolumeWidgetItem() override; const Partition* partition() const;