mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-02 20:05:37 -04:00
[partition] Make private struct type private
- no need for the definition to be in public header, move to implementation - while here, sort the members and private methods - add a makeJob() to add jobs to the queue
This commit is contained in:
parent
c2929e93b3
commit
22ba3cc62d
2 changed files with 42 additions and 29 deletions
|
@ -106,6 +106,39 @@ private:
|
|||
|
||||
|
||||
//- DeviceInfo ---------------------------------------------
|
||||
/**
|
||||
* Owns the Device, PartitionModel and the jobs
|
||||
*/
|
||||
struct PartitionCoreModule::DeviceInfo
|
||||
{
|
||||
DeviceInfo( Device* );
|
||||
~DeviceInfo();
|
||||
QScopedPointer< Device > device;
|
||||
QScopedPointer< PartitionModel > partitionModel;
|
||||
const QScopedPointer< Device > immutableDevice;
|
||||
|
||||
// To check if LVM VGs are deactivated
|
||||
bool isAvailable;
|
||||
|
||||
void forgetChanges();
|
||||
bool isDirty() const;
|
||||
|
||||
const Calamares::JobList& jobs() const { return m_jobs; }
|
||||
|
||||
template< typename Job, typename... Args >
|
||||
Calamares::Job* makeJob(Args... a)
|
||||
{
|
||||
auto* job = new Job( device.get(), a... );
|
||||
job->updatePreview();
|
||||
m_jobs << Calamares::job_ptr( job );
|
||||
return job;
|
||||
}
|
||||
|
||||
private:
|
||||
Calamares::JobList m_jobs;
|
||||
};
|
||||
|
||||
|
||||
PartitionCoreModule::DeviceInfo::DeviceInfo( Device* _device )
|
||||
: device( _device )
|
||||
, partitionModel( new PartitionModel )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue