Store bookmarks and history in Sqlite3
This MR uses SQLite database (angelfish.sqlite) to keep bookmarks and history. Its also planned to use the same database for keeping favicons, but that will require introduction of corresponding image provider.
Database initialization and data manipulation are implemented in DBManager
. DBManager object is a member of BrowserManager and all interaction with DBManager object is performed through that.
ListViews are getting data through BookmarksHistoryModel
which supports filtering, showing the both lists merged together when needed, and updating the view when data has changed. The model role names are determined from SQL query itself, to avoid definition of the same data twice.
Adding elements to history is moved to the corresponding section in WebView as its only used there. In addition, lastVisited
property is updated for bookmarks and history on every visit and used to sort the lists accordingly. Number of history items is limited to 3000, checked and trimmed on every start.
As I saw that several classes were not members of AngelFish
namespace, this got fixed as well.
I am going to test it and look how to improve further. Posting it here for early preview and feedback.
Fixes #14 (closed) Fixes #18 (closed) Fixes #11 (closed)