[partition] Reduce warnings about integer size

main
Adriaan de Groot 6 years ago
parent 10ba468748
commit bffaf47900

@ -44,7 +44,7 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice *device,
for ( const Partition* p : availablePVs ) for ( const Partition* p : availablePVs )
pvList()->addItem( new ListPhysicalVolumeWidgetItem( p, false ) ); pvList()->addItem( new ListPhysicalVolumeWidgetItem( p, false ) );
peSize()->setValue( device->peSize() / Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB) ); peSize()->setValue( static_cast<int>( device->peSize() / Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB) ) );
vgName()->setEnabled( false ); vgName()->setEnabled( false );
peSize()->setEnabled( false ); peSize()->setEnabled( false );

@ -137,9 +137,9 @@ VolumeGroupBaseDialog::updateTotalSize()
void void
VolumeGroupBaseDialog::updateTotalSectors() VolumeGroupBaseDialog::updateTotalSectors()
{ {
qint32 totalSectors = 0; qint64 totalSectors = 0;
qint32 extentSize = ui->peSize->value() * Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB); qint64 extentSize = ui->peSize->value() * Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB);
if ( extentSize > 0 ) if ( extentSize > 0 )
totalSectors = m_totalSizeValue / extentSize; totalSectors = m_totalSizeValue / extentSize;

Loading…
Cancel
Save