Review Request: Allow bookmarks to be saved and reloaded by using KTextEditor read/writeSessionConfig

Lambert CLARA lambert.clara at yahoo.fr
Sun Mar 4 21:07:08 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104085/
-----------------------------------------------------------

(Updated March 4, 2012, 9:07 p.m.)


Review request for KDevelop.


Changes
-------

Thank you for your comment, I indeed forgot about this !

I've modified the patch, so that it won't allow more than 20 katepart settings (for now the number is fixed in a constant, maybe later some kind of UI could be added to allow the user to change it).
I also now keep the date/time when the last update for a file was made (based on epoc), so that when the max number of document is reached we can erase the oldest configuration.

Unfortunately, this caused a problem when saveConfig was called when closing the file, because then we save all the opened files configurations, and this break the ordering (some saves are not needed after all).
For now, I removed the saveConfig at both these locations, so that we only save the config when we add/remove some bookmarks (which was the first goal ^^).

I think what we should do is connect to the other settings exposed by the katePart, and save when they change.
Unfortunately, I checked in the kate codebase, and I did not find a signal emmitted when the encoding or folding change.


I'd like your comments on the matter, thanks,
Lambert


Description
-------

As proposed in the bug, use readSessionConfig and writeSessionConfig to allow katepart to remember bookmarks.


This addresses bug 230862.
    http://bugs.kde.org/show_bug.cgi?id=230862


Diffs (updated)
-----

  shell/textdocument.cpp d595aec 

Diff: http://git.reviewboard.kde.org/r/104085/diff/


Testing
-------

Open some files, put some bookmarks, close them and reopen them.
Open some files, put some bookmarks, close kdevelop and relaunch it.


Thanks,

Lambert CLARA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120304/c786d2cd/attachment.html>


More information about the KDevelop-devel mailing list