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:
parent
e7144ca78c
commit
ebaf53f4f4
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user