From c7103b0cc6954d3e13a4aa9b9dd039df0dc321d6 Mon Sep 17 00:00:00 2001 From: Andreas Heck Date: Fri, 23 Dec 2016 21:07:40 +0100 Subject: [PATCH] Exposes sessions autoClose property to QTermWidget --- lib/qtermwidget.cpp | 5 +++++ lib/qtermwidget.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/lib/qtermwidget.cpp b/lib/qtermwidget.cpp index 21f0a0a..5f8679b 100644 --- a/lib/qtermwidget.cpp +++ b/lib/qtermwidget.cpp @@ -688,3 +688,8 @@ bool QTermWidget::isTitleChanged() const { return m_impl->m_session->isTitleChanged(); } + +void QTermWidget::setAutoClose(bool autoClose) +{ + m_impl->m_session->setAutoClose(autoClose); +} diff --git a/lib/qtermwidget.h b/lib/qtermwidget.h index e486f58..ff5c580 100644 --- a/lib/qtermwidget.h +++ b/lib/qtermwidget.h @@ -211,6 +211,13 @@ public: */ void setKeyboardCursorShape(KeyboardCursorShape shape); + + /** + * Automatically close the terminal session after the shell process exits or + * keep it running. + */ + void setAutoClose(bool); + QString title() const; QString icon() const;