diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-07-10 17:21:47 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-07-18 11:37:08 +0200 |
commit | a656e6c5fd5662a3d990115e2b5851570149d594 (patch) | |
tree | 06f85884c8c81b1c1d6db697b2f47d4aef779ae8 /src/history/historymanager.h | |
parent | Improving SSL widget & dialog, step 3 (diff) | |
download | rekonq-a656e6c5fd5662a3d990115e2b5851570149d594.tar.xz |
WARNING: HISTORY_VERSION upgrade!!
This commit changes rekonq history data struct to manage also the
first time you visited a site.
This way we can "expose" this new info in the SSL widget.
(We can obviously do a lot more with it...)
Diffstat (limited to 'src/history/historymanager.h')
-rw-r--r-- | src/history/historymanager.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/history/historymanager.h b/src/history/historymanager.h index e22b7042..101bc09d 100644 --- a/src/history/historymanager.h +++ b/src/history/historymanager.h @@ -65,7 +65,8 @@ public: ) : title(t) , url(u) - , dateTime(d) + , firstDateTimeVisit(d) + , lastDateTimeVisit(d) , visitCount(1) {} @@ -73,23 +74,25 @@ public: { return other.title == title && other.url == url - && other.dateTime == dateTime; + && other.firstDateTimeVisit == firstDateTimeVisit + && other.lastDateTimeVisit == lastDateTimeVisit; } inline qreal relevance() const { - return log(visitCount) - log(dateTime.daysTo(QDateTime::currentDateTime()) + 1); + return log(visitCount) - log(lastDateTimeVisit.daysTo(QDateTime::currentDateTime()) + 1); } // history is sorted in reverse inline bool operator <(const HistoryItem &other) const { - return dateTime > other.dateTime; + return lastDateTimeVisit > other.lastDateTimeVisit; } QString title; QString url; - QDateTime dateTime; + QDateTime firstDateTimeVisit; + QDateTime lastDateTimeVisit; int visitCount; }; |