From 2c572cf32c9093384c5ff20c446f117100424678 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Thu, 12 Sep 2024 10:49:19 +0200 Subject: [PATCH] macOS: launch kdeconnectd with start instead of startDetached --- indicator/indicatorhelper_mac.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indicator/indicatorhelper_mac.cpp b/indicator/indicatorhelper_mac.cpp index c22bc6cef..c99f907d2 100644 --- a/indicator/indicatorhelper_mac.cpp +++ b/indicator/indicatorhelper_mac.cpp @@ -135,13 +135,12 @@ int IndicatorHelper::daemonHook(QProcess &kdeconnectd) } // Start kdeconnectd, the daemon will not duplicate when there is already one - if (QString daemon = QCoreApplication::applicationDirPath() + QLatin1String("/kdeconnectd"); QFile::exists(daemon)) { - kdeconnectd.setProgram(daemon); - } else { + QString daemonPath = QCoreApplication::applicationDirPath() + QLatin1String("/kdeconnectd"); + if (!QFile::exists(daemonPath)) { QMessageBox::critical(nullptr, i18n("KDE Connect"), i18n("Cannot find kdeconnectd"), QMessageBox::Abort, QMessageBox::Abort); return -1; } - kdeconnectd.startDetached(); + kdeconnectd.start(daemonPath, QStringList()); m_splashScreen->showMessage(i18n("Loading modules") + QStringLiteral("\n"), Qt::AlignHCenter | Qt::AlignBottom, Qt::white);