summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/composer.cpp
authorleseb <leseb>2002-06-16 16:15:47 (UTC)
committer leseb <leseb>2002-06-16 16:15:47 (UTC)
commitea69cfbbde29fef2f792d1eab702699aada088bf (patch) (side-by-side diff)
tree1b908b905a16deaba7331d2f0b0c844f94235da0 /noncore/unsupported/mail2/composer.cpp
parentd4414131cdf32677e8d54a18827f2e772718c3f7 (diff)
downloadopie-ea69cfbbde29fef2f792d1eab702699aada088bf.zip
opie-ea69cfbbde29fef2f792d1eab702699aada088bf.tar.gz
opie-ea69cfbbde29fef2f792d1eab702699aada088bf.tar.bz2
Fix memory leaks
Diffstat (limited to 'noncore/unsupported/mail2/composer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/composer.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/noncore/unsupported/mail2/composer.cpp b/noncore/unsupported/mail2/composer.cpp
index 82ed117..7f65dba 100644
--- a/noncore/unsupported/mail2/composer.cpp
+++ b/noncore/unsupported/mail2/composer.cpp
@@ -8,2 +8,3 @@
#include <qlabel.h>
+#include <qapplication.h>
@@ -27,3 +28,3 @@ AttachViewItem::AttachViewItem(QListView *parent, Attachment &attachment)
Composer::Composer(QWidget *parent, const char *name, WFlags fl)
- : ComposerBase(parent, name, fl)
+ : ComposerBase(parent, name, fl), _inLoop(false)
{
@@ -45,2 +46,27 @@ Composer::Composer(QWidget *parent, const char *name, WFlags fl)
+Composer::~Composer()
+{
+ hide();
+}
+
+void Composer::hide()
+{
+ QWidget::hide();
+
+ if (_inLoop) {
+ _inLoop = false;
+ qApp->exit_loop();
+ }
+}
+
+void Composer::exec()
+{
+ show();
+
+ if (!_inLoop) {
+ _inLoop = true;
+ qApp->enter_loop();
+ }
+}
+
void Composer::setSendMail(SendMail &sendMail)