diff --git a/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp b/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp index 1c5eef0ab..2de999360 100644 --- a/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp +++ b/src/modules/partition/gui/ResizeVolumeGroupDialog.cpp @@ -44,7 +44,7 @@ ResizeVolumeGroupDialog::ResizeVolumeGroupDialog( LvmDevice *device, for ( const Partition* p : availablePVs ) pvList()->addItem( new ListPhysicalVolumeWidgetItem( p, false ) ); - peSize()->setValue( device->peSize() / Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB) ); + peSize()->setValue( static_cast( device->peSize() / Capacity::unitFactor(Capacity::Unit::Byte, Capacity::Unit::MiB) ) ); vgName()->setEnabled( false ); peSize()->setEnabled( false ); diff --git a/src/modules/partition/gui/VolumeGroupBaseDialog.cpp b/src/modules/partition/gui/VolumeGroupBaseDialog.cpp index a727fe42a..8078253b3 100644 --- a/src/modules/partition/gui/VolumeGroupBaseDialog.cpp +++ b/src/modules/partition/gui/VolumeGroupBaseDialog.cpp @@ -137,9 +137,9 @@ VolumeGroupBaseDialog::updateTotalSize() void 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 ) totalSectors = m_totalSizeValue / extentSize;