author | zecke <zecke> | 2004-09-12 20:28:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-12 20:28:36 (UTC) |
commit | 90aaa298cc69522e88e1f81ade7d5259131b1544 (patch) (unidiff) | |
tree | 86bdb0a2bb94938754ba94f2ded9dc6ec5fb5207 /core/pim | |
parent | 00952f16786dcd069820e45df83a00b6c477893b (diff) | |
download | opie-90aaa298cc69522e88e1f81ade7d5259131b1544.zip opie-90aaa298cc69522e88e1f81ade7d5259131b1544.tar.gz opie-90aaa298cc69522e88e1f81ade7d5259131b1544.tar.bz2 |
Follow the defined Ownership and have a maybe not needed
sanity check
-rw-r--r-- | core/pim/today/plugins/addressbook/addressplugin.cpp | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginwidget.h | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookevent.h | 1 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.cpp | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.h | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.h | 7 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 7 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 2 |
9 files changed, 10 insertions, 23 deletions
diff --git a/core/pim/today/plugins/addressbook/addressplugin.cpp b/core/pim/today/plugins/addressbook/addressplugin.cpp index 5d5d34c..263a0c5 100644 --- a/core/pim/today/plugins/addressbook/addressplugin.cpp +++ b/core/pim/today/plugins/addressbook/addressplugin.cpp | |||
@@ -62,13 +62,15 @@ QString AddressBookPlugin::appName() const { | |||
62 | bool AddressBookPlugin::excludeFromRefresh() const { | 62 | bool AddressBookPlugin::excludeFromRefresh() const { |
63 | return false; | 63 | return false; |
64 | } | 64 | } |
65 | 65 | ||
66 | void AddressBookPlugin::refresh() | 66 | void AddressBookPlugin::refresh() |
67 | { | 67 | { |
68 | m_abWidget->refresh( NULL ); | 68 | if(m_abWidget) |
69 | m_abWidget->refresh( 0l ); | ||
69 | } | 70 | } |
70 | 71 | ||
71 | void AddressBookPlugin::reinitialize() | 72 | void AddressBookPlugin::reinitialize() |
72 | { | 73 | { |
74 | if(m_abWidget) | ||
73 | m_abWidget->reinitialize(); | 75 | m_abWidget->reinitialize(); |
74 | } | 76 | } |
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.h b/core/pim/today/plugins/addressbook/addresspluginwidget.h index 25b3098..b42f252 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.h +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.h | |||
@@ -31,14 +31,14 @@ class AddressBookPluginWidget : public QWidget { | |||
31 | Q_OBJECT | 31 | Q_OBJECT |
32 | 32 | ||
33 | public: | 33 | public: |
34 | AddressBookPluginWidget( QWidget *parent, const char *name ); | 34 | AddressBookPluginWidget( QWidget *parent, const char *name ); |
35 | ~AddressBookPluginWidget(); | 35 | ~AddressBookPluginWidget(); |
36 | 36 | ||
37 | void reinitialize(); | ||
38 | public slots: | 37 | public slots: |
38 | void reinitialize(); | ||
39 | void refresh( const Opie::OPimContactAccess* db ); | 39 | void refresh( const Opie::OPimContactAccess* db ); |
40 | 40 | ||
41 | protected slots: | 41 | protected slots: |
42 | void startAddressBook(); | 42 | void startAddressBook(); |
43 | 43 | ||
44 | private: | 44 | private: |
diff --git a/core/pim/today/plugins/datebook/datebookevent.h b/core/pim/today/plugins/datebook/datebookevent.h index 973efe4..7a5843f 100644 --- a/core/pim/today/plugins/datebook/datebookevent.h +++ b/core/pim/today/plugins/datebook/datebookevent.h | |||
@@ -20,13 +20,12 @@ | |||
20 | #include <opie2/oclickablelabel.h> | 20 | #include <opie2/oclickablelabel.h> |
21 | 21 | ||
22 | #include <qpe/datebookdb.h> | 22 | #include <qpe/datebookdb.h> |
23 | 23 | ||
24 | 24 | ||
25 | class DateBookEvent: public Opie::Ui::OClickableLabel { | 25 | class DateBookEvent: public Opie::Ui::OClickableLabel { |
26 | |||
27 | Q_OBJECT | 26 | Q_OBJECT |
28 | 27 | ||
29 | public: | 28 | public: |
30 | DateBookEvent( const EffectiveEvent &ev, | 29 | DateBookEvent( const EffectiveEvent &ev, |
31 | QWidget* parent = 0, | 30 | QWidget* parent = 0, |
32 | bool show_location = 0, | 31 | bool show_location = 0, |
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp index f46806f..892a0ad 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.cpp +++ b/core/pim/today/plugins/datebook/datebookplugin.cpp | |||
@@ -19,13 +19,12 @@ | |||
19 | 19 | ||
20 | 20 | ||
21 | DatebookPlugin::DatebookPlugin() { | 21 | DatebookPlugin::DatebookPlugin() { |
22 | } | 22 | } |
23 | 23 | ||
24 | DatebookPlugin::~DatebookPlugin() { | 24 | DatebookPlugin::~DatebookPlugin() { |
25 | delete (DatebookPluginWidget*)m_widget; | ||
26 | } | 25 | } |
27 | 26 | ||
28 | QString DatebookPlugin::pluginName() const { | 27 | QString DatebookPlugin::pluginName() const { |
29 | return QObject::tr( "Datebook plugin"); | 28 | return QObject::tr( "Datebook plugin"); |
30 | } | 29 | } |
31 | 30 | ||
@@ -35,15 +34,13 @@ double DatebookPlugin::versionNumber() const { | |||
35 | 34 | ||
36 | QString DatebookPlugin::pixmapNameWidget() const { | 35 | QString DatebookPlugin::pixmapNameWidget() const { |
37 | return "datebook/DateBook"; | 36 | return "datebook/DateBook"; |
38 | } | 37 | } |
39 | 38 | ||
40 | QWidget* DatebookPlugin::widget( QWidget* wid ) { | 39 | QWidget* DatebookPlugin::widget( QWidget* wid ) { |
41 | if(!m_widget) { | ||
42 | m_widget = new DatebookPluginWidget( wid, "Datebook" ); | 40 | m_widget = new DatebookPluginWidget( wid, "Datebook" ); |
43 | } | ||
44 | return m_widget; | 41 | return m_widget; |
45 | } | 42 | } |
46 | 43 | ||
47 | QString DatebookPlugin::pixmapNameConfig() const { | 44 | QString DatebookPlugin::pixmapNameConfig() const { |
48 | return "datebook/DateBook"; | 45 | return "datebook/DateBook"; |
49 | } | 46 | } |
diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h index 631d6a3..990c413 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.h +++ b/core/pim/today/plugins/datebook/datebookplugin.h | |||
@@ -19,14 +19,12 @@ | |||
19 | 19 | ||
20 | #include "datebookpluginwidget.h" | 20 | #include "datebookpluginwidget.h" |
21 | 21 | ||
22 | #include <opie2/oclickablelabel.h> | 22 | #include <opie2/oclickablelabel.h> |
23 | #include <opie2/todayplugininterface.h> | 23 | #include <opie2/todayplugininterface.h> |
24 | 24 | ||
25 | #include <qguardedptr.h> | ||
26 | |||
27 | class DatebookPlugin : public TodayPluginObject { | 25 | class DatebookPlugin : public TodayPluginObject { |
28 | 26 | ||
29 | public: | 27 | public: |
30 | DatebookPlugin(); | 28 | DatebookPlugin(); |
31 | ~DatebookPlugin(); | 29 | ~DatebookPlugin(); |
32 | 30 | ||
@@ -39,11 +37,11 @@ public: | |||
39 | QString appName() const; | 37 | QString appName() const; |
40 | bool excludeFromRefresh() const; | 38 | bool excludeFromRefresh() const; |
41 | void refresh(); | 39 | void refresh(); |
42 | void reinitialize(); | 40 | void reinitialize(); |
43 | 41 | ||
44 | private: | 42 | private: |
45 | QGuardedPtr<DatebookPluginWidget> m_widget; | 43 | DatebookPluginWidget *m_widget; |
46 | }; | 44 | }; |
47 | 45 | ||
48 | 46 | ||
49 | #endif | 47 | #endif |
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) { | ||
42 | m_widget = new MailPluginWidget( wid, "Datebook" ); | 40 | 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 |
diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp index 5783814..6cfcbe0 100644 --- a/core/pim/today/plugins/todolist/todoplugin.cpp +++ b/core/pim/today/plugins/todolist/todoplugin.cpp | |||
@@ -14,17 +14,18 @@ | |||
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "todoplugin.h" | 17 | #include "todoplugin.h" |
18 | #include "todopluginconfig.h" | 18 | #include "todopluginconfig.h" |
19 | 19 | ||
20 | TodolistPlugin::TodolistPlugin() { | 20 | TodolistPlugin::TodolistPlugin() |
21 | : m_widget(0l) | ||
22 | { | ||
21 | } | 23 | } |
22 | 24 | ||
23 | TodolistPlugin::~TodolistPlugin() { | 25 | TodolistPlugin::~TodolistPlugin() { |
24 | delete (TodolistPluginWidget*)m_widget; | ||
25 | } | 26 | } |
26 | 27 | ||
27 | QString TodolistPlugin::pluginName() const { | 28 | QString TodolistPlugin::pluginName() const { |
28 | return QObject::tr( "Todolist plugin" ); | 29 | return QObject::tr( "Todolist plugin" ); |
29 | } | 30 | } |
30 | 31 | ||
@@ -34,15 +35,13 @@ double TodolistPlugin::versionNumber() const { | |||
34 | 35 | ||
35 | QString TodolistPlugin::pixmapNameWidget() const { | 36 | QString TodolistPlugin::pixmapNameWidget() const { |
36 | return "todo/TodoList"; | 37 | return "todo/TodoList"; |
37 | } | 38 | } |
38 | 39 | ||
39 | QWidget* TodolistPlugin::widget( QWidget *wid ) { | 40 | QWidget* TodolistPlugin::widget( QWidget *wid ) { |
40 | if(!m_widget) { | ||
41 | m_widget = new TodolistPluginWidget( wid, "Todolist" ); | 41 | m_widget = new TodolistPluginWidget( wid, "Todolist" ); |
42 | } | ||
43 | return m_widget; | 42 | return m_widget; |
44 | } | 43 | } |
45 | 44 | ||
46 | QString TodolistPlugin::pixmapNameConfig() const { | 45 | QString TodolistPlugin::pixmapNameConfig() const { |
47 | return "todo/TodoList"; | 46 | return "todo/TodoList"; |
48 | } | 47 | } |
diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h index 976dbf7..6add53e 100644 --- a/core/pim/today/plugins/todolist/todoplugin.h +++ b/core/pim/today/plugins/todolist/todoplugin.h | |||
@@ -43,10 +43,10 @@ public: | |||
43 | QString appName() const; | 43 | QString appName() const; |
44 | bool excludeFromRefresh() const; | 44 | bool excludeFromRefresh() const; |
45 | void refresh(); | 45 | void refresh(); |
46 | void reinitialize(); | 46 | void reinitialize(); |
47 | 47 | ||
48 | private: | 48 | private: |
49 | QGuardedPtr<TodolistPluginWidget> m_widget; | 49 | TodolistPluginWidget* m_widget; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #endif | 52 | #endif |