1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Merge branch 'Falkon/3.0'

This commit is contained in:
David Rosca 2018-05-08 11:39:13 +02:00
commit 3ad6b80d49
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
4 changed files with 11 additions and 4 deletions

View File

@ -628,8 +628,9 @@ void NavigationBar::reload()
void NavigationBar::goBack()
{
QWebEngineHistory* history = m_window->weView()->page()->history();
history->back();
auto view = m_window->weView();
view->setFocus();
view->back();
}
void NavigationBar::goBackInNewTab()
@ -645,8 +646,9 @@ void NavigationBar::goBackInNewTab()
void NavigationBar::goForward()
{
QWebEngineHistory* history = m_window->weView()->page()->history();
history->forward();
auto view = m_window->weView();
view->setFocus();
view->forward();
}
void NavigationBar::goForwardInNewTab()

View File

@ -776,6 +776,7 @@ void TabWidget::restoreClosedTab(QObject* obj)
int index = addView(QUrl(), tab.tabState.title, Qz::NT_CleanSelectedTab, false, tab.position);
WebTab* webTab = weTab(index);
webTab->setParentTab(tab.parentTab);
webTab->p_restoreTab(tab.tabState);
updateClosedTabsButton();
@ -791,6 +792,7 @@ void TabWidget::restoreAllClosedTabs()
for (const ClosedTabsManager::Tab &tab : closedTabs) {
int index = addView(QUrl(), tab.tabState.title, Qz::NT_CleanSelectedTab);
WebTab* webTab = weTab(index);
webTab->setParentTab(tab.parentTab);
webTab->p_restoreTab(tab.tabState);
}

View File

@ -38,6 +38,7 @@ void ClosedTabsManager::saveTab(WebTab *tab)
Tab closedTab;
closedTab.position = tab->tabIndex();
closedTab.parentTab = tab->parentTab();
closedTab.tabState = WebTab::SavedTab(tab);
m_closedTabs.prepend(closedTab);
}

View File

@ -19,6 +19,7 @@
#define CLOSEDTABSMANAGER_H
#include <QVector>
#include <QPointer>
#include "webtab.h"
#include "qzcommon.h"
@ -30,6 +31,7 @@ class FALKON_EXPORT ClosedTabsManager
public:
struct Tab {
int position = -1;
QPointer<WebTab> parentTab;
WebTab::SavedTab tabState;
bool isValid() const {