summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarksmanager.cpp
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2010-03-24 22:49:57 +0100
committermegabigbug <megabigbug@arrakis.(none)>2010-03-24 22:49:57 +0100
commitf45e39322dd7561bc1cd2756b4c9223bc586425b (patch)
tree38d26c6caf6b03704da504a4a58f45ffe51e92e7 /src/bookmarks/bookmarksmanager.cpp
parentWebPage API cleaning (diff)
downloadrekonq-f45e39322dd7561bc1cd2756b4c9223bc586425b.tar.xz
derivation of the lastbar branch: UltimateLastBar :)
what work ? better themes for list items hide list correctly what doesn't work focus of the qcombobox is lost when a key is pressed move in the list
Diffstat (limited to 'src/bookmarks/bookmarksmanager.cpp')
-rw-r--r--src/bookmarks/bookmarksmanager.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp
index cfe26a55..c97b46af 100644
--- a/src/bookmarks/bookmarksmanager.cpp
+++ b/src/bookmarks/bookmarksmanager.cpp
@@ -161,7 +161,12 @@ BookmarkProvider::BookmarkProvider(QObject *parent)
, m_actionCollection(new KActionCollection(this))
, m_bookmarkMenu(0)
, m_bookmarkToolBar(0)
+ , m_completion(0)
{
+ // take care of the completion object
+ m_completion = new KCompletion;
+ m_completion->setOrder( KCompletion::Weighted );
+
KUrl bookfile = KUrl("~/.kde/share/apps/konqueror/bookmarks.xml"); // share konqueror bookmarks
if (!QFile::exists(bookfile.path()))
@@ -220,6 +225,7 @@ void BookmarkProvider::slotBookmarksChanged(const QString &group, const QString
return;
m_bookmarkToolBar->clear(); // FIXME CRASH
+ m_completion->clear();
KBookmark bookmark = toolBarGroup.first();
while (!bookmark.isNull())
@@ -285,7 +291,8 @@ KAction *BookmarkProvider::fillBookmarkBar(const KBookmark &bookmark)
return a;
}
else
- {
+ {
+ m_completion->addItem(bookmark.url().path());
return new KBookmarkAction(bookmark, m_owner, this);
}
}
@@ -295,3 +302,14 @@ KBookmarkGroup BookmarkProvider::rootGroup()
{
return m_manager->root();
}
+
+KCompletion *BookmarkProvider::completionObject() const
+{
+ return m_completion;
+}
+
+
+KBookmarkManager *BookmarkProvider::bookmarkManager()
+{
+ return m_manager;
+}