***************************************************************************/
#include <QAction>
+#include <QDebug>
#include "actioncollection.h"
}
Action *ActionCollection::addAction(const QString &name, Action *action) {
- QAction *act = addAction(name, action);
+ QAction *act = addAction(name, static_cast<QAction *>(action));
Q_ASSERT(act == action);
return action;
}
_associatedWidgets.clear();
}
+void ActionCollection::associatedWidgetDestroyed(QObject *obj) {
+ _associatedWidgets.removeAll(static_cast<QWidget *>(obj));
+}
+
bool ActionCollection::unlistAction(QAction *action) {
// This might be called with a partly destroyed QAction!