diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-08-27 02:39:31 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-08-27 02:39:31 +0200 |
commit | ef48328f8fe0ac069215037c62711a5e08bf111f (patch) | |
tree | ab7cef89a0c3f27cd8eb5139a405637ac3470465 /src/bookmarks.cpp | |
parent | Removed unuseful headers (diff) | |
download | rekonq-ef48328f8fe0ac069215037c62711a5e08bf111f.tar.xz |
Using userBookmarksManager static function to surely retrieve bmManager..
Diffstat (limited to 'src/bookmarks.cpp')
-rw-r--r-- | src/bookmarks.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index a1f0e441..94f93f9b 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -153,31 +153,13 @@ void BookmarkMenu::slotAddBookmark() BookmarkProvider::BookmarkProvider(QWidget *parent) : QObject(parent) , m_parent(parent) - , m_manager(0) + , m_manager(KBookmarkManager::userBookmarksManager()) , m_owner(0) , m_menu(new KMenu(m_parent)) , m_actionCollection(new KActionCollection(this)) , m_bookmarkMenu(0) , m_bookmarkToolBar(0) { - KUrl bookfile = KUrl("~/.kde/share/apps/konqueror/bookmarks.xml"); // share konqueror bookmarks - - if (!QFile::exists(bookfile.path())) - { - bookfile = KUrl("~/.kde4/share/apps/konqueror/bookmarks.xml"); - if (!QFile::exists(bookfile.path())) - { - QString bookmarksDefaultPath = KStandardDirs::locate("appdata" , "defaultbookmarks.xbel"); - kWarning() << bookmarksDefaultPath; - QFile bkms(bookmarksDefaultPath); - QString bookmarksPath = KStandardDirs::locateLocal("appdata", "bookmarks.xml", true); - bookmarksPath.replace("rekonq", "konqueror"); - bkms.copy(bookmarksPath); - - bookfile = KUrl(bookmarksPath); - } - } - m_manager = KBookmarkManager::managerForExternalFile(bookfile.path()); connect(m_manager, SIGNAL(changed(const QString &, const QString &)), this, SLOT(slotBookmarksChanged(const QString &, const QString &))); |