mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 18:35:37 -04:00
[libcalamares] Move partition-finding into libcalamares
- Moved from KPMHelpers to the partition service - The is-partition and find-partition methods that make sense in general, are moved to libcalamares.
This commit is contained in:
parent
3930826e93
commit
4b3bb54320
14 changed files with 221 additions and 94 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "GlobalStorage.h"
|
||||
#include "JobQueue.h"
|
||||
#include "partition/PartitionIterator.h"
|
||||
#include "partition/PartitionQuery.h"
|
||||
#include "utils/CalamaresUtilsSystem.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
|
@ -37,10 +38,12 @@
|
|||
#include <kpmcore/core/device.h>
|
||||
#include <kpmcore/core/partition.h>
|
||||
|
||||
|
||||
#include <QProcess>
|
||||
#include <QTemporaryDir>
|
||||
|
||||
using CalamaresUtils::Partition::isPartitionFreeSpace;
|
||||
using CalamaresUtils::Partition::isPartitionNew;
|
||||
|
||||
namespace PartUtils
|
||||
{
|
||||
|
||||
|
@ -133,7 +136,7 @@ canBeResized( Partition* candidate )
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( KPMHelpers::isPartitionFreeSpace( candidate ) )
|
||||
if ( isPartitionFreeSpace( candidate ) )
|
||||
{
|
||||
cDebug() << Logger::SubEntry << "NO, partition is free space";
|
||||
return false;
|
||||
|
@ -206,7 +209,7 @@ canBeResized( PartitionCoreModule* core, const QString& partitionPath )
|
|||
for ( int i = 0; i < dm->rowCount(); ++i )
|
||||
{
|
||||
Device* dev = dm->deviceForIndex( dm->index( i ) );
|
||||
Partition* candidate = KPMHelpers::findPartitionByPath( { dev }, partitionWithOs );
|
||||
Partition* candidate = CalamaresUtils::Partition::findPartitionByPath( { dev }, partitionWithOs );
|
||||
if ( candidate )
|
||||
{
|
||||
return canBeResized( candidate );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue