1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01: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); WebTab* webTab = weTab(index);
const QUrl url = webTab->url(); int id = addView(QUrl(), webTab->title(), Qz::NT_CleanNotSelectedTab);
const QString title = webTab->title(); weTab(id)->p_restoreTab(webTab->url(), webTab->historyData());
const QByteArray history = webTab->historyData();
int id = addView(url, title, Qz::NT_CleanNotSelectedTab);
weTab(id)->setHistoryData(history);
return id; return id;
} }

View File

@ -234,8 +234,7 @@ void WebTab::attach(BrowserWindow* window)
void WebTab::setHistoryData(const QByteArray &data) void WebTab::setHistoryData(const QByteArray &data)
{ {
QDataStream historyStream(data); m_webView->restoreHistory(data);
historyStream >> *m_webView->history();
} }
QByteArray WebTab::historyData() const QByteArray WebTab::historyData() const