[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kio/bookmarks
From:       Daniel Teske <teske () squorn ! de>
Date:       2007-08-31 22:23:59
Message-ID: 1188599039.640383.6635.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 707062 by teske:

Remove closestBookmark().
It wasn't part fo the KDE3 API, is a partly broekn implementation and
nowhere called.



 M  +0 -24     kbookmark.cc  
 M  +0 -16     kbookmark.h  


--- trunk/KDE/kdelibs/kio/bookmarks/kbookmark.cc #707061:707062
@@ -247,30 +247,6 @@
     return urlList;
 }
 
-KBookmark KBookmarkGroup::closestBookmark( const KUrl& url ) const
-{
-    KBookmark bookmark = first();
-    KBookmark foundBookmark;
-    int maxLength = 0;
-
-    // Search the bookmark which is equal to the URL or at least is a parent URL.
-    // If there are more than one possible parent URL candidates, choose the bookmark
-    // which covers the bigger range of the URL.
-    while (!bookmark.isNull()) {
-        const KUrl bookmarkUrl = bookmark.url();
-        if (bookmarkUrl.isParentOf(url)) {
-            const int length = bookmarkUrl.prettyUrl().length();
-            if (length > maxLength) {
-                foundBookmark = bookmark;
-                maxLength = length;
-            }
-        }
-        bookmark = next(bookmark);
-    }
-
-    return foundBookmark;
-}
-
 //////
 
 KBookmark::KBookmark()
--- trunk/KDE/kdelibs/kio/bookmarks/kbookmark.h #707061:707062
@@ -368,22 +368,6 @@
      */
     QList<KUrl> groupUrlList() const;
 
-    /**
-     * Returns the closest bookmark for the URL \a url.
-     * The closest bookmark is defined as bookmark which is equal to
-     * the URL or at least is a parent URL. If there are more than
-     * one possible parent URL candidates, the bookmark which covers
-     * the bigger range of the URL is returned.
-     *
-     * Example: the url is '/home/peter/Documents/Music'.
-     * Available bookmarks are:
-     * - /home/peter
-     * - /home/peter/Documents
-     *
-     * The returned bookmark will the one for '/home/peter/Documents'.
-     */
-    KBookmark closestBookmark( const KUrl& url ) const;
-
 protected:
     QDomElement nextKnownTag( const QDomElement &start, bool goNext ) const;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic