QThread: print thread name in the warning message
Print thread name in the warning message "QThread: Destroyed while thread is still running". This can be useful to determine which exactly thread is being deleted incorrectly, especially when you can't reproduce this in debug mode and you only have the user log. Change-Id: If9c57e1528b24fe3789930e3e144f61e6761c66a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
bf1a2ba8ef
commit
07749de7ef
@ -494,7 +494,7 @@ QThread::~QThread()
|
||||
locker.relock();
|
||||
}
|
||||
if (d->threadState == QThreadPrivate::Running && !d->data->isAdopted)
|
||||
qFatal("QThread: Destroyed while thread is still running");
|
||||
qFatal("QThread: Destroyed while thread '%ls' is still running", qUtf16Printable(objectName()));
|
||||
|
||||
d->data->thread.storeRelease(nullptr);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user