Use range based for instead of Q_FOREACH.
Bump Qt version requirements to 5.7.0
This commit is contained in:
parent
e43d6645e4
commit
d2ce014589
|
@ -20,7 +20,7 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
||||||
set(CMAKE_USE_RELATIVE_PATHS OFF)
|
set(CMAKE_USE_RELATIVE_PATHS OFF)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
|
||||||
|
|
||||||
set(QT_MIN_VERSION "5.6.1")
|
set(QT_MIN_VERSION "5.7.0")
|
||||||
set(VERSION_MAJOR "3")
|
set(VERSION_MAJOR "3")
|
||||||
set(VERSION_MINOR "0")
|
set(VERSION_MINOR "0")
|
||||||
set(VERSION_RELEASE "50")
|
set(VERSION_RELEASE "50")
|
||||||
|
|
|
@ -566,17 +566,19 @@ QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable)
|
||||||
if (!p->roles().has(PartitionRole::Unallocated)) {
|
if (!p->roles().has(PartitionRole::Unallocated)) {
|
||||||
partitions.append(p);
|
partitions.append(p);
|
||||||
|
|
||||||
if (p->roles().has(PartitionRole::Extended))
|
if (p->roles().has(PartitionRole::Extended)) {
|
||||||
for (const auto &child : p->children()) {
|
const auto partChildren = p->children();
|
||||||
|
for (const auto &child : partChildren) {
|
||||||
if (!child->roles().has(PartitionRole::Unallocated))
|
if (!child->roles().has(PartitionRole::Unallocated))
|
||||||
partitions.append(child);
|
partitions.append(child);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(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)
|
for (const auto &p : qAsConst(partitions))
|
||||||
stream << *p;
|
stream << *p;
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
|
|
|
@ -374,7 +374,7 @@ void LibPartedBackend::scanDevicePartitions(Device& d, PedDisk* pedDisk)
|
||||||
if (d.partitionTable()->isSectorBased(d))
|
if (d.partitionTable()->isSectorBased(d))
|
||||||
d.partitionTable()->setType(d, PartitionTable::msdos_sectorbased);
|
d.partitionTable()->setType(d, PartitionTable::msdos_sectorbased);
|
||||||
|
|
||||||
foreach(const Partition * part, partitions)
|
for (const Partition * part : qAsConst(partitions))
|
||||||
PartitionAlignment::isAligned(d, *part);
|
PartitionAlignment::isAligned(d, *part);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue