mirror of
https://github.com/KDE/konsole.git
synced 2026-06-11 07:26:10 -04:00
Re enable close tabs, simplify code
This commit is contained in:
@@ -616,7 +616,6 @@ TabbedViewContainer *ViewManager::createContainer()
|
||||
auto *container = new TabbedViewContainer(this, _viewSplitter);
|
||||
//TODO: Fix Detaching.
|
||||
// connect(container, &TabbedViewContainer::detachTab, this, &ViewManager::detachView);
|
||||
connect(container, &TabbedViewContainer::closeTab, this, &ViewManager::closeTabFromContainer);
|
||||
|
||||
// connect signals and slots
|
||||
connect(container, &Konsole::TabbedViewContainer::viewAdded, this,
|
||||
@@ -1100,12 +1099,3 @@ void ViewManager::moveSessionRight()
|
||||
{
|
||||
moveActiveViewRight();
|
||||
}
|
||||
|
||||
void ViewManager::closeTabFromContainer(TabbedViewContainer *container, QWidget *tab)
|
||||
{
|
||||
SessionController *controller = qobject_cast<SessionController *>(container->viewProperties(tab));
|
||||
Q_ASSERT(controller);
|
||||
if (controller != nullptr) {
|
||||
controller->closeSession();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user