Commit 98da69cf authored by hausmann's avatar hausmann

When populating the context menu with sub-menus don't add sub-menus if they're empty.

Signed-off-by: Nikolas


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7f28eacb
......@@ -190,8 +190,12 @@ QMenu *QWebPagePrivate::createContextMenu(const WebCore::ContextMenu *webcoreMen
break;
case WebCore::SubmenuType: {
QMenu *subMenu = createContextMenu(webcoreMenu, item.platformSubMenu());
subMenu->setTitle(item.title());
menu->addAction(subMenu->menuAction());
if (!subMenu->actions().isEmpty()) {
subMenu->setTitle(item.title());
menu->addAction(subMenu->menuAction());
} else {
delete subMenu;
}
break;
}
}
......
2007-11-10 Simon Hausmann <hausmann@kde.org>
Reviewed by Nikolas.
When populating the context menu with sub-menus don't add sub-menus if they're empty.
* Api/qwebpage.cpp:
(QWebPagePrivate::createContextMenu):
2007-11-10 Simon Hausmann <hausmann@kde.org>
Reviewed by Nikolas.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment