Moved the QWebPage::addToHistory signal into QWebHistoryInterface
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Jan 2008 12:24:19 +0000 (12:24 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Jan 2008 12:24:19 +0000 (12:24 +0000)
Signed-off-by: Lars
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29157 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/qt/Api/qwebhistoryinterface.h
WebKit/qt/Api/qwebpage.h
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

index 0ff1d88408a3115acb4b70934dedf03f6c263357..92b0aaa54773f99c92868be02eee2b1466155b89 100644 (file)
@@ -37,6 +37,7 @@ public:
     static QWebHistoryInterface *defaultInterface();
 
     virtual bool historyContains(const QString &url) const = 0;
+    virtual void addHistoryEntry(const QString &url) const = 0;
 };
 
 #endif
index 452e8b68f45571f7a359bdbbebf5f4893b9cd6b9..256d40b2011b3951c007766a3251e9bc69e1c7d6 100644 (file)
@@ -187,9 +187,6 @@ Q_SIGNALS:
 
     void selectionChanged();
 
-    // ### call addedToHistory instead, something more signal'ish
-    void addToHistory(const QUrl&);
-
     void frameCreated(QWebFrame *frame);
 
     void geometryChangeRequest(const QRect& geom);
index 623817dba3cfbeca8dcdcfbf89cb808232b99b96..cb12cfd97f9d2a243624ed10569ba038239d2091 100644 (file)
@@ -1,3 +1,15 @@
+2008-01-04  Simon Hausmann  <hausmann@webkit.org>
+
+        Reviewed by Lars.
+
+        Moved the QWebPage::addToHistory signal into QWebHistoryInterface
+        
+
+        * Api/qwebhistoryinterface.h:
+        * Api/qwebpage.h:
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::updateGlobalHistoryForStandardLoad):
+
 2008-01-04  Lars Knoll  <lars@trolltech.com>
 
         Reviewed by Simon.
index 3753ad6787e8585fea8ee305fd59832fc010edab..99dbf5b84fe767160555fa308f311298f75e1b59 100644 (file)
@@ -48,6 +48,7 @@
 #include "qwebframe_p.h"
 #include "qwebobjectplugin_p.h"
 #include "qwebnetworkinterface_p.h"
+#include "qwebhistoryinterface.h"
 
 #include <qfileinfo.h>
 
@@ -597,7 +598,9 @@ void FrameLoaderClientQt::registerForIconNotification(bool)
 
 void FrameLoaderClientQt::updateGlobalHistoryForStandardLoad(const WebCore::KURL& url)
 {
-    emit m_webFrame->page()->addToHistory(QUrl(url.prettyURL()));
+    QWebHistoryInterface *history = QWebHistoryInterface::defaultInterface();
+    if (history)
+        history->addHistoryEntry(url.prettyURL());
 }
 
 void FrameLoaderClientQt::updateGlobalHistoryForReload(const WebCore::KURL&)