diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-10-10 13:06:51 +0200 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2022-10-19 15:56:42 +0300 |
commit | dd40306968c6ebea88a2e47aed9ac1ff498f5251 (patch) | |
tree | 7ecb8f591bfdcc73cc3d67b6f7a07c043d4a4061 /src/corelib/kernel | |
parent | 7502e57ca84ab2c8097686f38c18618b6da57208 (diff) |
Make qt_mac_ensureResponsible QT_BUILD_INTERNAL and Q_AUTOTEST_EXPORT
Its primary purpose was to be used by permission auto tests, so to
avoid App Store compatibility issues we disable it in non-dev builds.
Task-number: QTBUG-107167
Change-Id: Iaacec807808cfe52df0cf850b287e50da1bd59e5
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcore_mac.mm | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_mac_p.h | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcore_mac.mm b/src/corelib/kernel/qcore_mac.mm index c4abdd271e..067c1a9ec7 100644 --- a/src/corelib/kernel/qcore_mac.mm +++ b/src/corelib/kernel/qcore_mac.mm @@ -35,11 +35,13 @@ extern "C" { typedef uint32_t csr_config_t; extern int csr_get_active_config(csr_config_t *) __attribute__((weak_import)); +#ifdef QT_BUILD_INTERNAL int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim) __attribute__((availability(macos,introduced=10.14),weak_import)); pid_t responsibility_get_pid_responsible_for_pid(pid_t) __attribute__((weak_import)); char *** _NSGetArgv(); extern char **environ; +#endif } #endif @@ -384,6 +386,7 @@ std::optional<uint32_t> qt_mac_sipConfiguration() return; \ } +#ifdef QT_BUILD_INTERNAL void qt_mac_ensureResponsible() { #if !defined(QT_APPLE_NO_PRIVATE_APIS) @@ -421,6 +424,7 @@ void qt_mac_ensureResponsible() posix_spawnattr_destroy(&attr); #endif } +#endif // QT_BUILD_INTERNAL #endif diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h index f9e7dbcdce..aee5fcb604 100644 --- a/src/corelib/kernel/qcore_mac_p.h +++ b/src/corelib/kernel/qcore_mac_p.h @@ -184,7 +184,9 @@ private: Q_CORE_EXPORT bool qt_mac_applicationIsInDarkMode(); Q_CORE_EXPORT bool qt_mac_runningUnderRosetta(); Q_CORE_EXPORT std::optional<uint32_t> qt_mac_sipConfiguration(); -Q_CORE_EXPORT void qt_mac_ensureResponsible(); +#ifdef QT_BUILD_INTERNAL +Q_AUTOTEST_EXPORT void qt_mac_ensureResponsible(); +#endif #endif #ifndef QT_NO_DEBUG_STREAM |