Diffstat (limited to 'core/pim/today/plugins/todolist') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 7 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 2 |
2 files changed, 4 insertions, 5 deletions
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 @@ -18,9 +18,10 @@ #include "todopluginconfig.h" -TodolistPlugin::TodolistPlugin() { +TodolistPlugin::TodolistPlugin() + : m_widget(0l) +{ } TodolistPlugin::~TodolistPlugin() { - delete (TodolistPluginWidget*)m_widget; } @@ -38,7 +39,5 @@ QString TodolistPlugin::pixmapNameWidget() const { QWidget* TodolistPlugin::widget( QWidget *wid ) { - if(!m_widget) { 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 @@ -47,5 +47,5 @@ public: private: - QGuardedPtr<TodolistPluginWidget> m_widget; + TodolistPluginWidget* m_widget; }; |