diff --git a/indicator/indicatorhelper_mac.cpp b/indicator/indicatorhelper_mac.cpp index c99f907d2..c22bc6cef 100644 --- a/indicator/indicatorhelper_mac.cpp +++ b/indicator/indicatorhelper_mac.cpp @@ -135,12 +135,13 @@ int IndicatorHelper::daemonHook(QProcess &kdeconnectd) } // Start kdeconnectd, the daemon will not duplicate when there is already one - QString daemonPath = QCoreApplication::applicationDirPath() + QLatin1String("/kdeconnectd"); - if (!QFile::exists(daemonPath)) { + if (QString daemon = QCoreApplication::applicationDirPath() + QLatin1String("/kdeconnectd"); QFile::exists(daemon)) { + kdeconnectd.setProgram(daemon); + } else { QMessageBox::critical(nullptr, i18n("KDE Connect"), i18n("Cannot find kdeconnectd"), QMessageBox::Abort, QMessageBox::Abort); return -1; } - kdeconnectd.start(daemonPath, QStringList()); + kdeconnectd.startDetached(); m_splashScreen->showMessage(i18n("Loading modules") + QStringLiteral("\n"), Qt::AlignHCenter | Qt::AlignBottom, Qt::white);