From 15f19e818c70dcfa4afb7c7c2b35c3053a199881 Mon Sep 17 00:00:00 2001 From: Caio Carvalho Date: Mon, 16 Jul 2018 15:51:16 -0300 Subject: [PATCH] RAID level should not be showed when the device is inactive. (i.e. it's not loaded by mdadm). --- src/gui/infopane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/infopane.cpp b/src/gui/infopane.cpp index 0c82c5f..71160c3 100644 --- a/src/gui/infopane.cpp +++ b/src/gui/infopane.cpp @@ -198,7 +198,7 @@ void InfoPane::showDevice(Qt::DockWidgetArea area, const Device& d) const SoftwareRAID& raid = static_cast(d); createLabels(i18nc("@label device", "Volume Type:"), QStringLiteral("RAID"), cols(area), x, y); createLabels(i18nc("@label device", "Capacity:"), Capacity::formatByteSize(raid.capacity()), cols(area), x, y); - createLabels(i18nc("@label device", "RAID Level:"), QString::number(raid.raidLevel()), cols(area), x, y); + createLabels(i18nc("@label device", "RAID Level:"), raid.raidLevel() < 0 ? QStringLiteral("---") : QString::number(raid.raidLevel()), cols(area), x, y); createLabels(i18nc("@label device", "Chunk Size:"),Capacity::formatByteSize(raid.chunkSize()), cols(area), x, y); createLabels(i18nc("@label device", "Total Chunk:"), Capacity::formatByteSize(raid.totalChunk()), cols(area), x, y); createLabels(i18nc("@label device", "Array Size:"), Capacity::formatByteSize(raid.arraySize()), cols(area), x, y);