mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-02 03:45:38 -04:00
[partition] Start sanitizing the Jobs on a Device
- having a struct with an obtuse API for adding jobs-that-need-to-happen- to-this-device is just not good for maintainability. - break the build by making things private.
This commit is contained in:
parent
c63d4ad2cc
commit
c2929e93b3
2 changed files with 9 additions and 3 deletions
|
@ -120,7 +120,7 @@ PartitionCoreModule::DeviceInfo::~DeviceInfo() {}
|
|||
void
|
||||
PartitionCoreModule::DeviceInfo::forgetChanges()
|
||||
{
|
||||
jobs.clear();
|
||||
m_jobs.clear();
|
||||
for ( auto it = PartitionIterator::begin( device.data() ); it != PartitionIterator::end( device.data() ); ++it )
|
||||
{
|
||||
PartitionInfo::reset( *it );
|
||||
|
@ -132,16 +132,18 @@ PartitionCoreModule::DeviceInfo::forgetChanges()
|
|||
bool
|
||||
PartitionCoreModule::DeviceInfo::isDirty() const
|
||||
{
|
||||
if ( !jobs.isEmpty() )
|
||||
if ( !m_jobs.isEmpty() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
for ( auto it = PartitionIterator::begin( device.data() ); it != PartitionIterator::end( device.data() ); ++it )
|
||||
{
|
||||
if ( PartitionInfo::isDirty( *it ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue