You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calamares-packaging/debian/patches/avoid-heap-wrangling.patch

39 lines
1.6 KiB

Description: [partition] Avoid heap-wrangling
The CreatePartitionDialog doesn't need to be on the heap, it's modal here.
Avoid QPointer weirdness as well.
Author: Adriaan de Groot <groot@kde.org>
Origin: upstream
Applied-Upstream: commit:b4cefff975138e621d9a9437891c9d1b09616b74
Last-Update: 2019-04-11
--- a/src/modules/partition/gui/PartitionPage.cpp
+++ b/src/modules/partition/gui/PartitionPage.cpp
@@ -376,18 +376,18 @@ PartitionPage::onCreateClicked()
if ( !checkCanCreate( model->device() ) )
return;
- QPointer< CreatePartitionDialog > dlg = new CreatePartitionDialog( model->device(),
- partition->parent(),
- nullptr,
- getCurrentUsedMountpoints(),
- this );
- dlg->initFromFreeSpace( partition );
- if ( dlg->exec() == QDialog::Accepted )
+ CreatePartitionDialog dlg(
+ model->device(),
+ partition->parent(),
+ nullptr,
+ getCurrentUsedMountpoints(),
+ this );
+ dlg.initFromFreeSpace( partition );
+ if ( dlg.exec() == QDialog::Accepted )
{
- Partition* newPart = dlg->createPartition();
- m_core->createPartition( model->device(), newPart, dlg->newFlags() );
+ Partition* newPart = dlg.createPartition();
+ m_core->createPartition( model->device(), newPart, dlg.newFlags() );
}
- delete dlg;
}
void