From f610d888cc1738ed94cc6286db65b6b40e8e1c4e Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 22 Jan 2013 23:37:27 +0100 Subject: History page, added ability to remove items from --- src/history/historymanager.cpp | 12 ++++++++++++ src/history/historymanager.h | 1 + 2 files changed, 13 insertions(+) (limited to 'src/history') diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp index 2b84ddc8..2fab9cf1 100644 --- a/src/history/historymanager.cpp +++ b/src/history/historymanager.cpp @@ -244,6 +244,18 @@ void HistoryManager::removeHistoryEntry(const KUrl &url, const QString &title) } +void HistoryManager::removeHistoryLocationEntry(int value) +{ + if (value < 0) + return; + + HistoryItem item = m_history.at(value); + m_lastSavedUrl.clear(); + m_history.removeOne(item); + emit entryRemoved(item); +} + + QList HistoryManager::find(const QString &text) { QList list; diff --git a/src/history/historymanager.h b/src/history/historymanager.h index c1e9f1cd..a618c672 100644 --- a/src/history/historymanager.h +++ b/src/history/historymanager.h @@ -123,6 +123,7 @@ public: bool historyContains(const QString &url) const; void addHistoryEntry(const KUrl &url, const QString &title); void removeHistoryEntry(const KUrl &url, const QString &title = QString()); + void removeHistoryLocationEntry(int value); QList find(const QString &text); -- cgit v1.2.1