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