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 | |||
@@ -14,17 +14,18 @@ | |||
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "todoplugin.h" | 17 | #include "todoplugin.h" |
18 | #include "todopluginconfig.h" | 18 | #include "todopluginconfig.h" |
19 | 19 | ||
20 | TodolistPlugin::TodolistPlugin() { | 20 | TodolistPlugin::TodolistPlugin() |
21 | : m_widget(0l) | ||
22 | { | ||
21 | } | 23 | } |
22 | 24 | ||
23 | TodolistPlugin::~TodolistPlugin() { | 25 | TodolistPlugin::~TodolistPlugin() { |
24 | delete (TodolistPluginWidget*)m_widget; | ||
25 | } | 26 | } |
26 | 27 | ||
27 | QString TodolistPlugin::pluginName() const { | 28 | QString TodolistPlugin::pluginName() const { |
28 | return QObject::tr( "Todolist plugin" ); | 29 | return QObject::tr( "Todolist plugin" ); |
29 | } | 30 | } |
30 | 31 | ||
@@ -34,15 +35,13 @@ double TodolistPlugin::versionNumber() const { | |||
34 | 35 | ||
35 | QString TodolistPlugin::pixmapNameWidget() const { | 36 | QString TodolistPlugin::pixmapNameWidget() const { |
36 | return "todo/TodoList"; | 37 | return "todo/TodoList"; |
37 | } | 38 | } |
38 | 39 | ||
39 | QWidget* TodolistPlugin::widget( QWidget *wid ) { | 40 | QWidget* TodolistPlugin::widget( QWidget *wid ) { |
40 | if(!m_widget) { | ||
41 | m_widget = new TodolistPluginWidget( wid, "Todolist" ); | 41 | m_widget = new TodolistPluginWidget( wid, "Todolist" ); |
42 | } | ||
43 | return m_widget; | 42 | return m_widget; |
44 | } | 43 | } |
45 | 44 | ||
46 | QString TodolistPlugin::pixmapNameConfig() const { | 45 | QString TodolistPlugin::pixmapNameConfig() const { |
47 | return "todo/TodoList"; | 46 | return "todo/TodoList"; |
48 | } | 47 | } |