summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2012-12-13 17:19:38 +0100
committerMontel Laurent <montel@kde.org>2012-12-13 17:19:38 +0100
commitec057ac312b23048372877ce716f96f10b383c9a (patch)
tree837797f20d4340108a28204b14be5c0d6ec5c10d
parentReadd my patch to remove mem leak (diff)
downloadrekonq-ec057ac312b23048372877ce716f96f10b383c9a.tar.xz
Fix other mem leak
-rw-r--r--src/urlbar/urlbar.cpp14
-rw-r--r--src/webtab/webview.cpp2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index b980cd95..1e572ea6 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -451,17 +451,17 @@ void UrlBar::contextMenuEvent(QContextMenuEvent* event)
const bool clipboardFilled = !rApp->clipboard()->text().isEmpty();
// Cut
- KAction *a = KStandardAction::cut(this, SLOT(cut()), this);
+ KAction *a = KStandardAction::cut(this, SLOT(cut()), &menu);
a->setEnabled(hasSelectedText());
menu.addAction(a);
// Copy
- a = KStandardAction::copy(this, SLOT(copy()), this);
+ a = KStandardAction::copy(this, SLOT(copy()), &menu);
a->setEnabled(hasSelectedText());
menu.addAction(a);
// Paste
- a = KStandardAction::paste(this, SLOT(paste()), this);
+ a = KStandardAction::paste(this, SLOT(paste()), &menu);
a->setEnabled(clipboardFilled);
menu.addAction(a);
@@ -469,19 +469,19 @@ void UrlBar::contextMenuEvent(QContextMenuEvent* event)
const QString clipboardText = rApp->clipboard()->text();
if (isValidURL(clipboardText) || clipboardText.isEmpty())
{
- a = new KAction(i18n("Paste && Go"), this);
+ a = new KAction(i18n("Paste && Go"), &menu);
connect(a, SIGNAL(triggered(bool)), this, SLOT(pasteAndGo()));
}
else
{
- a = new KAction(i18n("Paste && Search"), this);
+ a = new KAction(i18n("Paste && Search"), &menu);
connect(a, SIGNAL(triggered(bool)), this, SLOT(pasteAndSearch()));
}
a->setEnabled(clipboardFilled);
menu.addAction(a);
// Delete
- a = new KAction(KIcon("edit-delete"), i18n("Delete"), this);
+ a = new KAction(KIcon("edit-delete"), i18n("Delete"), &menu);
connect(a, SIGNAL(triggered(bool)), this, SLOT(delSlot()));
a->setEnabled(hasSelectedText());
menu.addAction(a);
@@ -489,7 +489,7 @@ void UrlBar::contextMenuEvent(QContextMenuEvent* event)
menu.addSeparator();
// Select All
- a = KStandardAction::selectAll(this, SLOT(selectAll()), this);
+ a = KStandardAction::selectAll(this, SLOT(selectAll()), &menu);
a->setEnabled(!text().isEmpty());
menu.addAction(a);
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index ac82bb87..8d99eeb2 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -551,7 +551,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
if (m_contextMenuHitResult.isContentEditable())
{
menu.addSeparator();
- a = KStandardAction::spelling(this, SLOT(spellCheck()), this);
+ a = KStandardAction::spelling(this, SLOT(spellCheck()), &menu);
menu.addAction(a);
}