Merge branch 'gportay/kpmcore-partition-type'
This commit is contained in:
commit
6921398ba3
|
@ -35,7 +35,7 @@ set(VERSION_MAJOR "4")
|
|||
set(VERSION_MINOR "1")
|
||||
set(VERSION_RELEASE "0")
|
||||
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE})
|
||||
set(SOVERSION "9")
|
||||
set(SOVERSION "10")
|
||||
add_definitions(-D'VERSION="${VERSION}"') #"
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
|
|
@ -125,6 +125,9 @@ public:
|
|||
const QString& label() const {
|
||||
return m_Label; /**< @return the GPT Partition label */
|
||||
}
|
||||
const QString& type() const {
|
||||
return m_Type; /**< @return the GPT Partition type */
|
||||
}
|
||||
const QString& uuid() const {
|
||||
return m_UUID; /**< @return the GPT Partition UUID */
|
||||
}
|
||||
|
@ -210,6 +213,9 @@ public:
|
|||
void setLabel(const QString& s) {
|
||||
m_Label = s; /**< @param s the new label */
|
||||
}
|
||||
void setType(const QString& s) {
|
||||
m_Type = s; /**< @param s the new type */
|
||||
}
|
||||
void setUUID(const QString& s) {
|
||||
m_UUID = s; /**< @param s the new UUID */
|
||||
}
|
||||
|
@ -266,6 +272,7 @@ private:
|
|||
qint64 m_LastSector;
|
||||
QString m_DevicePath;
|
||||
QString m_Label;
|
||||
QString m_Type;
|
||||
QString m_UUID;
|
||||
QString m_PartitionPath;
|
||||
QString m_MountPoint;
|
||||
|
|
|
@ -215,7 +215,9 @@ static QLatin1String getPartitionType(FileSystem::Type t, PartitionTable::TableT
|
|||
|
||||
bool SfdiskPartitionTable::setPartitionSystemType(Report& report, const Partition& partition)
|
||||
{
|
||||
QString partitionType = getPartitionType(partition.fileSystem().type(), m_device->partitionTable()->type());
|
||||
QString partitionType = partition.type();
|
||||
if (partitionType.isEmpty())
|
||||
partitionType = getPartitionType(partition.fileSystem().type(), m_device->partitionTable()->type());
|
||||
if (partitionType.isEmpty())
|
||||
return true;
|
||||
ExternalCommand sfdiskCommand(report, QStringLiteral("sfdisk"), { QStringLiteral("--part-type"), m_device->deviceNode(), QString::number(partition.number()),
|
||||
|
|
Loading…
Reference in New Issue