API Changes, logicalSectorSize -> logicalSize, totalSectors -> totalLogical.

This commit is contained in:
Chantara Tith 2016-08-31 10:30:45 +07:00 committed by Teo Mrnjavac
parent b76e5a027f
commit aa10fe982a
6 changed files with 15 additions and 15 deletions

View file

@ -590,7 +590,7 @@ ChoicePage::doAlongsideApply()
qint64 oldLastSector = candidate->lastSector();
qint64 newLastSector = firstSector +
m_afterPartitionSplitterWidget->splitPartitionSize() /
dev->logicalSectorSize();
dev->logicalSize();
m_core->resizePartition( dev, candidate, firstSector, newLastSector );
Partition* newPartition = nullptr;

View file

@ -47,7 +47,7 @@ QStringList
buildUnknownDisklabelTexts( Device* dev )
{
QStringList texts = { QObject::tr( "Unpartitioned space or unknown partition table" ),
KFormat().formatByteSize( dev->totalSectors() * dev->logicalSectorSize() ) };
KFormat().formatByteSize( dev->totalLogical() * dev->logicalSize() ) };
return texts;
}

View file

@ -135,7 +135,7 @@ PartitionSizeController::updatePartResizerWidget()
return;
m_updating = true;
qint64 sectorSize = qint64( m_spinBox->value() ) * 1024 * 1024 / m_device->logicalSectorSize();
qint64 sectorSize = qint64( m_spinBox->value() ) * 1024 * 1024 / m_device->logicalSize();
qint64 firstSector = m_partition->firstSector();
qint64 lastSector = firstSector + sectorSize - 1;
@ -185,7 +185,7 @@ PartitionSizeController::doUpdateSpinBox()
{
if ( !m_spinBox )
return;
qint64 mbSize = m_partition->length() * m_device->logicalSectorSize() / 1024 / 1024;
qint64 mbSize = m_partition->length() * m_device->logicalSize() / 1024 / 1024;
m_spinBox->setValue( mbSize );
if ( m_currentSpinBoxValue != -1 && //if it's not the first time we're setting it
m_currentSpinBoxValue != mbSize ) //and the operation changes the SB value