diff options
author | deva <deva> | 2008-09-04 12:25:09 +0000 |
---|---|---|
committer | deva <deva> | 2008-09-04 12:25:09 +0000 |
commit | 26dc58fb696ac1f96e018fbae7083d1ba2a1a55a (patch) | |
tree | 8fd6e55c2428c883d023677134b7a6e558246546 /client/macrowindow.cc | |
parent | 4dd7add65ed2648e7c139df3138e489f8dbd8e43 (diff) |
Made macrowindow clean up proprely when closed (thus terminating dangling db connections through dbwidget).
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r-- | client/macrowindow.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index b0eab65..5ef342d 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -61,6 +61,21 @@ MacroWindow::MacroWindow(QDomNode &xml_doc) MacroWindow::~MacroWindow() { delete lua; + + QVector< Widget* >::iterator i = widgets.begin(); + while (i != widgets.end()) { + Widget* w = *i; + delete w; + i++; + } + + QVector< Widget* >::iterator j = auxwidgets.begin(); + while (j != auxwidgets.end()) { + Widget* w = *j; + delete w; + j++; + } + } void MacroWindow::initMacro(QDomNode &node) @@ -200,7 +215,7 @@ void MacroWindow::cont(QString name) bool MacroWindow::isClosed() { - return isclosed; + return isclosed || mainwidget->isVisible() == false; } Widget *MacroWindow::getWidget(QString name) |