videocollection/tsrc/stubs/inc/hbwidget.h
changeset 17 69946d1824c4
parent 15 cf5481c2bc0b
child 63 4707a0db12f6
--- a/videocollection/tsrc/stubs/inc/hbwidget.h	Fri Apr 16 14:59:52 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbwidget.h	Mon May 03 12:32:50 2010 +0300
@@ -17,8 +17,10 @@
 
 #ifndef HBWIDGET_H
 #define HBWIDGET_H
+
 #include <QGraphicsWidget>
 #include <hbnamespace.h>
+#include <hbglobal.h>
 
  /**
  * counter to make sure alloc dealloc match
@@ -33,7 +35,15 @@
     
     virtual ~HbWidget(){initializeCount--;}
     
-    void clearActions() {}
+    void clearActions() 
+    {
+        // Note actions().clear() does not work as actions() returns a copy of the actions list.
+        QList<QAction*> act = actions();
+        QAction* temp;
+        foreach(temp, act) {
+            this->removeAction(temp);
+        }
+    }
     
     static int initializeCount;
 };