1 #ifndef KONQBOOKMARKMANAGER_H
2 #define KONQBOOKMARKMANAGER_H
4 #include <kbookmarkmanager.h>
5 #include <kstandarddirs.h>
8 #include <libkonq_export.h>
9 #include <tdeapplication.h>
11 class LIBKONQ_EXPORT KonqBookmarkManager
14 static KBookmarkManager *
self()
16 if ( !s_bookmarkManager )
18 TQString globalBookmarkFile = locate(
"data", TQString::fromLatin1(
"konqueror/bookmarks.xml" ) );
19 TQString bookmarksFile = locateLocal(
"data", TQString::fromLatin1(
"konqueror/bookmarks.xml" ),
true);
20 if (globalBookmarkFile != TQString::null && bookmarksFile != TQString::null &&
21 globalBookmarkFile != bookmarksFile)
23 TDEIO::file_copy(KURL::fromPathOrURL(globalBookmarkFile),
24 KURL::fromPathOrURL(bookmarksFile));
25 kapp->processEvents(3000);
27 s_bookmarkManager = KBookmarkManager::managerForFile( bookmarksFile );
29 return s_bookmarkManager;
33 static KBookmarkManager *s_bookmarkManager;