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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user