From 275b68cf5c72a835cba657e2ff6d818fc8145a84 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 17 Dec 2015 19:10:47 +0100 Subject: [PATCH] The PartitionModel should be owned by the PCM. --- src/modules/partition/gui/ChoicePage.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 174f3e000..fe0544e67 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -574,8 +574,7 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice ) previewLabels->setCustomNewRootLabel( Calamares::Branding::instance()-> string( Calamares::Branding::BootloaderEntryName ) ); - PartitionModel* model = new PartitionModel( preview ); - model->init( currentDevice, m_core->osproberEntries() ); + PartitionModel* model = m_core->partitionModelForDevice( selectedDevice() ); // The QObject parents tree is meaningful for memory management here, // see qDeleteAll above.