[partition] Switch to scoped Device enums.

This commit is contained in:
Andrius Štikonas 2018-04-18 23:59:15 +03:00
parent 522adf766a
commit 1b21668bff
2 changed files with 4 additions and 4 deletions

View file

@ -68,11 +68,11 @@ CreatePartitionDialog::CreatePartitionDialog( Device* device, PartitionNode* par
m_ui->encryptWidget->setText( tr( "En&crypt" ) );
m_ui->encryptWidget->hide();
if (m_device->type() == Device::Disk_Device) {
if (m_device->type() == Device::Type::Disk_Device) {
m_ui->lvNameLabel->hide();
m_ui->lvNameLineEdit->hide();
}
if (m_device->type() == Device::LVM_Device) {
if (m_device->type() == Device::Type::LVM_Device) {
/* LVM logical volume name can consist of: letters numbers _ . - +
* It cannot start with underscore _ and must not be equal to . or .. or any entry in /dev/
* QLineEdit accepts QValidator::Intermediate, so we just disable . at the beginning */
@ -242,7 +242,7 @@ CreatePartitionDialog::createPartition()
);
}
if (m_device->type() == Device::LVM_Device) {
if (m_device->type() == Device::Type::LVM_Device) {
partition->setPartitionPath(m_device->deviceNode() + QStringLiteral("/") + m_ui->lvNameLineEdit->text().trimmed());
}