forked from qt-creator/qt-creator
Utils: Don't call mutable expressions inside QTC_ASSERT
In order to conform to the theory: "Removing all QTC_ASSERTs and QTC_CHECKs should not change anything". Change-Id: I6f5c4486afb422301562d79c662fdde026e4d788 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -117,8 +117,9 @@ private:
|
||||
void handleFinished()
|
||||
{
|
||||
// In case the process is still running - wait until it has finished
|
||||
QTC_ASSERT(emitFinished(), QTimer::singleShot(m_reaperSetup.m_timeoutMs,
|
||||
this, &Reaper::handleFinished));
|
||||
const bool isFinished = emitFinished();
|
||||
QTC_ASSERT(isFinished, QTimer::singleShot(m_reaperSetup.m_timeoutMs,
|
||||
this, &Reaper::handleFinished));
|
||||
}
|
||||
|
||||
void handleTerminateTimeout()
|
||||
@@ -187,7 +188,8 @@ private:
|
||||
Reaper *reaper = new Reaper(reaperSetup);
|
||||
connect(reaper, &Reaper::finished, this, [this, reaper, process = reaperSetup.m_process] {
|
||||
QMutexLocker locker(&m_mutex);
|
||||
QTC_CHECK(m_reaperList.removeOne(reaper));
|
||||
const bool isRemoved = m_reaperList.removeOne(reaper);
|
||||
QTC_CHECK(isRemoved);
|
||||
delete reaper;
|
||||
delete process;
|
||||
if (m_reaperList.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user