[partition] Introduce a check if the GPT-on-BIOS popup should be shown
The check is bogus right now, and it still always warns; but if the `shouldWarnForGPTOnBIOS()` function is implemented, this will fix issue 1701.
This commit is contained in:
parent
ded7991dd6
commit
d630c2aadf
@ -395,6 +395,18 @@ PartitionViewStep::onActivate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
shouldWarnForGPTOnBIOS( const PartitionCoreModule* core )
|
||||||
|
{
|
||||||
|
if ( PartUtils::isEfiSystem() )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
cDebug() << core->bootLoaderInstallPath();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PartitionViewStep::onLeave()
|
PartitionViewStep::onLeave()
|
||||||
@ -462,9 +474,9 @@ PartitionViewStep::onLeave()
|
|||||||
{
|
{
|
||||||
|
|
||||||
cDebug() << "device: BIOS";
|
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.
|
|
||||||
|
|
||||||
|
if ( shouldWarnForGPTOnBIOS( m_core ) )
|
||||||
|
{
|
||||||
QString message = tr( "Option to use GPT on BIOS" );
|
QString message = tr( "Option to use GPT on BIOS" );
|
||||||
QString description = tr( "A GPT partition table is the best option for all "
|
QString description = tr( "A GPT partition table is the best option for all "
|
||||||
"systems. This installer supports such a setup for "
|
"systems. This installer supports such a setup for "
|
||||||
@ -481,6 +493,7 @@ PartitionViewStep::onLeave()
|
|||||||
|
|
||||||
QMessageBox::information( m_manualPartitionPage, message, description );
|
QMessageBox::information( m_manualPartitionPage, message, description );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Partition* root_p = m_core->findPartitionByMountPoint( "/" );
|
Partition* root_p = m_core->findPartitionByMountPoint( "/" );
|
||||||
Partition* boot_p = m_core->findPartitionByMountPoint( "/boot" );
|
Partition* boot_p = m_core->findPartitionByMountPoint( "/boot" );
|
||||||
|
Loading…
Reference in New Issue
Block a user