From fd34da6c47641a761ef62cba659f337fb1c39c74 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 5 Nov 2022 11:55:38 -0700 Subject: [PATCH] Update the poll-exit-on-error feature to be private MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User code shouldn't have to know about this. Amends 0e1ce757d530c5e84d4c3ad070fd8ebf47c2e3d2. Change-Id: I3d74c753055744deb8acfffd1724c5282f60ea59 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Dominik Holland --- src/corelib/configure.cmake | 4 +--- src/corelib/kernel/qeventdispatcher_unix.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index 4c352ca99b0..0e625408a79 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -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" diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index df728cec51f..649314c935a 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -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");