Use QString::back().

This commit is contained in:
Andrius Štikonas 2018-07-18 23:23:34 +01:00
parent 8a9b5589ea
commit 985b353146
1 changed files with 1 additions and 2 deletions

View File

@ -82,8 +82,7 @@ QString SfdiskPartitionTable::createPartition(Report& report, const Partition& p
QRegularExpressionMatch rem = re.match(createCommand.output());
if (rem.hasMatch()) {
// TODO: Use back() with Qt 5.10
if ( partition.devicePath()[partition.devicePath().size() - 1].isDigit() )
if ( partition.devicePath().back().isDigit() )
return partition.devicePath() + QLatin1Char('p') + rem.captured(1);
else
return partition.devicePath() + rem.captured(1);