PartitionCoreModule::revertDevice.
This commit is contained in:
parent
fe5ab75e82
commit
0a0a0d58e0
@ -500,6 +500,30 @@ PartitionCoreModule::revert()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PartitionCoreModule::revertDevice( Device* dev )
|
||||
{
|
||||
DeviceInfo* devInfo = infoForDevice( dev );
|
||||
if ( !devInfo )
|
||||
return;
|
||||
devInfo->forgetChanges();
|
||||
CoreBackend* backend = CoreBackendManager::self()->backend();
|
||||
Device *newDev = backend->scanDevice( devInfo->device->deviceNode() );
|
||||
devInfo->device.reset( newDev );
|
||||
m_deviceModel->swapDevice( dev, newDev );
|
||||
|
||||
QList< Device* > devices;
|
||||
foreach ( auto info, m_deviceInfos )
|
||||
devices.append( info->device.data() );
|
||||
|
||||
m_bootLoaderModel->init( devices );
|
||||
|
||||
devInfo->partitionModel->init( newDev, m_osproberLines );
|
||||
|
||||
updateIsDirty();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PartitionCoreModule::clearJobs()
|
||||
{
|
||||
|
@ -94,6 +94,7 @@ public:
|
||||
QList< Partition* > efiSystemPartitions() const;
|
||||
|
||||
void revert();
|
||||
void revertDevice( Device* dev );
|
||||
|
||||
void clearJobs();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user