From ebaf53f4f482b6654ecf92cb52a054940c2cb111 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 15 Oct 2015 20:50:44 +0200 Subject: [PATCH] WebView: Always use WebView::restoreHistory() --- src/lib/tabwidget/tabwidget.cpp | 8 ++------ src/lib/webtab/webtab.cpp | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/lib/tabwidget/tabwidget.cpp b/src/lib/tabwidget/tabwidget.cpp index 0db722516..74df1814a 100644 --- a/src/lib/tabwidget/tabwidget.cpp +++ b/src/lib/tabwidget/tabwidget.cpp @@ -629,12 +629,8 @@ int TabWidget::duplicateTab(int index) WebTab* webTab = weTab(index); - const QUrl url = webTab->url(); - const QString title = webTab->title(); - const QByteArray history = webTab->historyData(); - - int id = addView(url, title, Qz::NT_CleanNotSelectedTab); - weTab(id)->setHistoryData(history); + int id = addView(QUrl(), webTab->title(), Qz::NT_CleanNotSelectedTab); + weTab(id)->p_restoreTab(webTab->url(), webTab->historyData()); return id; } diff --git a/src/lib/webtab/webtab.cpp b/src/lib/webtab/webtab.cpp index 7cee5292b..9dc1f502d 100644 --- a/src/lib/webtab/webtab.cpp +++ b/src/lib/webtab/webtab.cpp @@ -234,8 +234,7 @@ void WebTab::attach(BrowserWindow* window) void WebTab::setHistoryData(const QByteArray &data) { - QDataStream historyStream(data); - historyStream >> *m_webView->history(); + m_webView->restoreHistory(data); } QByteArray WebTab::historyData() const