videocollection/tsrc/stubs/inc/hbwidget.h
changeset 36 8aed59de29f9
parent 34 bbb98528c666
child 63 4707a0db12f6
--- a/videocollection/tsrc/stubs/inc/hbwidget.h	Thu Apr 01 23:32:44 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbwidget.h	Fri Apr 16 18:13:14 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;
 };