Simplify QStringList->QString conversion.
This commit is contained in:
parent
47837843c5
commit
69647e816e
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue