Port qSort.
This commit is contained in:
parent
b10577e1c7
commit
5f0d1cd72b
|
@ -561,7 +561,7 @@ void OperationStack::sortDevices()
|
|||
{
|
||||
QWriteLocker lockDevices(&lock());
|
||||
|
||||
qSort(previewDevices().begin(), previewDevices().end(), deviceLessThan);
|
||||
std::sort(previewDevices().begin(), previewDevices().end(), deviceLessThan);
|
||||
|
||||
emit devicesChanged();
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ void PartitionTable::insertUnallocated(const Device& d, PartitionNode* p, qint64
|
|||
if (d.type() == Device::LVM_Device && !p->children().isEmpty()) {
|
||||
// rearranging the sectors of all partitions to keep unallocated space at the end
|
||||
lastEnd = 0;
|
||||
qSort(children().begin(), children().end(), [](const Partition* p1, const Partition* p2) { return p1->deviceNode() < p2->deviceNode(); });
|
||||
std::sort(children().begin(), children().end(), [](const Partition* p1, const Partition* p2) { return p1->deviceNode() < p2->deviceNode(); });
|
||||
for (const auto &child : children()) {
|
||||
qint64 totalSectors = child->length();
|
||||
child->setFirstSector(lastEnd);
|
||||
|
@ -574,7 +574,7 @@ QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable)
|
|||
}
|
||||
}
|
||||
|
||||
qSort(partitions.begin(), partitions.end(), [](const Partition* p1, const Partition* p2) { return p1->number() < p2->number(); });
|
||||
std::sort(partitions.begin(), partitions.end(), [](const Partition* p1, const Partition* p2) { return p1->number() < p2->number(); });
|
||||
|
||||
foreach(const auto &p, partitions)
|
||||
stream << *p;
|
||||
|
|
Loading…
Reference in New Issue