Skip to content
Snippets Groups Projects
Commit 2092ec3c authored by Adriaan de Groot's avatar Adriaan de Groot
Browse files

[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.
parent ac652a2b
Branches
Tags
No related merge requests found
...@@ -882,11 +882,6 @@ ChoicePage::updateDeviceStatePreview() ...@@ -882,11 +882,6 @@ ChoicePage::updateDeviceStatePreview()
PartitionModel* model = new PartitionModel( m_beforePartitionBarsView ); PartitionModel* model = new PartitionModel( m_beforePartitionBarsView );
model->init( deviceBefore, m_core->osproberEntries() ); 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_beforePartitionBarsView->setModel( model );
m_beforePartitionLabelsView->setModel( model ); m_beforePartitionLabelsView->setModel( model );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment