|
|
@ -17,6 +17,39 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#include <PartitionInfo.h>
|
|
|
|
#include <PartitionInfo.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CalaPM
|
|
|
|
|
|
|
|
#include <core/partition.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Qt
|
|
|
|
|
|
|
|
#include <QVariant>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const char* MOUNT_POINT_PROPERTY = "_calamares_mountPoint";
|
|
|
|
|
|
|
|
static const char* FORMAT_PROPERTY = "_calamares_format";
|
|
|
|
|
|
|
|
|
|
|
|
PartitionInfo::PartitionInfo( Partition* p )
|
|
|
|
PartitionInfo::PartitionInfo( Partition* p )
|
|
|
|
: partition( p )
|
|
|
|
: partition( p )
|
|
|
|
{}
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString
|
|
|
|
|
|
|
|
PartitionInfo::mountPoint( Partition* partition )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return partition->property( MOUNT_POINT_PROPERTY ).toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
|
|
PartitionInfo::setMountPoint( Partition* partition, const QString& value )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
partition->setProperty( MOUNT_POINT_PROPERTY, value );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
|
|
|
PartitionInfo::format( Partition* partition )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return partition->property( FORMAT_PROPERTY ).toBool();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
|
|
PartitionInfo::setFormat( Partition* partition, bool value )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
partition->setProperty( FORMAT_PROPERTY, value );
|
|
|
|
|
|
|
|
}
|
|
|
|