diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 02ea5cb30..6a1cde3a6 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -2,8 +2,9 @@ * * Copyright 2014, Aurélien Gâteau * Copyright 2014-2017, Teo Mrnjavac - * Copyright 2018-2019, Adriaan de Groot + * Copyright 2018-2019, 2020, Adriaan de Groot * Copyright 2019, Collabora Ltd + * Copyright 2020, Anke Boersma #include -// Qt #include #include #include @@ -414,13 +413,7 @@ PartitionViewStep::onLeave() if ( m_widget->currentWidget() == m_manualPartitionPage ) { - bool isEfi = false; if ( PartUtils::isEfiSystem() ) - { - isEfi = true; - } - - if ( isEfi ) { QString espMountPoint = Calamares::JobQueue::instance()->globalStorage()->value( "efiSystemPartition" ).toString(); @@ -464,18 +457,15 @@ PartitionViewStep::onLeave() QMessageBox::warning( m_manualPartitionPage, message, description ); } } - - if ( !isEfi ) + else { cDebug() << "device: BIOS"; + // TODO: this *always* warns, which might be annoying, so it'd be + // best to find a way to detect that bios_grub partition. - Partition* bios_p = m_core->findPartitionByMountPoint( "" ); - QString message; - QString description; - - message = tr( "Option to use GPT on BIOS" ); - description = tr( "A GPT partition table is the best option for all " + QString message = tr( "Option to use GPT on BIOS" ); + QString description = tr( "A GPT partition table is the best option for all " "systems. This installer supports such a setup for " "BIOS systems too." "

" @@ -486,12 +476,9 @@ PartitionViewStep::onLeave() "bios_grub flag enabled.

" "An unformatted 8 MB partition is necessary " "to start %1 on a BIOS system with GPT." ) - .arg( Calamares::Branding::instance()->string( Calamares::Branding::ShortProductName ) ); + .arg( *Calamares::Branding::ShortProductName ); - if ( !message.isEmpty() ) - { - QMessageBox::information( m_manualPartitionPage, message, description ); - } + QMessageBox::information( m_manualPartitionPage, message, description ); } Partition* root_p = m_core->findPartitionByMountPoint( "/" );