From 0ebe9db0190ce9b0c1c6489be960766521587fa2 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Tue, 19 Oct 2021 18:29:55 +0200 Subject: [PATCH] Fix MacOS build If neither PRIVATE_DBUS_ENABLED and APPLE_IN_APP_BUNDLE weren't set, DBusHelper::macosUnsetLaunchctlEnv() wasn't declared. --- CMakeLists.txt | 3 +-- indicator/indicatorhelper_mac.cpp | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dfe24b9e..343976f11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,9 +113,8 @@ if (NOT ZSH_AUTOCOMPLETE_DIR) set(ZSH_AUTOCOMPLETE_DIR "${KDE_INSTALL_DATADIR}/zsh/site-functions") endif() -option(APPLE_IN_APP_BUNDLE "Compile KDE Connect to pack in App Bundle" OFF) option(PRIVATE_DBUS_ENABLED "Use private dbus session for kdeconnect" OFF) -if(PRIVATE_DBUS_ENABLED OR APPLE_IN_APP_BUNDLE) +if(PRIVATE_DBUS_ENABLED) add_compile_definitions(USE_PRIVATE_DBUS) endif() diff --git a/indicator/indicatorhelper_mac.cpp b/indicator/indicatorhelper_mac.cpp index 4a36ec797..22fcc56d6 100644 --- a/indicator/indicatorhelper_mac.cpp +++ b/indicator/indicatorhelper_mac.cpp @@ -60,8 +60,10 @@ void IndicatorHelper::iconPathHook() int IndicatorHelper::daemonHook(QProcess &kdeconnectd) { +#ifdef USE_PRIVATE_DBUS // Unset launchctl env, avoid block DBusHelper::macosUnsetLaunchctlEnv(); +#endif // Start kdeconnectd m_splashScreen->showMessage(i18n("Launching daemon") + QStringLiteral("\n"), Qt::AlignHCenter | Qt::AlignBottom, Qt::white);