|
|
@ -56,9 +56,7 @@ PartitionCoreModule::DeviceInfo::addInfoForPartition( PartitionInfo* partitionIn
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Q_ASSERT( partitionInfo );
|
|
|
|
Q_ASSERT( partitionInfo );
|
|
|
|
if ( infoForPartition( partitionInfo->partition ) )
|
|
|
|
if ( infoForPartition( partitionInfo->partition ) )
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
m_partitionInfoHash.insert( partitionInfo->partition, partitionInfo );
|
|
|
|
m_partitionInfoHash.insert( partitionInfo->partition, partitionInfo );
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -75,10 +73,8 @@ PartitionCoreModule::DeviceInfo::hasRootMountPoint() const
|
|
|
|
for ( auto info : m_partitionInfoHash )
|
|
|
|
for ( auto info : m_partitionInfoHash )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( info->mountPoint == "/" )
|
|
|
|
if ( info->mountPoint == "/" )
|
|
|
|
{
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -97,9 +93,7 @@ PartitionCoreModule::PartitionCoreModule( QObject* parent )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// FIXME: Should be done at startup
|
|
|
|
// FIXME: Should be done at startup
|
|
|
|
if ( !CalaPM::init() )
|
|
|
|
if ( !CalaPM::init() )
|
|
|
|
{
|
|
|
|
|
|
|
|
qFatal( "Failed to init CalaPM" );
|
|
|
|
qFatal( "Failed to init CalaPM" );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CoreBackend* backend = CoreBackendManager::self()->backend();
|
|
|
|
CoreBackend* backend = CoreBackendManager::self()->backend();
|
|
|
|
auto devices = backend->scanDevices();
|
|
|
|
auto devices = backend->scanDevices();
|
|
|
@ -221,9 +215,7 @@ PartitionCoreModule::jobs() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QList< Calamares::job_ptr > lst;
|
|
|
|
QList< Calamares::job_ptr > lst;
|
|
|
|
for ( auto info : m_deviceInfos )
|
|
|
|
for ( auto info : m_deviceInfos )
|
|
|
|
{
|
|
|
|
|
|
|
|
lst << info->jobs;
|
|
|
|
lst << info->jobs;
|
|
|
|
}
|
|
|
|
|
|
|
|
return lst;
|
|
|
|
return lst;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -235,11 +227,9 @@ PartitionCoreModule::dumpQueue() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cDebug() << "Device:" << info->device->name();
|
|
|
|
cDebug() << "Device:" << info->device->name();
|
|
|
|
for ( auto job : info->jobs )
|
|
|
|
for ( auto job : info->jobs )
|
|
|
|
{
|
|
|
|
|
|
|
|
cDebug() << job->prettyName();
|
|
|
|
cDebug() << job->prettyName();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
PartitionCoreModule::refreshPartitionModel( Device* device )
|
|
|
|
PartitionCoreModule::refreshPartitionModel( Device* device )
|
|
|
@ -264,10 +254,8 @@ void PartitionCoreModule::updateHasRootMountPoint()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( oldValue != m_hasRootMountPoint )
|
|
|
|
if ( oldValue != m_hasRootMountPoint )
|
|
|
|
{
|
|
|
|
|
|
|
|
hasRootMountPointChanged( m_hasRootMountPoint );
|
|
|
|
hasRootMountPointChanged( m_hasRootMountPoint );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PartitionCoreModule::DeviceInfo*
|
|
|
|
PartitionCoreModule::DeviceInfo*
|
|
|
|
PartitionCoreModule::infoForDevice( Device* device ) const
|
|
|
|
PartitionCoreModule::infoForDevice( Device* device ) const
|
|
|
@ -275,9 +263,7 @@ PartitionCoreModule::infoForDevice( Device* device ) const
|
|
|
|
for ( auto deviceInfo : m_deviceInfos )
|
|
|
|
for ( auto deviceInfo : m_deviceInfos )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( deviceInfo->device.data() == device )
|
|
|
|
if ( deviceInfo->device.data() == device )
|
|
|
|
{
|
|
|
|
|
|
|
|
return deviceInfo;
|
|
|
|
return deviceInfo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nullptr;
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|