Use QString::back().
This commit is contained in:
parent
8a9b5589ea
commit
985b353146
|
@ -82,8 +82,7 @@ QString SfdiskPartitionTable::createPartition(Report& report, const Partition& p
|
||||||
QRegularExpressionMatch rem = re.match(createCommand.output());
|
QRegularExpressionMatch rem = re.match(createCommand.output());
|
||||||
|
|
||||||
if (rem.hasMatch()) {
|
if (rem.hasMatch()) {
|
||||||
// TODO: Use back() with Qt 5.10
|
if ( partition.devicePath().back().isDigit() )
|
||||||
if ( partition.devicePath()[partition.devicePath().size() - 1].isDigit() )
|
|
||||||
return partition.devicePath() + QLatin1Char('p') + rem.captured(1);
|
return partition.devicePath() + QLatin1Char('p') + rem.captured(1);
|
||||||
else
|
else
|
||||||
return partition.devicePath() + rem.captured(1);
|
return partition.devicePath() + rem.captured(1);
|
||||||
|
|
Loading…
Reference in New Issue