Diffstat (limited to 'core/pim/today/plugins/todolist/todoplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 9 |
1 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 | |||
@@ -8,47 +8,46 @@ | |||
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
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 | ||
31 | double TodolistPlugin::versionNumber() const { | 32 | double TodolistPlugin::versionNumber() const { |
32 | return 0.9; | 33 | return 0.9; |
33 | } | 34 | } |
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 | } |
49 | 48 | ||
50 | TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { | 49 | TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { |
51 | return new TodolistPluginConfig( wid , "Todolist" ); | 50 | return new TodolistPluginConfig( wid , "Todolist" ); |
52 | } | 51 | } |
53 | 52 | ||
54 | QString TodolistPlugin::appName() const { | 53 | QString TodolistPlugin::appName() const { |