summaryrefslogtreecommitdiff
path: root/examples/todayplugin/exampleplugin.cpp
Unidiff
Diffstat (limited to 'examples/todayplugin/exampleplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/todayplugin/exampleplugin.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/todayplugin/exampleplugin.cpp b/examples/todayplugin/exampleplugin.cpp
index 94a5836..41bbfe2 100644
--- a/examples/todayplugin/exampleplugin.cpp
+++ b/examples/todayplugin/exampleplugin.cpp
@@ -6,12 +6,12 @@
6 */ 6 */
7#include "exampleplugin.h" 7#include "exampleplugin.h"
8 8
9ExamplePlugin::ExamplePlugin() { 9ExamplePlugin::ExamplePlugin()
10 m_widget = 0l; 10 : m_widget(0l)
11{
11} 12}
12 13
13ExamplePlugin::~ExamplePlugin() { 14ExamplePlugin::~ExamplePlugin() {
14 delete (ExamplePluginWidget*)m_widget;
15} 15}
16 16
17QString ExamplePlugin::pluginName() const { 17QString ExamplePlugin::pluginName() const {
@@ -28,9 +28,7 @@ QString ExamplePlugin::pixmapNameWidget() const {
28} 28}
29 29
30QWidget* ExamplePlugin::widget( QWidget * wid ) { 30QWidget* ExamplePlugin::widget( QWidget * wid ) {
31 if(!m_widget) { 31 m_widget = new ExamplePluginWidget( wid, "Example" );
32 m_widget = new ExamplePluginWidget( wid, "Example" );
33 }
34 return m_widget; 32 return m_widget;
35} 33}
36 34