diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-05-04 09:19:16 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-05-04 09:19:16 +0200 |
commit | 7ea1b6add7ebef4d475801e15e89992e734617c1 (patch) | |
tree | a083886be1493a1616ef380e8ccad40e09e49e1f /src/history | |
parent | Fix conflicts (diff) | |
download | rekonq-7ea1b6add7ebef4d475801e15e89992e734617c1.tar.xz |
Memory leaks fixes
first bunch
Diffstat (limited to 'src/history')
-rw-r--r-- | src/history/historymanager.cpp | 6 | ||||
-rw-r--r-- | src/history/historypanel.cpp | 23 |
2 files changed, 15 insertions, 14 deletions
diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp index 8dc7e049..e7e80841 100644 --- a/src/history/historymanager.cpp +++ b/src/history/historymanager.cpp @@ -94,6 +94,12 @@ HistoryManager::~HistoryManager() { m_saveTimer->saveIfNeccessary(); delete m_completion; + + delete m_saveTimer; + + delete m_historyModel; + delete m_historyFilterModel; + delete m_historyTreeModel; } diff --git a/src/history/historypanel.cpp b/src/history/historypanel.cpp index 4c4982e9..c8009afd 100644 --- a/src/history/historypanel.cpp +++ b/src/history/historypanel.cpp @@ -122,44 +122,39 @@ void HistoryPanel::setup() void HistoryPanel::contextMenuItem(const QPoint &pos) { - KMenu *menu = new KMenu(this); + KMenu menu; KAction* action; action = new KAction(KIcon("tab-new"), i18n("Open"), this); connect(action, SIGNAL(triggered()), m_treeView, SLOT(openInCurrentTab())); - menu->addAction(action); + menu.addAction(action); action = new KAction(KIcon("tab-new"), i18n("Open in New Tab"), this); connect(action, SIGNAL(triggered()), m_treeView, SLOT(openInNewTab())); - menu->addAction(action); + menu.addAction(action); action = new KAction(KIcon("window-new"), i18n("Open in New Window"), this); connect(action, SIGNAL(triggered()), m_treeView, SLOT(openInNewWindow())); - menu->addAction(action); + menu.addAction(action); action = new KAction(KIcon("edit-copy"), i18n("Copy Link Address"), this); connect(action, SIGNAL(triggered()), m_treeView, SLOT(copyToClipboard())); - menu->addAction(action); + menu.addAction(action); - if (!menu) - return; - menu->popup(m_treeView->mapToGlobal(pos)); + menu.exec(m_treeView->mapToGlobal(pos)); } void HistoryPanel::contextMenuGroup(const QPoint &pos) { - KMenu *menu = new KMenu(this); + KMenu menu; KAction* action; action = new KAction(KIcon("tab-new"), i18n("Open Folder in Tabs"), this); connect(action, SIGNAL(triggered()), this, SLOT(openAll())); + menu.addAction(action); - menu->addAction(action); - - if (!menu) - return; - menu->popup(m_treeView->mapToGlobal(pos)); + menu.exec(m_treeView->mapToGlobal(pos)); } |