Diffstat (limited to 'core/pim/today/plugins/todolist/todoplugin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 7 |
1 files changed, 3 insertions, 4 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 @@ -16,13 +16,14 @@ #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" ); @@ -36,11 +37,9 @@ QString TodolistPlugin::pixmapNameWidget() const { return "todo/TodoList"; } QWidget* TodolistPlugin::widget( QWidget *wid ) { - if(!m_widget) { m_widget = new TodolistPluginWidget( wid, "Todolist" ); - } return m_widget; } QString TodolistPlugin::pixmapNameConfig() const { |