author | zecke <zecke> | 2003-02-10 22:02:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-10 22:02:47 (UTC) |
commit | 51452f8478edb77ed1eef61adff314c2d239712f (patch) (side-by-side diff) | |
tree | bc301c77096a7c681623806f7409755ceaafac39 | |
parent | eb9be7ada3de060d8c5ce52590bd91120ed5e1bd (diff) | |
download | opie-51452f8478edb77ed1eef61adff314c2d239712f.zip opie-51452f8478edb77ed1eef61adff314c2d239712f.tar.gz opie-51452f8478edb77ed1eef61adff314c2d239712f.tar.bz2 |
make use of QGuardedPtr
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.cpp | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/datebook/datebookplugin.h | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 3 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 3 |
4 files changed, 6 insertions, 6 deletions
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp index 2ac7d01..f095478 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.cpp +++ b/core/pim/today/plugins/datebook/datebookplugin.cpp @@ -10,37 +10,36 @@ * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "datebookevent.h" #include "datebookplugin.h" #include "datebookpluginconfig.h" DatebookPlugin::DatebookPlugin() { - m_widget = 0; } DatebookPlugin::~DatebookPlugin() { - delete m_widget; + delete (DatebookPluginWidget*)m_widget; } QString DatebookPlugin::pluginName() const { return QObject::tr( "Datebook plugin"); } double DatebookPlugin::versionNumber() const { return 1.0; } QString DatebookPlugin::pixmapNameWidget() const { return "DateBook"; } QWidget* DatebookPlugin::widget( QWidget* wid ) { if(!m_widget) { diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h index 644a614..eb7a401 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.h +++ b/core/pim/today/plugins/datebook/datebookplugin.h @@ -5,45 +5,46 @@ * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef DATEBOOK_PLUGIN_H #define DATEBOOK_PLUGIN_H #include <qstring.h> +#include <qguardedptr.h> #include <qwidget.h> #include <opie/oclickablelabel.h> #include <opie/todayplugininterface.h> #include "datebookpluginwidget.h" class DatebookPlugin : public TodayPluginObject { public: DatebookPlugin(); ~DatebookPlugin(); QString pluginName() const; double versionNumber() const; QString pixmapNameWidget() const; QWidget* widget( QWidget *); QString pixmapNameConfig() const; TodayConfigWidget* configWidget( QWidget *); QString appName() const; bool excludeFromRefresh() const; void refresh(); private: - DatebookPluginWidget *m_widget; + QGuardedPtr<DatebookPluginWidget> m_widget; }; #endif diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp index 1238f92..bff0eba 100644 --- a/core/pim/today/plugins/todolist/todoplugin.cpp +++ b/core/pim/today/plugins/todolist/todoplugin.cpp @@ -8,37 +8,36 @@ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "todoplugin.h" #include "todopluginconfig.h" TodolistPlugin::TodolistPlugin() { - m_widget = 0l; } TodolistPlugin::~TodolistPlugin() { - delete m_widget; + delete (TodolistPluginWidget*)m_widget; } QString TodolistPlugin::pluginName() const { return QObject::tr( "Todolist plugin" ); } double TodolistPlugin::versionNumber() const { return 0.9; } QString TodolistPlugin::pixmapNameWidget() const { return "TodoList"; } QWidget* TodolistPlugin::widget( QWidget *wid ) { if(!m_widget) { diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h index 6106d0c..7a2235c 100644 --- a/core/pim/today/plugins/todolist/todoplugin.h +++ b/core/pim/today/plugins/todolist/todoplugin.h @@ -5,45 +5,46 @@ * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TODOLIST_PLUGIN_H #define TODOLIST_PLUGIN_H #include <qstring.h> +#include <qguardedptr.h> #include <qwidget.h> #include <opie/tododb.h> #include <opie/oclickablelabel.h> #include <opie/todayplugininterface.h> #include "todopluginwidget.h" class TodolistPlugin : public TodayPluginObject { public: TodolistPlugin(); ~TodolistPlugin(); QString pluginName() const; double versionNumber() const; QString pixmapNameWidget() const; QWidget* widget(QWidget *); QString pixmapNameConfig() const; TodayConfigWidget* configWidget(QWidget *); QString appName() const; bool excludeFromRefresh() const; void refresh(); private: - TodolistPluginWidget *m_widget; + QGuardedPtr<TodolistPluginWidget> m_widget; }; #endif |