mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04:00
[partition] move parseSizeString() function to PartUtils
In order to be able to parse partition size strings using the same functions across the partition module, the parseSizeString() function is exported to the PartUtils namespace. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
This commit is contained in:
parent
d289b1bed4
commit
90eb6afd52
4 changed files with 78 additions and 67 deletions
|
@ -20,6 +20,8 @@
|
|||
#ifndef PARTITIONLAYOUT_H
|
||||
#define PARTITIONLAYOUT_H
|
||||
|
||||
#include "core/PartUtils.h"
|
||||
|
||||
#include "Typedefs.h"
|
||||
|
||||
// KPMcore
|
||||
|
@ -36,24 +38,15 @@ class PartitionLayout
|
|||
{
|
||||
public:
|
||||
|
||||
enum SizeUnit
|
||||
{
|
||||
Percent = 0,
|
||||
Byte,
|
||||
KiB,
|
||||
MiB,
|
||||
GiB
|
||||
};
|
||||
|
||||
struct PartitionEntry
|
||||
{
|
||||
QString partLabel;
|
||||
QString partMountPoint;
|
||||
FileSystem::Type partFileSystem = FileSystem::Unknown;
|
||||
double partSize = 0.0L;
|
||||
SizeUnit partSizeUnit = Percent;
|
||||
PartUtils::SizeUnit partSizeUnit = PartUtils::SizeUnit::Percent;
|
||||
double partMinSize = 0.0L;
|
||||
SizeUnit partMinSizeUnit = Percent;
|
||||
PartUtils::SizeUnit partMinSizeUnit = PartUtils::SizeUnit::Percent;
|
||||
|
||||
/// @brief All-zeroes PartitionEntry
|
||||
PartitionEntry() {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue