Use findPartitionByMountPoint in updateHasRootMountPoint
This commit is contained in:
parent
a335c1cc04
commit
1b64917385
@ -129,17 +129,6 @@ PartitionCoreModule::DeviceInfo::~DeviceInfo()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
PartitionCoreModule::DeviceInfo::hasRootMountPoint() const
|
|
||||||
{
|
|
||||||
for ( auto it = PartitionIterator::begin( device.data() ); it != PartitionIterator::end( device.data() ); ++it )
|
|
||||||
{
|
|
||||||
if ( PartitionInfo::mountPoint( *it ) == "/" )
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PartitionCoreModule::DeviceInfo::forgetChanges()
|
PartitionCoreModule::DeviceInfo::forgetChanges()
|
||||||
{
|
{
|
||||||
@ -338,16 +327,7 @@ PartitionCoreModule::refresh( Device* device )
|
|||||||
void PartitionCoreModule::updateHasRootMountPoint()
|
void PartitionCoreModule::updateHasRootMountPoint()
|
||||||
{
|
{
|
||||||
bool oldValue = m_hasRootMountPoint;
|
bool oldValue = m_hasRootMountPoint;
|
||||||
|
m_hasRootMountPoint = findPartitionByMountPoint( "/" );
|
||||||
m_hasRootMountPoint = false;
|
|
||||||
for ( auto deviceInfo : m_deviceInfos )
|
|
||||||
{
|
|
||||||
if ( deviceInfo->hasRootMountPoint() )
|
|
||||||
{
|
|
||||||
m_hasRootMountPoint = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( oldValue != m_hasRootMountPoint )
|
if ( oldValue != m_hasRootMountPoint )
|
||||||
hasRootMountPointChanged( m_hasRootMountPoint );
|
hasRootMountPointChanged( m_hasRootMountPoint );
|
||||||
|
@ -90,8 +90,6 @@ private:
|
|||||||
QScopedPointer< PartitionModel > partitionModel;
|
QScopedPointer< PartitionModel > partitionModel;
|
||||||
QList< Calamares::job_ptr > jobs;
|
QList< Calamares::job_ptr > jobs;
|
||||||
|
|
||||||
bool hasRootMountPoint() const;
|
|
||||||
|
|
||||||
void forgetChanges();
|
void forgetChanges();
|
||||||
};
|
};
|
||||||
QList< DeviceInfo* > m_deviceInfos;
|
QList< DeviceInfo* > m_deviceInfos;
|
||||||
|
Loading…
Reference in New Issue
Block a user