From 83d440f37e92c8f0709ee897aff47b1ed28a1214 Mon Sep 17 00:00:00 2001
From: Teo Mrnjavac <teo@kde.org>
Date: Thu, 10 Mar 2016 13:16:18 +0100
Subject: [PATCH] Add note.

---
 src/modules/partition/gui/ChoicePage.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp
index 39492bc818..38e5ba77f7 100644
--- a/src/modules/partition/gui/ChoicePage.cpp
+++ b/src/modules/partition/gui/ChoicePage.cpp
@@ -578,6 +578,14 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current,
         {
             m_core->revertDevice( selectedDevice() );
         }
+
+        // TODO: get the selected partition in the immutable model with PartitionPtrRole,
+        //       check KPMHelpers::isPartitionFreeSpace, if true then don't replace but
+        //       just m_core->createPartition for the same first/last sector as the
+        //       free space "partition" in the immutable model.
+        //       Also set parent correctly (see PartitionActions::doReplacePartition)
+        //       as well as mount point and format.
+
         // We can't use the PartitionPtrRole because we need to make changes to the
         // main DeviceModel, not the immutable copy.
         QString partPath = current.data( PartitionModel::PartitionPathRole ).toString();
-- 
GitLab