forked from qt-creator/qt-creator
QtcProcess: Guard emission of done() signal
Add a missing guard for emitting done signal. It was overlooked
during QtcProcess devirtualization.
Amends a717ff71f4
Change-Id: I62c38d2ba9f3e437b5ef088b8362e97d16e576e4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -645,6 +645,7 @@ public:
|
||||
|
||||
void emitStarted();
|
||||
void emitFinished();
|
||||
void emitDone();
|
||||
void emitErrorOccurred(QProcess::ProcessError error);
|
||||
void emitReadyReadStandardOutput();
|
||||
void emitReadyReadStandardError();
|
||||
@@ -979,7 +980,8 @@ QtcProcess::QtcProcess(QObject *parent)
|
||||
|
||||
QtcProcess::~QtcProcess()
|
||||
{
|
||||
QTC_CHECK(d->m_callStackGuard == 0);
|
||||
QTC_ASSERT(d->m_callStackGuard == 0, qWarning("Deleting QtcProcess instance directly from "
|
||||
"one of its signal handlers will lead to crash!"));
|
||||
delete d;
|
||||
}
|
||||
|
||||
@@ -1942,7 +1944,7 @@ void QtcProcessPrivate::handleDone(const ProcessResultData &data)
|
||||
if (m_resultData.m_error != QProcess::FailedToStart)
|
||||
emitFinished();
|
||||
|
||||
emit q->done();
|
||||
emitDone();
|
||||
m_processId = 0;
|
||||
m_applicationMainThreadId = 0;
|
||||
}
|
||||
@@ -1970,6 +1972,12 @@ void QtcProcessPrivate::emitFinished()
|
||||
emit q->finished();
|
||||
}
|
||||
|
||||
void QtcProcessPrivate::emitDone()
|
||||
{
|
||||
CALL_STACK_GUARD();
|
||||
emit q->done();
|
||||
}
|
||||
|
||||
void QtcProcessPrivate::emitErrorOccurred(QProcess::ProcessError error)
|
||||
{
|
||||
CALL_STACK_GUARD();
|
||||
|
Reference in New Issue
Block a user