From 7e64ecacb6d92d6ea5930d248847464cdb425540 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 14 Oct 2022 15:04:11 -0700 Subject: [PATCH] IPC: switch the default key type on Unix to POSIX realtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of the System V one. An important difference is that QSharedMemory does not clean after itself. Updated the configure summary output to include this information. Drive-by update to sorting order and I removed cpp-winrt from the listing because there's a warning at the end if it is not set. Change-Id: I12a088d1ae424825abd3fffd171e0eadcfd33426 Reviewed-by: Tor Arne Vestbø Reviewed-by: Mårten Nordheim --- src/corelib/configure.cmake | 13 ++++++------- src/corelib/ipc/qtipccommon.h | 2 -- .../corelib/ipc/qnativeipckey/tst_qnativeipckey.cpp | 2 -- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index c0d9d0f511c..dc507b6a12b 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -614,7 +614,7 @@ qt_feature("inotify" PUBLIC PRIVATE ) qt_feature_definition("inotify" "QT_NO_INOTIFY" NEGATE VALUE "1") qt_feature("ipc_posix" - LABEL "Using POSIX IPC" + LABEL "Defaulting legacy IPC to POSIX" CONDITION TEST_posix_shm AND TEST_posix_sem AND ( FEATURE_ipc_posix OR (APPLE AND QT_FEATURE_appstore_compliant) OR NOT (TEST_sysv_shm AND TEST_sysv_sem) @@ -769,6 +769,7 @@ qt_feature("xmlstream" PUBLIC qt_feature("cpp-winrt" PRIVATE PUBLIC LABEL "cpp/winrt base" PURPOSE "basic cpp/winrt language projection support" + AUTODETECT WIN32 CONDITION WIN32 AND TEST_cpp_winrt ) qt_feature_definition("xmlstream" "QT_NO_XMLSTREAM" NEGATE VALUE "1") @@ -999,15 +1000,18 @@ qt_feature("permissions" PUBLIC PURPOSE "Provides support for requesting user permission to access restricted data or APIs" CONDITION APPLE OR ANDROID OR WASM ) + qt_configure_add_summary_section(NAME "Qt Core") qt_configure_add_summary_entry(ARGS "backtrace") qt_configure_add_summary_entry(ARGS "doubleconversion") qt_configure_add_summary_entry(ARGS "system-doubleconversion") +qt_configure_add_summary_entry(ARGS "forkfd_pidfd" CONDITION LINUX) qt_configure_add_summary_entry(ARGS "glib") 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 "permissions") +qt_configure_add_summary_entry(ARGS "ipc_posix" CONDITION UNIX) qt_configure_add_summary_entry( TYPE "firstAvailableFeature" ARGS "etw lttng ctf" @@ -1024,11 +1028,6 @@ qt_configure_add_summary_entry( ) qt_configure_add_summary_entry(ARGS "pcre2") qt_configure_add_summary_entry(ARGS "system-pcre2") -qt_configure_add_summary_entry( - ARGS "forkfd_pidfd" - CONDITION LINUX -) -qt_configure_add_summary_entry(ARGS "permissions") qt_configure_end_summary_section() # end of "Qt Core" section qt_configure_add_report_entry( TYPE NOTE diff --git a/src/corelib/ipc/qtipccommon.h b/src/corelib/ipc/qtipccommon.h index 59e8e0966c8..7b85c432376 100644 --- a/src/corelib/ipc/qtipccommon.h +++ b/src/corelib/ipc/qtipccommon.h @@ -31,8 +31,6 @@ public: static constexpr Type DefaultTypeForOs = #ifdef Q_OS_WIN Type::Windows -#elif !defined(QT_POSIX_IPC) - Type::SystemV #else Type::PosixRealtime #endif diff --git a/tests/auto/corelib/ipc/qnativeipckey/tst_qnativeipckey.cpp b/tests/auto/corelib/ipc/qnativeipckey/tst_qnativeipckey.cpp index bca3e7e0109..6c30f428e93 100644 --- a/tests/auto/corelib/ipc/qnativeipckey/tst_qnativeipckey.cpp +++ b/tests/auto/corelib/ipc/qnativeipckey/tst_qnativeipckey.cpp @@ -46,8 +46,6 @@ void tst_QNativeIpcKey::defaultTypes() #ifdef Q_OS_WIN QCOMPARE(type, QNativeIpcKey::Type::Windows); -#elif !defined(QT_POSIX_IPC) - QCOMPARE(type, QNativeIpcKey::Type::SystemV); #else QCOMPARE(type, QNativeIpcKey::Type::PosixRealtime); #endif