Turn PartitionCoreModule::refreshPartitionModel() into refresh() and make it public

This commit is contained in:
Aurélien Gâteau 2014-07-17 14:26:40 +02:00
parent 5c594f8dd7
commit 4e49f59333
2 changed files with 7 additions and 9 deletions

View file

@ -192,8 +192,7 @@ PartitionCoreModule::createPartitionTable( Device* device, PartitionTable::Table
job->updatePreview();
info->jobs << Calamares::job_ptr( job );
refreshPartitionModel( device );
updateHasRootMountPoint();
refresh( device );
}
void
@ -205,11 +204,9 @@ PartitionCoreModule::createPartition( Device* device, Partition* partition )
CreatePartitionJob* job = new CreatePartitionJob( device, partition );
job->updatePreview();
refreshPartitionModel( device );
deviceInfo->jobs << Calamares::job_ptr( job );
updateHasRootMountPoint();
refresh( device );
}
void
@ -265,8 +262,7 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition )
jobs << Calamares::job_ptr( job );
}
refreshPartitionModel( device );
updateHasRootMountPoint();
refresh( device );
}
QList< Calamares::job_ptr >
@ -293,11 +289,12 @@ PartitionCoreModule::dumpQueue() const
}
void
PartitionCoreModule::refreshPartitionModel( Device* device )
PartitionCoreModule::refresh( Device* device )
{
auto model = partitionModelForDevice( device );
Q_ASSERT( model );
model->reload();
updateHasRootMountPoint();
}
void PartitionCoreModule::updateHasRootMountPoint()

View file

@ -62,6 +62,8 @@ public:
return m_hasRootMountPoint;
}
void refresh( Device* device );
Q_SIGNALS:
void hasRootMountPointChanged( bool value );
@ -88,7 +90,6 @@ private:
void listDevices();
void updateHasRootMountPoint();
void refreshPartitionModel( Device* device );
void dumpQueue() const;