void KdenliveDoc::updateProjectFolderPlacesEntry()
{
+ /*
+ * For similar and more code have a look at kfileplacesmodel.cpp and the included files:
+ * http://websvn.kde.org/trunk/KDE/kdelibs/kfile/kfileplacesmodel.cpp?view=markup
+ */
+
const QString file = KStandardDirs::locateLocal("data", "kfileplaces/bookmarks.xml");
KBookmarkManager *bookmarkManager = KBookmarkManager::managerForFile(file, "kfilePlaces");
KBookmarkGroup root = bookmarkManager->root();
// if entry does not exist yet (was not found), well, create it then
if (!exists) {
- KBookmark newBookmark = root.addBookmark(i18n("Project Folder"), documentLocation, "folder-favorites");
+ bookmark = root.addBookmark(i18n("Project Folder"), documentLocation, "folder-favorites");
// Make this user selectable ?
- newBookmark.setMetaDataItem("OnlyInApp", kdenliveName);
+ bookmark.setMetaDataItem("OnlyInApp", kdenliveName);
bookmarkManager->emitChanged(root);
}
}