From 51452f8478edb77ed1eef61adff314c2d239712f Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 10 Feb 2003 22:02:47 +0000 Subject: make use of QGuardedPtr --- (limited to 'core') 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 @@ -23,11 +23,10 @@ DatebookPlugin::DatebookPlugin() { - m_widget = 0; } DatebookPlugin::~DatebookPlugin() { - delete m_widget; + delete (DatebookPluginWidget*)m_widget; } QString DatebookPlugin::pluginName() const { 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 @@ -18,6 +18,7 @@ #define DATEBOOK_PLUGIN_H #include +#include #include #include @@ -42,7 +43,7 @@ public: void refresh(); private: - DatebookPluginWidget *m_widget; + QGuardedPtr m_widget; }; 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 @@ -21,11 +21,10 @@ TodolistPlugin::TodolistPlugin() { - m_widget = 0l; } TodolistPlugin::~TodolistPlugin() { - delete m_widget; + delete (TodolistPluginWidget*)m_widget; } QString TodolistPlugin::pluginName() const { 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 @@ -18,6 +18,7 @@ #define TODOLIST_PLUGIN_H #include +#include #include #include @@ -43,7 +44,7 @@ public: void refresh(); private: - TodolistPluginWidget *m_widget; + QGuardedPtr m_widget; }; #endif -- cgit v0.9.0.2