From d56ec807941c8501fb47542b8b01e9b3e688ac17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= <andrius@stikonas.eu>
Date: Wed, 18 Apr 2018 23:59:15 +0300
Subject: [PATCH] [partition] Switch to scoped Device enums.

---
 src/modules/partition/gui/CreatePartitionDialog.cpp | 6 +++---
 src/modules/partition/gui/PartitionPage.cpp         | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modules/partition/gui/CreatePartitionDialog.cpp b/src/modules/partition/gui/CreatePartitionDialog.cpp
index 00ec882f98..5952a61a11 100644
--- a/src/modules/partition/gui/CreatePartitionDialog.cpp
+++ b/src/modules/partition/gui/CreatePartitionDialog.cpp
@@ -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());
     }
 
diff --git a/src/modules/partition/gui/PartitionPage.cpp b/src/modules/partition/gui/PartitionPage.cpp
index 33b9e6209d..c521604fb0 100644
--- a/src/modules/partition/gui/PartitionPage.cpp
+++ b/src/modules/partition/gui/PartitionPage.cpp
@@ -145,7 +145,7 @@ PartitionPage::updateButtons()
     if ( m_ui->deviceComboBox->currentIndex() >= 0 )
     {
         QModelIndex deviceIndex = m_core->deviceModel()->index( m_ui->deviceComboBox->currentIndex(), 0 );
-        if ( m_core->deviceModel()->deviceForIndex( deviceIndex )->type() != Device::LVM_Device )
+        if ( m_core->deviceModel()->deviceForIndex( deviceIndex )->type() != Device::Type::LVM_Device )
             createTable = true;
     }
 
-- 
GitLab