author | zecke <zecke> | 2004-09-12 20:28:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-12 20:28:36 (UTC) |
commit | 90aaa298cc69522e88e1f81ade7d5259131b1544 (patch) (side-by-side diff) | |
tree | 86bdb0a2bb94938754ba94f2ded9dc6ec5fb5207 /core | |
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 | 6 | ||||
-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 | 7 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.h | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 5 | ||||
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.h | 7 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 9 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 2 |
9 files changed, 15 insertions, 28 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 @@ -65,10 +65,12 @@ bool AddressBookPlugin::excludeFromRefresh() const { void AddressBookPlugin::refresh() { - m_abWidget->refresh( NULL ); + if(m_abWidget) + m_abWidget->refresh( 0l ); } void AddressBookPlugin::reinitialize() { - m_abWidget->reinitialize(); + if(m_abWidget) + m_abWidget->reinitialize(); } 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 @@ -34,8 +34,8 @@ public: AddressBookPluginWidget( QWidget *parent, const char *name ); ~AddressBookPluginWidget(); - void reinitialize(); public slots: + void reinitialize(); void refresh( const Opie::OPimContactAccess* db ); protected slots: 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 @@ -23,7 +23,6 @@ class DateBookEvent: public Opie::Ui::OClickableLabel { - Q_OBJECT public: 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 @@ -18,11 +18,10 @@ #include "datebookpluginconfig.h" -DatebookPlugin::DatebookPlugin() { +DatebookPlugin::DatebookPlugin() { } DatebookPlugin::~DatebookPlugin() { - delete (DatebookPluginWidget*)m_widget; } QString DatebookPlugin::pluginName() const { @@ -38,9 +37,7 @@ QString DatebookPlugin::pixmapNameWidget() const { } QWidget* DatebookPlugin::widget( QWidget* wid ) { - if(!m_widget) { - m_widget = new DatebookPluginWidget( wid, "Datebook" ); - } + m_widget = new DatebookPluginWidget( wid, "Datebook" ); return m_widget; } 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 @@ -22,8 +22,6 @@ #include <opie2/oclickablelabel.h> #include <opie2/todayplugininterface.h> -#include <qguardedptr.h> - class DatebookPlugin : public TodayPluginObject { public: @@ -42,7 +40,7 @@ public: void reinitialize(); private: - QGuardedPtr<DatebookPluginWidget> m_widget; + DatebookPluginWidget *m_widget; }; 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 @@ -22,7 +22,6 @@ MailPlugin::MailPlugin() { } MailPlugin::~MailPlugin() { - delete (MailPluginWidget*)m_widget; } QString MailPlugin::pluginName() const { @@ -38,9 +37,7 @@ QString MailPlugin::pixmapNameWidget() const { } QWidget* MailPlugin::widget( QWidget * wid ) { - if(!m_widget) { - m_widget = new MailPluginWidget( wid, "Datebook" ); - } + m_widget = new MailPluginWidget( wid, "Datebook" ); return m_widget; } 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 @@ -23,11 +23,6 @@ #include <opie2/todayplugininterface.h> #include <opie2/todayconfigwidget.h> -#include <qwidget.h> -#include <qguardedptr.h> - - - class MailPlugin : public TodayPluginObject { @@ -47,7 +42,7 @@ public: void reinitialize(); private: - QGuardedPtr<MailPluginWidget> m_widget; + MailPluginWidget* m_widget; }; #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 @@ -17,11 +17,12 @@ #include "todoplugin.h" #include "todopluginconfig.h" -TodolistPlugin::TodolistPlugin() { +TodolistPlugin::TodolistPlugin() + : m_widget(0l) +{ } TodolistPlugin::~TodolistPlugin() { - delete (TodolistPluginWidget*)m_widget; } QString TodolistPlugin::pluginName() const { @@ -37,9 +38,7 @@ QString TodolistPlugin::pixmapNameWidget() const { } QWidget* TodolistPlugin::widget( QWidget *wid ) { - if(!m_widget) { - m_widget = new TodolistPluginWidget( wid, "Todolist" ); - } + m_widget = new TodolistPluginWidget( wid, "Todolist" ); return m_widget; } 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 @@ -46,7 +46,7 @@ public: void reinitialize(); private: - QGuardedPtr<TodolistPluginWidget> m_widget; + TodolistPluginWidget* m_widget; }; #endif |