Whitespace fixes.
This commit is contained in:
parent
8ae2ea3006
commit
09711cdf1d
|
@ -59,7 +59,7 @@ void DeviceScanner::scan()
|
||||||
QList<Device*> deviceList = CoreBackendManager::self()->backend()->scanDevices();
|
QList<Device*> deviceList = CoreBackendManager::self()->backend()->scanDevices();
|
||||||
|
|
||||||
foreach(Device * d, deviceList)
|
foreach(Device * d, deviceList)
|
||||||
operationStack().addDevice(d);
|
operationStack().addDevice(d);
|
||||||
|
|
||||||
operationStack().sortDevices();
|
operationStack().sortDevices();
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,8 +180,8 @@ qint64 Partition::sectorsUsed() const
|
||||||
|
|
||||||
qint64 result = 0;
|
qint64 result = 0;
|
||||||
foreach(const Partition * p, children())
|
foreach(const Partition * p, children())
|
||||||
if (!p->roles().has(PartitionRole::Unallocated))
|
if (!p->roles().has(PartitionRole::Unallocated))
|
||||||
result += p->length();
|
result += p->length();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -231,8 +231,8 @@ qint64 Partition::maxFirstSector() const
|
||||||
qint64 rval = -1;
|
qint64 rval = -1;
|
||||||
|
|
||||||
foreach(const Partition * child, children())
|
foreach(const Partition * child, children())
|
||||||
if (!child->roles().has(PartitionRole::Unallocated) && (child->firstSector() < rval || rval == -1))
|
if (!child->roles().has(PartitionRole::Unallocated) && (child->firstSector() < rval || rval == -1))
|
||||||
rval = child->firstSector();
|
rval = child->firstSector();
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
@ -243,8 +243,8 @@ qint64 Partition::minLastSector() const
|
||||||
qint64 rval = -1;
|
qint64 rval = -1;
|
||||||
|
|
||||||
foreach(const Partition * child, children())
|
foreach(const Partition * child, children())
|
||||||
if (!child->roles().has(PartitionRole::Unallocated) && child->lastSector() > rval)
|
if (!child->roles().has(PartitionRole::Unallocated) && child->lastSector() > rval)
|
||||||
rval = child->lastSector();
|
rval = child->lastSector();
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
@ -253,8 +253,8 @@ qint64 Partition::minLastSector() const
|
||||||
bool Partition::hasChildren() const
|
bool Partition::hasChildren() const
|
||||||
{
|
{
|
||||||
foreach(const Partition * child, children())
|
foreach(const Partition * child, children())
|
||||||
if (!child->roles().has(PartitionRole::Unallocated))
|
if (!child->roles().has(PartitionRole::Unallocated))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,8 +130,8 @@ int PartitionTable::numPrimaries() const
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
foreach(const Partition * p, children())
|
foreach(const Partition * p, children())
|
||||||
if (p->roles().has(PartitionRole::Primary) || p->roles().has(PartitionRole::Extended))
|
if (p->roles().has(PartitionRole::Primary) || p->roles().has(PartitionRole::Extended))
|
||||||
result++;
|
result++;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -463,10 +463,10 @@ bool PartitionTable::isSectorBased(const Device& d) const
|
||||||
// see if we have more cylinder aligned partitions than sector
|
// see if we have more cylinder aligned partitions than sector
|
||||||
// aligned ones.
|
// aligned ones.
|
||||||
foreach(const Partition * p, children())
|
foreach(const Partition * p, children())
|
||||||
if (p->firstSector() % PartitionAlignment::sectorAlignment(d) == 0)
|
if (p->firstSector() % PartitionAlignment::sectorAlignment(d) == 0)
|
||||||
numSectorAligned++;
|
numSectorAligned++;
|
||||||
else if (p->firstSector() % d.cylinderSize() == 0)
|
else if (p->firstSector() % d.cylinderSize() == 0)
|
||||||
numCylinderAligned++;
|
numCylinderAligned++;
|
||||||
|
|
||||||
return numSectorAligned >= numCylinderAligned;
|
return numSectorAligned >= numCylinderAligned;
|
||||||
}
|
}
|
||||||
|
@ -498,19 +498,19 @@ QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable)
|
||||||
QList<const Partition*> partitions;
|
QList<const Partition*> partitions;
|
||||||
|
|
||||||
foreach(const Partition * p, ptable.children())
|
foreach(const Partition * p, ptable.children())
|
||||||
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))
|
||||||
foreach(const Partition * child, p->children())
|
foreach(const Partition * child, p->children())
|
||||||
if (!child->roles().has(PartitionRole::Unallocated))
|
if (!child->roles().has(PartitionRole::Unallocated))
|
||||||
partitions.append(child);
|
partitions.append(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
qSort(partitions.begin(), partitions.end(), isPartitionLessThan);
|
qSort(partitions.begin(), partitions.end(), isPartitionLessThan);
|
||||||
|
|
||||||
foreach(const Partition * p, partitions)
|
foreach(const Partition * p, partitions)
|
||||||
stream << *p;
|
stream << *p;
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* Copyright (C) 2012 by Volker Lanz <vl@fidra.de> *
|
* Copyright (C) 2012 by Volker Lanz <vl@fidra.de> *
|
||||||
* Copyright (C) 2016 by Andrius Štikonas <andrius@stikonas.eu> *
|
* Copyright (C) 2016 by Andrius Štikonas <andrius@stikonas.eu> *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or *
|
* This program is free software; you can redistribute it and/or *
|
||||||
* modify it under the terms of the GNU General Public License as *
|
* modify it under the terms of the GNU General Public License as *
|
||||||
|
|
|
@ -147,8 +147,8 @@ QList<PartWidget*> PartWidgetBase::childWidgets()
|
||||||
QList<PartWidget*> rval;
|
QList<PartWidget*> rval;
|
||||||
|
|
||||||
foreach(QObject * o, children())
|
foreach(QObject * o, children())
|
||||||
if (PartWidget* w = qobject_cast<PartWidget*>(o))
|
if (PartWidget* w = qobject_cast<PartWidget*>(o))
|
||||||
rval.append(w);
|
rval.append(w);
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ qint32 Operation::totalProgress() const
|
||||||
qint32 result = 0;
|
qint32 result = 0;
|
||||||
|
|
||||||
foreach(const Job * job, jobs())
|
foreach(const Job * job, jobs())
|
||||||
result += job->numSteps();
|
result += job->numSteps();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -163,8 +163,8 @@ bool Operation::execute(Report& parent)
|
||||||
Report* report = parent.newChild(description());
|
Report* report = parent.newChild(description());
|
||||||
|
|
||||||
foreach(Job * job, jobs())
|
foreach(Job * job, jobs())
|
||||||
if (!(rval = job->run(*report)))
|
if (!(rval = job->run(*report)))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
setStatus(rval ? StatusFinishedSuccess : StatusError);
|
setStatus(rval ? StatusFinishedSuccess : StatusError);
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ QString Report::toHtml() const
|
||||||
s += QStringLiteral("<br/>\n");
|
s += QStringLiteral("<br/>\n");
|
||||||
else
|
else
|
||||||
foreach(Report * child, children())
|
foreach(Report * child, children())
|
||||||
s += child->toHtml();
|
s += child->toHtml();
|
||||||
|
|
||||||
if (!status().isEmpty())
|
if (!status().isEmpty())
|
||||||
s += QStringLiteral("<b>") + status().toHtmlEscaped() + QStringLiteral("</b><br/>\n\n");
|
s += QStringLiteral("<b>") + status().toHtmlEscaped() + QStringLiteral("</b><br/>\n\n");
|
||||||
|
@ -110,7 +110,7 @@ QString Report::toText() const
|
||||||
s += output() + QStringLiteral("\n");
|
s += output() + QStringLiteral("\n");
|
||||||
|
|
||||||
foreach(Report * child, children())
|
foreach(Report * child, children())
|
||||||
s += child->toText();
|
s += child->toText();
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue