diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-12-29 11:34:39 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-01-07 15:36:49 +0100 |
commit | c466aa12bd18c04021417c54781312bc8db7da2c (patch) | |
tree | ba69fc109c9f2d01bca8a5343b783af1484e6fba /src/history/historymanager.h | |
parent | Disable multi-dimensional scroll button on scrollbars. (diff) | |
download | rekonq-c466aa12bd18c04021417c54781312bc8db7da2c.tar.xz |
Added a visit count parameter to the history.
This change will preserve old history on first load, adding the visit count parameter
and saving the new structure on close
This will used expecially in the Awesome UrlBar ordering suggestions code.
WARNING: HISTORY_VERSION upgrade
CCMAIL:megabigbug@yahoo.fr
Diffstat (limited to 'src/history/historymanager.h')
-rw-r--r-- | src/history/historymanager.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/history/historymanager.h b/src/history/historymanager.h index 1e03fb1c..a4099de7 100644 --- a/src/history/historymanager.h +++ b/src/history/historymanager.h @@ -61,14 +61,16 @@ public: const QString &t = QString() ) : title(t) - , url(u), - dateTime(d) + , url(u) + , dateTime(d) + , visitCount(1) {} inline bool operator==(const HistoryItem &other) const { return other.title == title - && other.url == url && other.dateTime == dateTime; + && other.url == url + && other.dateTime == dateTime; } // history is sorted in reverse @@ -80,6 +82,7 @@ public: QString title; QString url; QDateTime dateTime; + int visitCount; }; @@ -100,12 +103,6 @@ class REKONQ_TESTS_EXPORT HistoryManager : public QWebHistoryInterface { Q_OBJECT -signals: - void historyReset(); - void entryAdded(const HistoryItem &item); - void entryRemoved(const HistoryItem &item); - void entryUpdated(int offset); - public: HistoryManager(QObject *parent = 0); ~HistoryManager(); @@ -123,12 +120,18 @@ public: // History manager keeps around these models for use by the completer and other classes HistoryFilterModel *historyFilterModel() const { return m_historyFilterModel; }; HistoryTreeModel *historyTreeModel() const { return m_historyTreeModel; }; + +Q_SIGNALS: + void historyReset(); + void entryAdded(const HistoryItem &item); + void entryRemoved(const HistoryItem &item); + void entryUpdated(int offset); -public slots: +public Q_SLOTS: void clear(); void loadSettings(); -private slots: +private Q_SLOTS: void save(); void checkForExpired(); |