From 45ed210192fcab409f1254c364e3ea3c36f5d0e2 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 14 Jul 2016 17:40:58 +0200 Subject: [PATCH] Add OsproberHomePartitionPathRole to PartitionModel. --- src/modules/partition/core/PartitionModel.cpp | 5 +++++ src/modules/partition/core/PartitionModel.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/core/PartitionModel.cpp b/src/modules/partition/core/PartitionModel.cpp index 6e3a2d885..beb7ea633 100644 --- a/src/modules/partition/core/PartitionModel.cpp +++ b/src/modules/partition/core/PartitionModel.cpp @@ -223,6 +223,11 @@ PartitionModel::data( const QModelIndex& index, int role ) const if ( osproberEntry.path == partition->partitionPath() ) return osproberEntry.line; return QVariant(); + case OsproberHomePartitionPathRole: + foreach ( const OsproberEntry& osproberEntry, m_osproberEntries ) + if ( osproberEntry.path == partition->partitionPath() ) + return osproberEntry.homePath; + return QVariant(); // end Osprober roles. default: diff --git a/src/modules/partition/core/PartitionModel.h b/src/modules/partition/core/PartitionModel.h index 77a14f9d5..c792058e7 100644 --- a/src/modules/partition/core/PartitionModel.h +++ b/src/modules/partition/core/PartitionModel.h @@ -77,7 +77,8 @@ public: OsproberNameRole, OsproberPathRole, OsproberCanBeResizedRole, - OsproberRawLineRole + OsproberRawLineRole, + OsproberHomePartitionPathRole }; enum Column