mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 09:25:36 -04:00
[partition] Including CreateVolumeGroupDialog and fixing some of its GUI issues.
This commit is contained in:
parent
d15ce56c97
commit
208d58bcd9
12 changed files with 409 additions and 37 deletions
|
@ -273,6 +273,10 @@ PartitionCoreModule::createVolumeGroup( QString &vgName,
|
|||
QVector< const Partition* > pvList,
|
||||
qint32 peSize )
|
||||
{
|
||||
// Appending '_' character in case of repeated VG name
|
||||
while ( hasVGwithThisName( vgName ) )
|
||||
vgName.append('_');
|
||||
|
||||
CreateVolumeGroupJob* job = new CreateVolumeGroupJob( vgName, pvList, peSize );
|
||||
job->updatePreview();
|
||||
|
||||
|
@ -283,6 +287,10 @@ PartitionCoreModule::createVolumeGroup( QString &vgName,
|
|||
|
||||
DeviceInfo* deviceInfo = new DeviceInfo( device );
|
||||
|
||||
deviceInfo->partitionModel->init( device, osproberEntries() );
|
||||
|
||||
m_deviceModel->addDevice( device );
|
||||
|
||||
m_deviceInfos << deviceInfo;
|
||||
deviceInfo->jobs << Calamares::job_ptr( job );
|
||||
|
||||
|
@ -458,12 +466,37 @@ PartitionCoreModule::efiSystemPartitions() const
|
|||
return m_efiSystemPartitions;
|
||||
}
|
||||
|
||||
QList< const Partition* >
|
||||
QVector< const Partition* >
|
||||
PartitionCoreModule::lvmPVs() const
|
||||
{
|
||||
return m_lvmPVs;
|
||||
}
|
||||
|
||||
bool
|
||||
PartitionCoreModule::hasVGwithThisName( const QString& name ) const
|
||||
{
|
||||
for ( DeviceInfo* d : m_deviceInfos )
|
||||
if ( dynamic_cast<LvmDevice*>(d->device.data()) &&
|
||||
d->device.data()->name() == name)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
PartitionCoreModule::isInVG( const Partition *partition ) const
|
||||
{
|
||||
for ( DeviceInfo* d : m_deviceInfos )
|
||||
{
|
||||
LvmDevice* vg = dynamic_cast<LvmDevice*>( d->device.data() );
|
||||
|
||||
if ( vg && vg->physicalVolumes().contains( partition ))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
PartitionCoreModule::dumpQueue() const
|
||||
{
|
||||
|
@ -503,6 +536,8 @@ PartitionCoreModule::refresh()
|
|||
updateIsDirty();
|
||||
m_bootLoaderModel->update();
|
||||
|
||||
scanForLVMPVs();
|
||||
|
||||
//FIXME: this should be removed in favor of
|
||||
// proper KPM support for EFI
|
||||
if ( PartUtils::isEfiSystem() )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue