author | harlekin <harlekin> | 2003-02-11 21:40:34 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-02-11 21:40:34 (UTC) |
commit | e7ebea116b82577d861cba0650a80b12900b2e24 (patch) (side-by-side diff) | |
tree | 95191b284770bc8da81d804cec8b309916de5d73 | |
parent | 39f9441dabcb094be258240f7ec3c53ed038133e (diff) | |
download | opie-e7ebea116b82577d861cba0650a80b12900b2e24.zip opie-e7ebea116b82577d861cba0650a80b12900b2e24.tar.gz opie-e7ebea116b82577d861cba0650a80b12900b2e24.tar.bz2 |
fixing crash which occured when leaving config dialog
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp index a37d506..2a2efd2 100644 --- a/core/pim/today/plugins/mail/mailplugin.cpp +++ b/core/pim/today/plugins/mail/mailplugin.cpp @@ -1,69 +1,69 @@ /* * mailplugin.cpp * * copyright : (c) 2002 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "mailplugin.h" MailPlugin::MailPlugin() { m_widget = 0l; } MailPlugin::~MailPlugin() { - delete m_widget; + delete (MailPluginWidget*)m_widget; } QString MailPlugin::pluginName() const { return QObject::tr( "Mail plugin" ); } double MailPlugin::versionNumber() const { return 0.6; } QString MailPlugin::pixmapNameWidget() const { return "mail/desktopicon"; } QWidget* MailPlugin::widget( QWidget * wid ) { if(!m_widget) { m_widget = new MailPluginWidget( wid, "Datebook" ); } return m_widget; } QString MailPlugin::pixmapNameConfig() const { return 0l; } TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { return 0l; } QString MailPlugin::appName() const { return "mail"; } bool MailPlugin::excludeFromRefresh() const { return false; } void MailPlugin::refresh() { if ( m_widget ) { m_widget->refresh(); } } diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h index 67fac0c..a0f009b 100644 --- a/core/pim/today/plugins/mail/mailplugin.h +++ b/core/pim/today/plugins/mail/mailplugin.h @@ -1,52 +1,53 @@ /* * mailplugin.h * * copyright : (c) 2002 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef MAIL_PLUGIN_H #define MAIL_PLUGIN_H #include <qstring.h> #include <qwidget.h> +#include <qguardedptr.h> #include <opie/tododb.h> #include <opie/oclickablelabel.h> #include <opie/todayplugininterface.h> #include <opie/todayconfigwidget.h> #include "mailpluginwidget.h" class MailPlugin : public TodayPluginObject { public: MailPlugin(); ~MailPlugin(); QString pluginName() const; double versionNumber() const; QString pixmapNameWidget() const; QWidget* widget(QWidget *); QString pixmapNameConfig() const; TodayConfigWidget* configWidget(QWidget *); QString appName() const; bool excludeFromRefresh() const; void refresh(); private: - MailPluginWidget *m_widget; + QGuardedPtr<MailPluginWidget> m_widget; }; #endif |