Connect closeTabAction.

This commit is contained in:
Matthieu Gautier 2018-07-25 17:19:57 +02:00
parent 0806faeb99
commit 52f6b03da2
2 changed files with 2 additions and 1 deletions

View File

@ -126,7 +126,6 @@ void KiwixApp::createAction()
CREATE_ACTION(CloseTabAction, "Close tab");
SET_SHORTCUT(CloseTabAction, QKeySequence::Close);
DISABLE_ACTION(CloseTabAction);
CREATE_ACTION(ReopenClosedTabAction, "Reopen closed tab");
SET_SHORTCUT(ReopenClosedTabAction, QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_T));

View File

@ -23,6 +23,8 @@ TabWidget::TabWidget(QWidget *parent) :
auto widget = this->createNewTab(true);
widget->setUrl(url);
});
connect(app->getAction(KiwixApp::CloseTabAction), &QAction::triggered,
this, &TabWidget::closeTab);
}
WebView* TabWidget::createNewTab(bool setCurrent)