-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 5 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.h | 7 |
2 files changed, 2 insertions, 10 deletions
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp index b30d2a2..f590ebb 100644 --- a/core/pim/today/plugins/mail/mailplugin.cpp +++ b/core/pim/today/plugins/mail/mailplugin.cpp | |||
@@ -19,13 +19,12 @@ | |||
19 | 19 | ||
20 | MailPlugin::MailPlugin() { | 20 | MailPlugin::MailPlugin() { |
21 | m_widget = 0l; | 21 | m_widget = 0l; |
22 | } | 22 | } |
23 | 23 | ||
24 | MailPlugin::~MailPlugin() { | 24 | MailPlugin::~MailPlugin() { |
25 | delete (MailPluginWidget*)m_widget; | ||
26 | } | 25 | } |
27 | 26 | ||
28 | QString MailPlugin::pluginName() const { | 27 | QString MailPlugin::pluginName() const { |
29 | return QObject::tr( "Mail plugin" ); | 28 | return QObject::tr( "Mail plugin" ); |
30 | } | 29 | } |
31 | 30 | ||
@@ -35,15 +34,13 @@ double MailPlugin::versionNumber() const { | |||
35 | 34 | ||
36 | QString MailPlugin::pixmapNameWidget() const { | 35 | QString MailPlugin::pixmapNameWidget() const { |
37 | return "opiemail/desktopicon"; | 36 | return "opiemail/desktopicon"; |
38 | } | 37 | } |
39 | 38 | ||
40 | QWidget* MailPlugin::widget( QWidget * wid ) { | 39 | QWidget* MailPlugin::widget( QWidget * wid ) { |
41 | if(!m_widget) { | 40 | m_widget = new MailPluginWidget( wid, "Datebook" ); |
42 | m_widget = new MailPluginWidget( wid, "Datebook" ); | ||
43 | } | ||
44 | return m_widget; | 41 | return m_widget; |
45 | } | 42 | } |
46 | 43 | ||
47 | 44 | ||
48 | QString MailPlugin::pixmapNameConfig() const { | 45 | QString MailPlugin::pixmapNameConfig() const { |
49 | return 0l; | 46 | return 0l; |
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h index 1edffef..1e694bc 100644 --- a/core/pim/today/plugins/mail/mailplugin.h +++ b/core/pim/today/plugins/mail/mailplugin.h | |||
@@ -20,17 +20,12 @@ | |||
20 | 20 | ||
21 | #include "mailpluginwidget.h" | 21 | #include "mailpluginwidget.h" |
22 | 22 | ||
23 | #include <opie2/todayplugininterface.h> | 23 | #include <opie2/todayplugininterface.h> |
24 | #include <opie2/todayconfigwidget.h> | 24 | #include <opie2/todayconfigwidget.h> |
25 | 25 | ||
26 | #include <qwidget.h> | ||
27 | #include <qguardedptr.h> | ||
28 | |||
29 | |||
30 | |||
31 | 26 | ||
32 | class MailPlugin : public TodayPluginObject { | 27 | class MailPlugin : public TodayPluginObject { |
33 | 28 | ||
34 | public: | 29 | public: |
35 | MailPlugin(); | 30 | MailPlugin(); |
36 | ~MailPlugin(); | 31 | ~MailPlugin(); |
@@ -44,10 +39,10 @@ public: | |||
44 | QString appName() const; | 39 | QString appName() const; |
45 | bool excludeFromRefresh() const; | 40 | bool excludeFromRefresh() const; |
46 | void refresh(); | 41 | void refresh(); |
47 | void reinitialize(); | 42 | void reinitialize(); |
48 | 43 | ||
49 | private: | 44 | private: |
50 | QGuardedPtr<MailPluginWidget> m_widget; | 45 | MailPluginWidget* m_widget; |
51 | }; | 46 | }; |
52 | 47 | ||
53 | #endif | 48 | #endif |