From 85bc196887fbed01187e3830cd28c2500cb01cb2 Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 26 Mar 2007 23:04:43 +0000 Subject: Ported to KBookmarkManager::closestBookmark - which even solves another TODO about code duplication. Improved urlnavigator API to avoid exposing the full QList (api independent from implementation now). svn path=/trunk/KDE/kdebase/apps/; revision=646954 --- src/urlnavigator.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/urlnavigator.cpp') diff --git a/src/urlnavigator.cpp b/src/urlnavigator.cpp index ca3b1789c..aa4c94c69 100644 --- a/src/urlnavigator.cpp +++ b/src/urlnavigator.cpp @@ -166,10 +166,14 @@ KUrl UrlNavigator::url(int index) const return newurl; } -const QList& UrlNavigator::history(int& index) const +UrlNavigator::HistoryElem UrlNavigator::currentHistoryItem() const { - index = m_historyIndex; - return m_history; + return m_history[m_historyIndex]; +} + +int UrlNavigator::historySize() const +{ + return m_history.count(); } void UrlNavigator::goBack() -- cgit v1.3