nothread: add exit function to QThread stub

This allows QtDeclarative examples to build.

Change-Id: Icd20304f76f8ba15c94eaf01b9fcd7b151b16146
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Lorn Potter 2018-08-30 18:02:45 +10:00
parent ef5aefb062
commit ceb0e377b1

View File

@ -818,6 +818,16 @@ void QThread::quit()
}
void QThread::exit(int returnCode)
{
Q_D(QThread);
d->data->quitNow = true;
for (int i = 0; i < d->data->eventLoops.size(); ++i) {
QEventLoop *eventLoop = d->data->eventLoops.at(i);
eventLoop->exit(returnCode);
}
}
bool QThread::wait(unsigned long time)
{
Q_UNUSED(time);