Whitespace fixes.

This commit is contained in:
Andrius Štikonas 2016-06-01 21:00:31 +01:00
parent 8ae2ea3006
commit 09711cdf1d
7 changed files with 31 additions and 31 deletions

View File

@ -59,7 +59,7 @@ void DeviceScanner::scan()
QList<Device*> deviceList = CoreBackendManager::self()->backend()->scanDevices();
foreach(Device * d, deviceList)
operationStack().addDevice(d);
operationStack().addDevice(d);
operationStack().sortDevices();
}

View File

@ -180,8 +180,8 @@ qint64 Partition::sectorsUsed() const
qint64 result = 0;
foreach(const Partition * p, children())
if (!p->roles().has(PartitionRole::Unallocated))
result += p->length();
if (!p->roles().has(PartitionRole::Unallocated))
result += p->length();
return result;
}
@ -231,8 +231,8 @@ qint64 Partition::maxFirstSector() const
qint64 rval = -1;
foreach(const Partition * child, children())
if (!child->roles().has(PartitionRole::Unallocated) && (child->firstSector() < rval || rval == -1))
rval = child->firstSector();
if (!child->roles().has(PartitionRole::Unallocated) && (child->firstSector() < rval || rval == -1))
rval = child->firstSector();
return rval;
}
@ -243,8 +243,8 @@ qint64 Partition::minLastSector() const
qint64 rval = -1;
foreach(const Partition * child, children())
if (!child->roles().has(PartitionRole::Unallocated) && child->lastSector() > rval)
rval = child->lastSector();
if (!child->roles().has(PartitionRole::Unallocated) && child->lastSector() > rval)
rval = child->lastSector();
return rval;
}
@ -253,8 +253,8 @@ qint64 Partition::minLastSector() const
bool Partition::hasChildren() const
{
foreach(const Partition * child, children())
if (!child->roles().has(PartitionRole::Unallocated))
return true;
if (!child->roles().has(PartitionRole::Unallocated))
return true;
return false;
}

View File

@ -130,8 +130,8 @@ int PartitionTable::numPrimaries() const
int result = 0;
foreach(const Partition * p, children())
if (p->roles().has(PartitionRole::Primary) || p->roles().has(PartitionRole::Extended))
result++;
if (p->roles().has(PartitionRole::Primary) || p->roles().has(PartitionRole::Extended))
result++;
return result;
}
@ -463,10 +463,10 @@ bool PartitionTable::isSectorBased(const Device& d) const
// see if we have more cylinder aligned partitions than sector
// aligned ones.
foreach(const Partition * p, children())
if (p->firstSector() % PartitionAlignment::sectorAlignment(d) == 0)
numSectorAligned++;
else if (p->firstSector() % d.cylinderSize() == 0)
numCylinderAligned++;
if (p->firstSector() % PartitionAlignment::sectorAlignment(d) == 0)
numSectorAligned++;
else if (p->firstSector() % d.cylinderSize() == 0)
numCylinderAligned++;
return numSectorAligned >= numCylinderAligned;
}
@ -498,19 +498,19 @@ QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable)
QList<const Partition*> partitions;
foreach(const Partition * p, ptable.children())
if (!p->roles().has(PartitionRole::Unallocated)) {
partitions.append(p);
if (!p->roles().has(PartitionRole::Unallocated)) {
partitions.append(p);
if (p->roles().has(PartitionRole::Extended))
foreach(const Partition * child, p->children())
if (!child->roles().has(PartitionRole::Unallocated))
partitions.append(child);
}
if (p->roles().has(PartitionRole::Extended))
foreach(const Partition * child, p->children())
if (!child->roles().has(PartitionRole::Unallocated))
partitions.append(child);
}
qSort(partitions.begin(), partitions.end(), isPartitionLessThan);
foreach(const Partition * p, partitions)
stream << *p;
stream << *p;
return stream;
}

View File

@ -1,6 +1,6 @@
/*************************************************************************
* 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 *
* modify it under the terms of the GNU General Public License as *

View File

@ -147,8 +147,8 @@ QList<PartWidget*> PartWidgetBase::childWidgets()
QList<PartWidget*> rval;
foreach(QObject * o, children())
if (PartWidget* w = qobject_cast<PartWidget*>(o))
rval.append(w);
if (PartWidget* w = qobject_cast<PartWidget*>(o))
rval.append(w);
return rval;
}

View File

@ -147,7 +147,7 @@ qint32 Operation::totalProgress() const
qint32 result = 0;
foreach(const Job * job, jobs())
result += job->numSteps();
result += job->numSteps();
return result;
}
@ -163,8 +163,8 @@ bool Operation::execute(Report& parent)
Report* report = parent.newChild(description());
foreach(Job * job, jobs())
if (!(rval = job->run(*report)))
break;
if (!(rval = job->run(*report)))
break;
setStatus(rval ? StatusFinishedSuccess : StatusError);

View File

@ -81,7 +81,7 @@ QString Report::toHtml() const
s += QStringLiteral("<br/>\n");
else
foreach(Report * child, children())
s += child->toHtml();
s += child->toHtml();
if (!status().isEmpty())
s += QStringLiteral("<b>") + status().toHtmlEscaped() + QStringLiteral("</b><br/>\n\n");
@ -110,7 +110,7 @@ QString Report::toText() const
s += output() + QStringLiteral("\n");
foreach(Report * child, children())
s += child->toText();
s += child->toText();
return s;
}