mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
RecoveryPage: Fix displaying list of windows and tabs
This commit is contained in:
parent
f9c7ed9759
commit
5298dc9857
@ -260,16 +260,15 @@ function addTab(winId, tabId, icon, title)
|
|||||||
|
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
external.recovery.restoreData(function(data) {
|
var data = external.recovery.restoreData;
|
||||||
for (var i = 0; i < data.length; ++i) {
|
for (var i = 0; i < data.length; ++i) {
|
||||||
var win = data[i];
|
var win = data[i];
|
||||||
addWindow(win.window);
|
addWindow(win.window);
|
||||||
for (var j = 0; j < win.tabs.length; ++j) {
|
for (var j = 0; j < win.tabs.length; ++j) {
|
||||||
var tab = win.tabs[j];
|
var tab = win.tabs[j];
|
||||||
addTab(win.window, tab.tab, tab.icon, tab.title);
|
addTab(win.window, tab.tab, tab.icon, tab.title);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
|
@ -29,14 +29,16 @@ class RestoreManager;
|
|||||||
class RecoveryJsObject : public QObject
|
class RecoveryJsObject : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(QJsonArray restoreData READ restoreData CONSTANT)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RecoveryJsObject(RestoreManager *manager);
|
explicit RecoveryJsObject(RestoreManager *manager);
|
||||||
|
|
||||||
void setPage(WebPage *page);
|
void setPage(WebPage *page);
|
||||||
|
|
||||||
public slots:
|
|
||||||
QJsonArray restoreData() const;
|
QJsonArray restoreData() const;
|
||||||
|
|
||||||
|
public slots:
|
||||||
void startNewSession();
|
void startNewSession();
|
||||||
void restoreSession(const QStringList &excludeWin, const QStringList &excludeTab);
|
void restoreSession(const QStringList &excludeWin, const QStringList &excludeTab);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user