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

[Feature] [Vertical Tabs] Add "Unload Tree" to Tab Tree drop-down menu

FEATURE: 394247

Reviewers: #falkon, drosca

Reviewed By: #falkon, drosca

Subscribers: drosca, falkon

Tags: #falkon

Differential Revision: https://phabricator.kde.org/D14214
This commit is contained in:
Juraj Oravec 2018-07-19 17:36:10 +02:00 committed by David Rosca
parent aca5cb0e1c
commit 6556ade5c9
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -386,6 +386,14 @@ void TabTreeView::addMenuActions(QMenu *menu, const QModelIndex &index) const
tab->closeTab();
}
});
m->addAction(tr("Unload Tree"), this, [=]() {
reverseTraverse(pindex, [&](const QModelIndex &index) {
WebTab *tab = index.data(TabModel::WebTabRole).value<WebTab*>();
if (tab && tab->isRestored()) {
tab->unload();
}
});
});
}
m->addSeparator();