Simplify QStringList->QString conversion.

This commit is contained in:
Andrius Štikonas 2016-08-12 01:56:50 +01:00
parent 47837843c5
commit 69647e816e
2 changed files with 6 additions and 12 deletions

View File

@ -59,9 +59,5 @@ bool MovePhysicalVolumeJob::run(Report& parent)
QString MovePhysicalVolumeJob::description() const
{
QString tmp = QString();
for (const auto &path : partList()) {
tmp += path + QStringLiteral(",");
}
return xi18nc("@info/plain", "Move used PE in %1 on %2 to other available Physical Volumes", tmp, device().name());
return xi18nc("@info/plain", "Move used PE in %1 on %2 to other available Physical Volumes", partList().join(QStringLiteral(", ")), device().name());
}

View File

@ -57,15 +57,13 @@ bool ResizeVolumeGroupJob::run(Report& parent)
QString ResizeVolumeGroupJob::description() const
{
QString tmp = QString();
for (const auto &path : partList()) {
tmp += path + QStringLiteral(",");
}
const QString partitionList = partList().join(QStringLiteral(", "));
if (type() == ResizeVolumeGroupJob::Grow) {
return xi18nc("@info/plain", "Inserting Volume: %1 to %2.", tmp, device().name());
return xi18nc("@info/plain", "Inserting Volume: %1 to %2.", partitionList, device().name());
}
if (type() == ResizeVolumeGroupJob::Shrink) {
return xi18nc("@info/plain", "Removing Volume: %1 from %2.", tmp, device().name());
return xi18nc("@info/plain", "Removing Volume: %1 from %2.", partitionList, device().name());
}
return xi18nc("@info/plain", "Resizing Volume: %1 to %2.", device().name(), tmp);
return xi18nc("@info/plain", "Resizing Volume: %1 to %2.", device().name(), partitionList);
}