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.
|
// 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
|
// This presumably fixes 232092, but backporting is too risky until we're sure this doesn't cause
|
||||||
// side-effects.
|
// side-effects.
|
||||||
parent()->remove(this);
|
if (m_Parent)
|
||||||
|
parent()->remove(this);
|
||||||
clearChildren();
|
clearChildren();
|
||||||
deleteFileSystem();
|
deleteFileSystem();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
class Device;
|
class Device;
|
||||||
class OperationStack;
|
class OperationStack;
|
||||||
|
@ -270,7 +271,7 @@ private:
|
||||||
|
|
||||||
qint32 m_Number;
|
qint32 m_Number;
|
||||||
Partitions m_Children;
|
Partitions m_Children;
|
||||||
PartitionNode* m_Parent;
|
QPointer< PartitionNode > m_Parent;
|
||||||
FileSystem* m_FileSystem;
|
FileSystem* m_FileSystem;
|
||||||
PartitionRole m_Roles;
|
PartitionRole m_Roles;
|
||||||
qint64 m_FirstSector;
|
qint64 m_FirstSector;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include "../ops/operation.h"
|
#include "../ops/operation.h"
|
||||||
|
|
||||||
#include <QPointer>
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class Device;
|
class Device;
|
||||||
|
@ -102,7 +101,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Device& m_TargetDevice;
|
Device& m_TargetDevice;
|
||||||
QPointer< Partition > m_DeletedPartition;
|
Partition* m_DeletedPartition;
|
||||||
ShredAction m_ShredAction;
|
ShredAction m_ShredAction;
|
||||||
Job* m_DeleteFileSystemJob;
|
Job* m_DeleteFileSystemJob;
|
||||||
DeletePartitionJob* m_DeletePartitionJob;
|
DeletePartitionJob* m_DeletePartitionJob;
|
||||||
|
|
Loading…
Reference in New Issue