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/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 | 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 @@ -67,3 +67,4 @@ void AddressBookPlugin::refresh() { - m_abWidget->refresh( NULL ); + if(m_abWidget) + m_abWidget->refresh( 0l ); } @@ -72,3 +73,4 @@ 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 @@ -36,4 +36,4 @@ public: - void reinitialize(); public slots: + void reinitialize(); void refresh( const Opie::OPimContactAccess* db ); 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 @@ -25,3 +25,2 @@ class DateBookEvent: public Opie::Ui::OClickableLabel { - Q_OBJECT 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 @@ -20,3 +20,3 @@ -DatebookPlugin::DatebookPlugin() { +DatebookPlugin::DatebookPlugin() { } @@ -24,3 +24,2 @@ DatebookPlugin::DatebookPlugin() { DatebookPlugin::~DatebookPlugin() { - delete (DatebookPluginWidget*)m_widget; } @@ -40,5 +39,3 @@ 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 @@ -24,4 +24,2 @@ -#include <qguardedptr.h> - class DatebookPlugin : public TodayPluginObject { @@ -44,3 +42,3 @@ public: 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 @@ -24,3 +24,2 @@ MailPlugin::MailPlugin() { MailPlugin::~MailPlugin() { - delete (MailPluginWidget*)m_widget; } @@ -40,5 +39,3 @@ 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 @@ -25,7 +25,2 @@ -#include <qwidget.h> -#include <qguardedptr.h> - - - @@ -49,3 +44,3 @@ public: private: - QGuardedPtr<MailPluginWidget> m_widget; + MailPluginWidget* m_widget; }; 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 @@ -19,3 +19,5 @@ -TodolistPlugin::TodolistPlugin() { +TodolistPlugin::TodolistPlugin() + : m_widget(0l) +{ } @@ -23,3 +25,2 @@ TodolistPlugin::TodolistPlugin() { TodolistPlugin::~TodolistPlugin() { - delete (TodolistPluginWidget*)m_widget; } @@ -39,5 +40,3 @@ 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 @@ -48,3 +48,3 @@ public: private: - QGuardedPtr<TodolistPluginWidget> m_widget; + TodolistPluginWidget* m_widget; }; |