Finish the shell process on shutdown, before deleting it

Change-Id: I62f3754325da9141e5ab870ff4750109a836b092
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-03-17 12:15:03 +01:00
parent 27c8f00d73
commit 13013acf3a

View File

@@ -193,7 +193,12 @@ class ShellThreadHandler : public QObject
public: public:
~ShellThreadHandler() ~ShellThreadHandler()
{ {
if (m_shell) if (!m_shell)
return;
if (m_shell->isRunning()) {
m_shell->write("exit\n");
m_shell->waitForFinished();
}
delete m_shell; delete m_shell;
} }