TerminalImpl: Set a parent to all the children

ProcessInterface subclasses may be moved between threads,
that's why we need to make them children of ProcessInterface.

Change-Id: Ia58f1ea05f85e22315dc22dbafce06ee6bcf0be6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-05-19 17:18:10 +02:00
parent ee98c98676
commit 123a6e61de

View File

@@ -122,7 +122,8 @@ class TerminalProcessPrivate
{ {
public: public:
TerminalProcessPrivate(QObject *parent) TerminalProcessPrivate(QObject *parent)
: m_process(parent) {} : m_stubServer(parent)
, m_process(parent) {}
qint64 m_processId = 0; qint64 m_processId = 0;
ProcessResultData m_result; ProcessResultData m_result;
@@ -373,7 +374,7 @@ void TerminalImpl::start()
const QStringList env = m_setup.m_environment.toStringList(); const QStringList env = m_setup.m_environment.toStringList();
if (!env.isEmpty()) { if (!env.isEmpty()) {
d->m_tempFile = new QTemporaryFile(); d->m_tempFile = new QTemporaryFile(this);
if (!d->m_tempFile->open()) { if (!d->m_tempFile->open()) {
cleanupAfterStartFailure(msgCannotCreateTempFile(d->m_tempFile->errorString())); cleanupAfterStartFailure(msgCannotCreateTempFile(d->m_tempFile->errorString()));
return; return;