Simplify prettyName logic. We already check for empty name in the constructor.

This commit is contained in:
Andrius Štikonas 2016-02-25 22:24:46 +00:00
parent 8c740c99ce
commit d9f87b1031
1 changed files with 1 additions and 4 deletions

View File

@ -112,8 +112,5 @@ bool Device::operator!=(const Device& other) const
QString Device::prettyName() const
{
if ( name().isEmpty() )
return deviceNode();
else
return i18nc("Device name Capacity (device node)", "%1 %2 (%3)", name(), Capacity::formatByteSize(capacity()), deviceNode());
return i18nc("Device name Capacity (device node)", "%1 %2 (%3)", name(), Capacity::formatByteSize(capacity()), deviceNode());
}