diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-02-15 16:54:55 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-03-18 06:44:33 +0100 |
commit | 591b4c3cb201c3d405f4a0a168c65bfe83325c0c (patch) | |
tree | 42027d42ceda96ead0711388e23908e1dd7c8d36 /src/webtab.cpp | |
parent | fixuifiles (diff) | |
download | rekonq-591b4c3cb201c3d405f4a0a168c65bfe83325c0c.tar.xz |
New History Manager, NO MORE QWebHistoryInterface based.
We are just saving datas on our own, I don't like QtWebKit APIs
to do it. We now call addHistoryEntry(url, title)
on loadFinished.
Data structure will remain the same as usual, but I think API
is better and data are now saved when we really have them
ready.
REVIEW:104257
Diffstat (limited to 'src/webtab.cpp')
-rw-r--r-- | src/webtab.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp index 8db44dd8..cbb38a5e 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -33,17 +33,18 @@ #include "rekonq.h" // Local Includes -#include "urlbar.h" +#include "application.h" +#include "historymanager.h" +#include "messagebar.h" +#include "opensearchmanager.h" #include "previewselectorbar.h" #include "rsswidget.h" +#include "sessionmanager.h" +#include "syncmanager.h" +#include "urlbar.h" #include "walletbar.h" #include "webpage.h" #include "webshortcutwidget.h" -#include "application.h" -#include "sessionmanager.h" -#include "syncmanager.h" -#include "opensearchmanager.h" -#include "messagebar.h" // KDE Includes #include <KWebWallet> @@ -55,7 +56,7 @@ #include <KBuildSycocaProgressDialog> // Qt Includes -#include <QtGui/QVBoxLayout> +#include <QVBoxLayout> WebTab::WebTab(QWidget *parent) @@ -88,6 +89,7 @@ WebTab::WebTab(QWidget *parent) connect(view(), SIGNAL(loadProgress(int)), this, SLOT(updateProgress(int))); connect(view(), SIGNAL(loadStarted()), this, SLOT(resetProgress())); connect(view(), SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged(QString))); + connect(view(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); // Session Manager connect(view(), SIGNAL(loadFinished(bool)), rApp->sessionManager(), SLOT(saveSession())); @@ -353,3 +355,11 @@ bool WebTab::hasAdBlockedElements() { return page()->hasAdBlockedElements(); } + + +void WebTab::loadFinished() +{ + // add page to history + QString pageTitle = (page() && page()->isOnRekonqPage()) ? url().url() : m_webView->title(); + rApp->historyManager()->addHistoryEntry(url(), pageTitle); +} |