logic: don't use shared_ptr for QtGraphNode and QtGraphEdge anymore

* fixes crashes on events to deleted Qt elements
This commit is contained in:
Eberhard Graether
2017-11-17 22:30:48 +01:00
parent 634601b4b6
commit b887a4a89e
15 changed files with 159 additions and 179 deletions
@@ -22,8 +22,8 @@ class QtGraphEdge
public:
QtGraphEdge(
const std::weak_ptr<QtGraphNode>& owner,
const std::weak_ptr<QtGraphNode>& target,
QtGraphNode* owner,
QtGraphNode* target,
const Edge* data,
size_t weight,
bool isActive,
@@ -32,8 +32,8 @@ public:
const Edge* getData() const;
std::weak_ptr<QtGraphNode> getOwner();
std::weak_ptr<QtGraphNode> getTarget();
QtGraphNode* getOwner();
QtGraphNode* getTarget();
void updateLine();
@@ -72,8 +72,8 @@ private:
const Edge* m_data;
std::weak_ptr<QtGraphNode> m_owner;
std::weak_ptr<QtGraphNode> m_target;
QtGraphNode* m_owner;
QtGraphNode* m_target;
QGraphicsItem* m_child;