diff options
author | Lukáš Lalinský <lalinsky@gmail.com> | 2009-01-04 21:34:57 +0100 |
---|---|---|
committer | Lukáš Lalinský <lalinsky@gmail.com> | 2009-01-04 21:34:57 +0100 |
commit | 051269b7647640da2b44738ee4678553ac3e0692 (patch) | |
tree | d334a903c40b44a8a84197db00089e9557dc4c6d /src | |
parent | 04e8dd0b1972fde90d711ccf7ca28130a4adc3b6 (diff) | |
download | dbmodel-051269b7647640da2b44738ee4678553ac3e0692.tar.xz |
Delete connectors in Line's destructor
Diffstat (limited to 'src')
-rw-r--r-- | src/diagramitem.cpp | 4 | ||||
-rw-r--r-- | src/diagramitem.h | 1 | ||||
-rw-r--r-- | src/line.cpp | 6 | ||||
-rw-r--r-- | src/line.h | 1 |
4 files changed, 12 insertions, 0 deletions
diff --git a/src/diagramitem.cpp b/src/diagramitem.cpp index a85f4ff..dffeba9 100644 --- a/src/diagramitem.cpp +++ b/src/diagramitem.cpp @@ -27,6 +27,10 @@ DiagramItem::DiagramItem(DiagramItem *parent) { } +DiagramItem::~DiagramItem() +{ +} + DiagramDocument * DiagramItem::document() const { diff --git a/src/diagramitem.h b/src/diagramitem.h index f597a48..06e6126 100644 --- a/src/diagramitem.h +++ b/src/diagramitem.h @@ -38,6 +38,7 @@ public: DiagramDocument *document() const; DiagramItem(DiagramItem *parent = 0); + virtual ~DiagramItem(); static const char *staticTypeName() { return ""; } virtual const char *typeName() = 0; diff --git a/src/line.cpp b/src/line.cpp index 1691820..133c02f 100644 --- a/src/line.cpp +++ b/src/line.cpp @@ -28,6 +28,12 @@ Line::Line(DiagramItem *parent) setZValue(1.0); } +Line::~Line() +{ + delete m_connectors[0]; + delete m_connectors[1]; +} + Connector * Line::connector(int index) const { @@ -28,6 +28,7 @@ class Line : public DiagramItem public: Line(DiagramItem *parent = 0); + ~Line(); enum LineLayout { |