This commit is contained in:
Aurélien Gâteau 2014-07-10 18:55:19 +02:00
parent c11fc3a4d2
commit 8d3f197fde
2 changed files with 13 additions and 10 deletions

View File

@ -83,9 +83,8 @@ PartitionCoreModule::createPartition( Device* device, PartitionInfo* partitionIn
CreatePartitionJob* job = new CreatePartitionJob( device, partition ); CreatePartitionJob* job = new CreatePartitionJob( device, partition );
job->updatePreview(); job->updatePreview();
auto partitionModel = m_partitionModelForDeviceHash.value( job->device() ); refreshPartitionModel( device );
Q_ASSERT( partitionModel );
partitionModel->reload();
m_jobs << Calamares::job_ptr( job ); m_jobs << Calamares::job_ptr( job );
if ( partitionInfo->mountPoint == "/" && !m_hasRootMountPoint ) if ( partitionInfo->mountPoint == "/" && !m_hasRootMountPoint )
@ -93,8 +92,6 @@ PartitionCoreModule::createPartition( Device* device, PartitionInfo* partitionIn
m_hasRootMountPoint = true; m_hasRootMountPoint = true;
hasRootMountPointChanged( m_hasRootMountPoint ); hasRootMountPointChanged( m_hasRootMountPoint );
} }
dumpQueue();
} }
void void
@ -143,11 +140,7 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition )
m_jobs << Calamares::job_ptr( job ); m_jobs << Calamares::job_ptr( job );
} }
auto partitionModel = m_partitionModelForDeviceHash.value( device ); refreshPartitionModel( device );
Q_ASSERT( partitionModel );
partitionModel->reload();
dumpQueue();
} }
void void
@ -159,3 +152,11 @@ PartitionCoreModule::dumpQueue() const
cDebug() << job->prettyName(); cDebug() << job->prettyName();
} }
} }
void
PartitionCoreModule::refreshPartitionModel( Device* device )
{
auto model = m_partitionModelForDeviceHash.value( device );
Q_ASSERT( model );
model->reload();
}

View File

@ -79,6 +79,8 @@ private:
void listDevices(); void listDevices();
void refreshPartitionModel( Device* device );
void dumpQueue() const; void dumpQueue() const;
}; };