Skip to content

Fix KBookmarkManager::save triggering KDirWatch

Currently, calling KBookmarkManager::save leads to KDirWatch signalling the file has changed, despite the fact that it's us changing the file.

Example logs adding a bookmark in Dolphin before this patch:

kf.bookmarks: KBookmarkManager::save  "/home/joe/.local/share/dolphin/bookmarks.xml"                                                                                                                                                                                          
kf.bookmarks: KBookmarkManager::emitChanged : broadcasting change  ""                                                                                                                                                                                                         
kf.bookmarks: file changed (KDirWatch)  "/home/joe/.local/share/dolphin/bookmarks.xml"                                                                                                                                                                                        
kf.bookmarks: KBookmarkManager::parse  "/home/joe/.local/share/dolphin/bookmarks.xml"                                                                                                                                                                                         
kf.bookmarks: file changed (KDirWatch)  "/home/joe/.local/share/dolphin/bookmarks.xml"                                                                                                                                                                                        
kf.bookmarks: KBookmarkManager::parse  "/home/joe/.local/share/dolphin/bookmarks.xml"

And after:

kf.bookmarks: KBookmarkManager::save  "/home/joe/.local/share/dolphin/bookmarks.xml"                                                                                                                                                                                          
kf.bookmarks: KBookmarkManager::emitChanged : broadcasting change  ""

Thanks.

Merge request reports