House-cleaning and removing irrelevant TODO.

This commit is contained in:
Chantara Tith 2016-07-25 01:00:28 +07:00 committed by Andrius Štikonas
parent 4d78cad920
commit cbb077ffbd
6 changed files with 1 additions and 9 deletions

View File

@ -33,7 +33,6 @@ int PartitionAlignment::s_sectorAlignment = 2048;
qint64 PartitionAlignment::firstDelta(const Device& d, const Partition& p, qint64 s)
{
//TODO: make sure things work for LVM
if (d.partitionTable()->type() == PartitionTable::msdos) {
const DiskDevice& diskDevice = dynamic_cast<const DiskDevice&>(d);
if (p.roles().has(PartitionRole::Logical) && s == 2 * diskDevice.sectorsPerTrack())
@ -53,7 +52,6 @@ qint64 PartitionAlignment::lastDelta(const Device& d, const Partition&, qint64 s
bool PartitionAlignment::isLengthAligned(const Device& d, const Partition& p)
{
//TODO: make sure things work for LVM
if (d.partitionTable()->type() == PartitionTable::msdos) {
const DiskDevice& diskDevice = dynamic_cast<const DiskDevice&>(d);
if (p.roles().has(PartitionRole::Logical) && p.firstSector() == 2 * diskDevice.sectorsPerTrack())

View File

@ -78,8 +78,6 @@ bool CreatePartitionJob::run(Report& parent)
LvmDevice& dev = dynamic_cast<LvmDevice&>(device());
partition().setState(Partition::StateNone);
//TODO: take lvname from createDialog.
// find a better way to do this.now, we're assuming that partitionPath is already set, so we get the name from the path
QString partPath = partition().partitionPath();
QString lvname = partPath.right(partPath.length() - partPath.lastIndexOf(QStringLiteral("/")) - 1);
rval = LvmDevice::createLV(*report, dev, partition(), lvname);

View File

@ -66,7 +66,6 @@ bool DeleteFileSystemJob::run(Report& parent)
if (partition().roles().has(PartitionRole::Extended)) {
rval = true;
} else if (device().type() == Device::LVM_Device) {
//TODO: LVM delete Filesystem Job. libparted can't help us here.
rval = true;
}
else {

View File

@ -40,8 +40,6 @@ bool MovePhysicalVolumeJob::run(Report& parent)
Report* report = jobStarted(parent);
//TODO:check that the provided list is legal
QStringList destinations = LvmDevice::getPVs(device().name());
foreach (QString partPath, partList()) {
if (destinations.contains(partPath)) {

View File

@ -41,7 +41,6 @@ bool ResizeVolumeGroupJob::run(Report& parent)
Report* report = jobStarted(parent);
//TODO:check that the provided list is legal
foreach (QString pvpath, partList()) {
if (type() == ResizeVolumeGroupJob::Grow) {
rval = LvmDevice::insertPV(*report, device(), pvpath);

View File

@ -79,7 +79,7 @@ bool SetPartGeometryJob::run(Report& parent)
report->line() << xi18nc("@info:progress", "Could not open device <filename>%1</filename> while trying to resize/move partition <filename>%2</filename>.", device().deviceNode(), partition().deviceNode());
} else if (device().type() == Device::LVM_Device) {
LvmDevice& dev = dynamic_cast<LvmDevice&>(device());
//TODO: resize given LVM LV
partition().setFirstSector(newStart());
partition().setLastSector(newStart() + newLength() - 1);