[partition] Warnings-reduction

- use consistent size-formatting
- needs an out-of-line virtual function
This commit is contained in:
Adriaan de Groot 2021-12-07 15:30:21 +01:00
parent 5b05110351
commit bb3f4442f5
2 changed files with 5 additions and 3 deletions

View File

@ -9,11 +9,10 @@
#include "ListPhysicalVolumeWidgetItem.h"
#include <kpmcore/util/capacity.h>
#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() {}

View File

@ -18,6 +18,7 @@ class ListPhysicalVolumeWidgetItem : public QListWidgetItem
{
public:
ListPhysicalVolumeWidgetItem( const Partition* partition, bool checked );
~ListPhysicalVolumeWidgetItem() override;
const Partition* partition() const;