macOS: launch kdeconnectd with start instead of startDetached

This commit is contained in:
Albert Vaca Cintora 2024-09-12 10:49:19 +02:00
parent 0477bc93d0
commit 2c572cf32c
No known key found for this signature in database

View file

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