Update the poll-exit-on-error code: include the message for everyone

I think it's useful for everyone to know what error it was, not just if
it's about to abort. And then simply abort() when we want to.

Change-Id: I3d74c753055744deb8acfffd1724c5b2b293ca9a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Thiago Macieira 2022-11-05 12:05:33 -07:00
parent fd34da6c47
commit 0f55580ec5

View File

@ -465,11 +465,9 @@ bool QEventDispatcherUNIX::processEvents(QEventLoop::ProcessEventsFlags flags)
switch (qt_safe_poll(d->pollfds.data(), d->pollfds.size(), tm)) {
case -1:
#if QT_CONFIG(poll_exit_on_error)
qFatal("qt_safe_poll errno: %i error: %ls", errno, qUtf16Printable(qt_error_string()));
#else
perror("qt_safe_poll");
#endif
qErrnoWarning("qt_safe_poll");
if (QT_CONFIG(poll_exit_on_error))
abort();
break;
case 0:
break;