1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

WebView: Always use WebView::restoreHistory()

This commit is contained in:
David Rosca 2015-10-15 20:50:44 +02:00
parent e7144ca78c
commit ebaf53f4f4
2 changed files with 3 additions and 8 deletions

View File

@ -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;
}

View File

@ -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