Skip to content

Improve bookmark behaviour with multiple windows open

Joe Dight requested to merge joedight/okular:work/joedight/bookmark_fixes into master

With two instances of Okular open, a change made to a bookmark in one won't show up in the other.
This is because Okular::BookmarkManager ignores KBookmarkManager::changed("") (where an empty address indicates any bookmark may have changed). What's more, KBookmarks held in BookmarkList by the second window then become stale, so any subsequent changes aren't always saved to disk.
For me at least, this also occurs with just one window open without frameworks/kbookmarks!49 (merged) applied, again leading to changes not persisting to disk.

The first two commits are prep, introducing a mechanism for BookmarkManager::save to emit changed() on a specific bookmark group, then wiring that up so that renaming a bookmark in BookmarkList doesn't go around unnecessarily emitting changed(""). (This was more important in a previous version of this series, if you like I could drop these commits).

The second two solve the problem at the top, by handling changed("") in BookmarkManager, then wiring that up to BookmarkList.

Thanks.

Edited by Joe Dight

Merge request reports