From e4fc5fd9e48e38e9087e730ef4135ce6f95565a3 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 4 Oct 2009 11:45:30 +0200 Subject: not show the search menu if there are no search engines available. Ronny Scholz patch (thanks) --- src/webview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/webview.cpp b/src/webview.cpp index 417da6bc..f828fdac 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -188,7 +188,12 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) searchMenu->addAction(a); } } - menu.addAction(searchMenu); + + if (!searchMenu->menu()->isEmpty()) + { + menu.addAction(searchMenu); + } + menu.addSeparator(); // TODO Add translate, show translation } -- cgit v1.2.1