removeIconAction(0) clears the actions

svn path=/trunk/KDE/kdelibs/; revision=1044330
This commit is contained in:
Marco Martin 2009-11-03 13:10:19 +00:00
parent 06d2502d2a
commit 1b945b8aff
2 changed files with 3 additions and 1 deletions

View File

@ -377,7 +377,7 @@ void IconWidget::removeIconAction(QAction *action)
foreach (IconAction *iconAction, d->cornerActions) {
if (found) {
iconAction->setRect(d->actionRect((IconWidgetPrivate::ActionPosition)count));
} else if (iconAction->action() == action) {
} else if (!action || iconAction->action() == action) {
delete iconAction;
d->cornerActions.removeAll(iconAction);
}

View File

@ -173,6 +173,8 @@ public:
/**
* Removes a previously set iconAction. The action will be removed from the widget
* but will not be deleted.
*
* @param the QAction to be removed, if 0 all actions will be removed
*/
void removeIconAction(QAction *action);