summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukáš Lalinský <lalinsky@gmail.com>2009-01-04 21:34:57 +0100
committerLukáš Lalinský <lalinsky@gmail.com>2009-01-04 21:34:57 +0100
commit051269b7647640da2b44738ee4678553ac3e0692 (patch)
treed334a903c40b44a8a84197db00089e9557dc4c6d /src
parent04e8dd0b1972fde90d711ccf7ca28130a4adc3b6 (diff)
downloaddbmodel-051269b7647640da2b44738ee4678553ac3e0692.tar.xz
Delete connectors in Line's destructor
Diffstat (limited to 'src')
-rw-r--r--src/diagramitem.cpp4
-rw-r--r--src/diagramitem.h1
-rw-r--r--src/line.cpp6
-rw-r--r--src/line.h1
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
{
diff --git a/src/line.h b/src/line.h
index b564274..79de959 100644
--- a/src/line.h
+++ b/src/line.h
@@ -28,6 +28,7 @@ class Line : public DiagramItem
public:
Line(DiagramItem *parent = 0);
+ ~Line();
enum LineLayout
{