summaryrefslogtreecommitdiff
path: root/src/history
diff options
context:
space:
mode:
Diffstat (limited to 'src/history')
-rw-r--r--src/history/historymanager.cpp6
-rw-r--r--src/history/historypanel.cpp23
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));
}