Make the parent in Partition a QPointer.
This also reverts commit dc9e9651ac
.
This commit is contained in:
parent
dc9e9651ac
commit
83787cbdfc
|
@ -79,7 +79,8 @@ Partition::~Partition()
|
|||
// list of children). As a workaround, always remove a partition from its parent here in the dtor.
|
||||
// This presumably fixes 232092, but backporting is too risky until we're sure this doesn't cause
|
||||
// side-effects.
|
||||
parent()->remove(this);
|
||||
if (m_Parent)
|
||||
parent()->remove(this);
|
||||
clearChildren();
|
||||
deleteFileSystem();
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <QStringList>
|
||||
#include <QtGlobal>
|
||||
#include <QPointer>
|
||||
|
||||
class Device;
|
||||
class OperationStack;
|
||||
|
@ -270,7 +271,7 @@ private:
|
|||
|
||||
qint32 m_Number;
|
||||
Partitions m_Children;
|
||||
PartitionNode* m_Parent;
|
||||
QPointer< PartitionNode > m_Parent;
|
||||
FileSystem* m_FileSystem;
|
||||
PartitionRole m_Roles;
|
||||
qint64 m_FirstSector;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "../ops/operation.h"
|
||||
|
||||
#include <QPointer>
|
||||
#include <QString>
|
||||
|
||||
class Device;
|
||||
|
@ -102,7 +101,7 @@ protected:
|
|||
|
||||
private:
|
||||
Device& m_TargetDevice;
|
||||
QPointer< Partition > m_DeletedPartition;
|
||||
Partition* m_DeletedPartition;
|
||||
ShredAction m_ShredAction;
|
||||
Job* m_DeleteFileSystemJob;
|
||||
DeletePartitionJob* m_DeletePartitionJob;
|
||||
|
|
Loading…
Reference in New Issue