Update the poll-exit-on-error feature to be private

User code shouldn't have to know about this.

Amends 0e1ce757d530c5e84d4c3ad070fd8ebf47c2e3d2.

Change-Id: I3d74c753055744deb8acfffd1724c5282f60ea59
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
This commit is contained in:
Thiago Macieira 2022-11-05 11:55:38 -07:00
parent ca254a0937
commit fd34da6c47
2 changed files with 2 additions and 4 deletions

View File

@ -961,13 +961,12 @@ qt_feature("cborstreamwriter" PUBLIC
LABEL "CBOR stream writing"
PURPOSE "Provides support for writing the CBOR binary format."
)
qt_feature("poll-exit-on-error" PUBLIC
qt_feature("poll-exit-on-error" PRIVATE
LABEL "Poll exit on error"
AUTODETECT OFF
CONDITION UNIX
PURPOSE "Exit on error instead of just printing the error code and continue."
)
qt_feature_definition("poll-exit-on-error" "QT_POLL_EXIT_ON_ERROR")
qt_feature("permissions" PUBLIC
SECTION "Utilities"
LABEL "Application permissions"
@ -983,7 +982,6 @@ qt_configure_add_summary_entry(ARGS "icu")
qt_configure_add_summary_entry(ARGS "system-libb2")
qt_configure_add_summary_entry(ARGS "mimetype-database")
qt_configure_add_summary_entry(ARGS "cpp-winrt")
qt_configure_add_summary_entry(ARGS "poll-exit-on-error")
qt_configure_add_summary_entry(
TYPE "firstAvailableFeature"
ARGS "etw lttng"

View File

@ -465,7 +465,7 @@ bool QEventDispatcherUNIX::processEvents(QEventLoop::ProcessEventsFlags flags)
switch (qt_safe_poll(d->pollfds.data(), d->pollfds.size(), tm)) {
case -1:
#ifdef QT_POLL_EXIT_ON_ERROR
#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");