OSDN Git Service

validate stack size in QThread::setStackSize()
authorIvailo Monev <xakepa10@laimg.moc>
Sat, 21 Mar 2020 16:13:18 +0000 (16:13 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sat, 21 Mar 2020 16:13:18 +0000 (16:13 +0000)
commit91019ff8de9ba23a45c7920184e473620e5244d0
tree7d6310a3f4b993f85352505b0e1c0d7e049a151b
parente9c2dd52e41c99c814000d6c4442df87c237922a
validate stack size in QThread::setStackSize()

that way threads will not fail if it is less than the minimum, the warning
from QThread::start() is basically invisible to GUI users unless
application is started from terminal which is far from ideal. one has
to install own message handler via qInstallMsgHandler() to make such
warnings noticable to GUI users, possible via QErrorMessage, which should
be errors in fact and printed via qCritical() but making such changes is
beyond the scope of this commit

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/thread/qthread.cpp