mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Merge branch 'Falkon/3.0'
This commit is contained in:
commit
3ad6b80d49
@ -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()
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user