Use lvm2_pvFS pointer to call member functions.

This commit is contained in:
Andrius Štikonas 2016-09-04 11:57:59 +01:00
parent 6cd699643a
commit 46b2c16131
2 changed files with 5 additions and 5 deletions

View File

@ -127,15 +127,16 @@ void InfoPane::showPartition(Qt::DockWidgetArea area, const Partition& p)
createLabels(i18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);
} else if (p.fileSystem().type() == FileSystem::Lvm2_PV) {
const FS::lvm2_pv* lvm2PVFs = dynamic_cast<const FS::lvm2_pv*>(&p.fileSystem());
QString deviceNode = p.partitionPath();
createLabels(i18nc("@label partition", "File system:"), p.fileSystem().name(), cols(area), x, y);
createLabels(i18nc("@label partition", "Capacity:"), Capacity::formatByteSize(p.capacity()), cols(area), x, y);
createLabels(i18nc("@label partition", "Available:"), Capacity::formatByteSize(p.available()), cols(area), x, y);
createLabels(i18nc("@label partition", "Used:"), Capacity::formatByteSize(p.used()), cols(area), x, y);
createLabels(i18nc("@label partition", "PE Size:"), Capacity::formatByteSize(FS::lvm2_pv::getPESize(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Total PE:"), QString::number(FS::lvm2_pv::getTotalPE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Free PE:"), QString::number(FS::lvm2_pv::getFreePE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Allocated PE:"), QString::number(FS::lvm2_pv::getAllocatedPE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "PE Size:"), Capacity::formatByteSize(lvm2PVFs->getPESize(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Total PE:"), QString::number(lvm2PVFs->getTotalPE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Free PE:"), QString::number(lvm2PVFs->getFreePE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "Allocated PE:"), QString::number(lvm2PVFs->getAllocatedPE(deviceNode)), cols(area), x, y);
createLabels(i18nc("@label partition", "First sector:"), QLocale().toString(p.firstSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
createLabels(i18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);

View File

@ -54,7 +54,6 @@
#include <fs/filesystem.h>
#include <fs/filesystemfactory.h>
#include <fs/luks.h>
#include <fs/lvm2_pv.h>
#include <util/helpers.h>
#include <util/guihelpers.h>