summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2012-12-03 09:27:13 +0100
committerMontel Laurent <montel@kde.org>2012-12-03 09:27:13 +0100
commitc2b3cb7de04b65a788bf5e19b357f2d217a4474a (patch)
treef83dbcdf1bebe831d11a88a15c0db981da3d27e8 /src
parentDon't create menu/action when not necessary (diff)
downloadrekonq-c2b3cb7de04b65a788bf5e19b357f2d217a4474a.tar.xz
Don't leak action (they are leaked until we change page)
Diffstat (limited to 'src')
-rw-r--r--src/webview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 48273fb5..acfea791 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -262,10 +262,10 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
KMenu menu(this);
- KAction *inspectAction = new KAction(KIcon("layer-visible-on"), i18n("Inspect Element"), this);
+ KAction *inspectAction = new KAction(KIcon("layer-visible-on"), i18n("Inspect Element"), &menu);
connect(inspectAction, SIGNAL(triggered(bool)), this, SLOT(inspect()));
- KAction *sendByMailAction = new KAction(this);
+ KAction *sendByMailAction = new KAction(&menu);
sendByMailAction->setIcon(KIcon("mail-send"));
connect(sendByMailAction, SIGNAL(triggered(bool)), this, SLOT(sendByMail()));