From 2092ec3c9a0a37553fd061f423df9d29fe55ab80 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 25 Feb 2019 04:36:46 -0500 Subject: [PATCH] [partition] Drop some re-parenting trickery - Can't re-parent across threads easily - If device is made by immutableDeviceCopy(), then it's still owned by the PartitionCoreModule; giving it away to the widget is not a good idea. --- src/modules/partition/gui/ChoicePage.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 7c980cf49..e9cd2e26b 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -882,11 +882,6 @@ ChoicePage::updateDeviceStatePreview() PartitionModel* model = new PartitionModel( m_beforePartitionBarsView ); model->init( deviceBefore, m_core->osproberEntries() ); - // The QObject parents tree is meaningful for memory management here, - // see qDeleteAll above. - deviceBefore->setParent( model ); // Can't reparent across threads - model->setParent( m_beforePartitionBarsView ); - m_beforePartitionBarsView->setModel( model ); m_beforePartitionLabelsView->setModel( model );