-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 | ||||
-rw-r--r-- | examples/todayplugin/exampleplugin.cpp | 10 | ||||
-rw-r--r-- | examples/todayplugin/exampleplugin.h | 8 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortuneplugin.cpp | 2 | ||||
-rw-r--r-- | noncore/todayplugins/fortune/fortuneplugin.h | 3 |
13 files changed, 22 insertions, 44 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 { bool AddressBookPlugin::excludeFromRefresh() const { return false; } 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 @@ -31,14 +31,14 @@ class AddressBookPluginWidget : public QWidget { Q_OBJECT public: AddressBookPluginWidget( QWidget *parent, const char *name ); ~AddressBookPluginWidget(); - void reinitialize(); public slots: + void reinitialize(); void refresh( const Opie::OPimContactAccess* db ); protected slots: void startAddressBook(); 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 @@ #include <opie2/oclickablelabel.h> #include <qpe/datebookdb.h> class DateBookEvent: public Opie::Ui::OClickableLabel { - Q_OBJECT public: DateBookEvent( const EffectiveEvent &ev, QWidget* parent = 0, 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 @@ -15,17 +15,16 @@ ***************************************************************************/ #include "datebookplugin.h" #include "datebookpluginconfig.h" -DatebookPlugin::DatebookPlugin() { +DatebookPlugin::DatebookPlugin() { } DatebookPlugin::~DatebookPlugin() { - delete (DatebookPluginWidget*)m_widget; } QString DatebookPlugin::pluginName() const { return QObject::tr( "Datebook plugin"); } @@ -35,15 +34,13 @@ double DatebookPlugin::versionNumber() const { QString DatebookPlugin::pixmapNameWidget() const { return "datebook/DateBook"; } QWidget* DatebookPlugin::widget( QWidget* wid ) { - if(!m_widget) { - m_widget = new DatebookPluginWidget( wid, "Datebook" ); - } + m_widget = new DatebookPluginWidget( wid, "Datebook" ); return m_widget; } QString DatebookPlugin::pixmapNameConfig() const { return "datebook/DateBook"; } 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 @@ #include "datebookpluginwidget.h" #include <opie2/oclickablelabel.h> #include <opie2/todayplugininterface.h> -#include <qguardedptr.h> - class DatebookPlugin : public TodayPluginObject { public: DatebookPlugin(); ~DatebookPlugin(); @@ -39,11 +37,11 @@ public: QString appName() const; bool excludeFromRefresh() const; void refresh(); void reinitialize(); private: - QGuardedPtr<DatebookPluginWidget> m_widget; + DatebookPluginWidget *m_widget; }; #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 @@ MailPlugin::MailPlugin() { m_widget = 0l; } MailPlugin::~MailPlugin() { - delete (MailPluginWidget*)m_widget; } QString MailPlugin::pluginName() const { return QObject::tr( "Mail plugin" ); } @@ -35,15 +34,13 @@ double MailPlugin::versionNumber() const { QString MailPlugin::pixmapNameWidget() const { return "opiemail/desktopicon"; } QWidget* MailPlugin::widget( QWidget * wid ) { - if(!m_widget) { - m_widget = new MailPluginWidget( wid, "Datebook" ); - } + m_widget = new MailPluginWidget( wid, "Datebook" ); return m_widget; } QString MailPlugin::pixmapNameConfig() const { 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 @@ #include "mailpluginwidget.h" #include <opie2/todayplugininterface.h> #include <opie2/todayconfigwidget.h> -#include <qwidget.h> -#include <qguardedptr.h> - - - class MailPlugin : public TodayPluginObject { public: MailPlugin(); ~MailPlugin(); @@ -44,10 +39,10 @@ public: QString appName() const; bool excludeFromRefresh() const; void refresh(); 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 @@ -14,17 +14,18 @@ * * ***************************************************************************/ #include "todoplugin.h" #include "todopluginconfig.h" -TodolistPlugin::TodolistPlugin() { +TodolistPlugin::TodolistPlugin() + : m_widget(0l) +{ } TodolistPlugin::~TodolistPlugin() { - delete (TodolistPluginWidget*)m_widget; } QString TodolistPlugin::pluginName() const { return QObject::tr( "Todolist plugin" ); } @@ -34,15 +35,13 @@ double TodolistPlugin::versionNumber() const { QString TodolistPlugin::pixmapNameWidget() const { return "todo/TodoList"; } QWidget* TodolistPlugin::widget( QWidget *wid ) { - if(!m_widget) { - m_widget = new TodolistPluginWidget( wid, "Todolist" ); - } + m_widget = new TodolistPluginWidget( wid, "Todolist" ); return m_widget; } QString TodolistPlugin::pixmapNameConfig() const { return "todo/TodoList"; } 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: QString appName() const; bool excludeFromRefresh() const; void refresh(); void reinitialize(); private: - QGuardedPtr<TodolistPluginWidget> m_widget; + TodolistPluginWidget* m_widget; }; #endif diff --git a/examples/todayplugin/exampleplugin.cpp b/examples/todayplugin/exampleplugin.cpp index 94a5836..41bbfe2 100644 --- a/examples/todayplugin/exampleplugin.cpp +++ b/examples/todayplugin/exampleplugin.cpp @@ -3,18 +3,18 @@ * * email : harlekin@handhelds.org * */ #include "exampleplugin.h" -ExamplePlugin::ExamplePlugin() { - m_widget = 0l; +ExamplePlugin::ExamplePlugin() + : m_widget(0l) +{ } ExamplePlugin::~ExamplePlugin() { - delete (ExamplePluginWidget*)m_widget; } QString ExamplePlugin::pluginName() const { return QObject::tr( "Example plugin" ); } @@ -25,15 +25,13 @@ double ExamplePlugin::versionNumber() const { // this sets the image that will be shown on the left side of the plugin QString ExamplePlugin::pixmapNameWidget() const { return QString::fromLatin1("Tux"); } QWidget* ExamplePlugin::widget( QWidget * wid ) { - if(!m_widget) { - m_widget = new ExamplePluginWidget( wid, "Example" ); - } + m_widget = new ExamplePluginWidget( wid, "Example" ); return m_widget; } // that would be the icon of the config widget in todays config view QString ExamplePlugin::pixmapNameConfig() const { diff --git a/examples/todayplugin/exampleplugin.h b/examples/todayplugin/exampleplugin.h index 94f5b37..90d3485 100644 --- a/examples/todayplugin/exampleplugin.h +++ b/examples/todayplugin/exampleplugin.h @@ -6,15 +6,12 @@ */ #ifndef EXAMPLE_PLUGIN_H #define EXAMPLE_PLUGIN_H -#include <qwidget.h> -#include <qguardedptr.h> - #include <opie2/todayplugininterface.h> #include <opie2/todayconfigwidget.h> #include "examplepluginwidget.h" // implementation of the today plugin interface @@ -31,12 +28,11 @@ public: QString pixmapNameConfig() const; TodayConfigWidget* configWidget(QWidget *); QString appName() const; bool excludeFromRefresh() const; void refresh(); void reinitialize(); - - private: - QGuardedPtr<ExamplePluginWidget> m_widget; +private: + ExamplePluginWidget *m_widget; }; #endif diff --git a/noncore/todayplugins/fortune/fortuneplugin.cpp b/noncore/todayplugins/fortune/fortuneplugin.cpp index 69d2c45..4461219 100644 --- a/noncore/todayplugins/fortune/fortuneplugin.cpp +++ b/noncore/todayplugins/fortune/fortuneplugin.cpp @@ -53,13 +53,13 @@ QString FortunePlugin::pixmapNameConfig() const return "Fortune"; } TodayConfigWidget* FortunePlugin::configWidget( QWidget* /*wid*/ ) { // return new FortunePluginConfig( wid , "Fortune" ); - return NULL; + return 0l; } QString FortunePlugin::appName() const { return "fortune"; } diff --git a/noncore/todayplugins/fortune/fortuneplugin.h b/noncore/todayplugins/fortune/fortuneplugin.h index 9b590ad..91bd981 100644 --- a/noncore/todayplugins/fortune/fortuneplugin.h +++ b/noncore/todayplugins/fortune/fortuneplugin.h @@ -17,15 +17,12 @@ #ifndef FORTUNE_PLUGIN_H #define FORTUNE_PLUGIN_H #include <opie2/oclickablelabel.h> #include <opie2/todayplugininterface.h> -#include <qstring.h> -#include <qwidget.h> - class FortunePlugin : public TodayPluginObject { public: FortunePlugin(); ~FortunePlugin(); |