Commit 6f342d3e authored by Weixuan Xiao's avatar Weixuan Xiao
Browse files

Fix exit due to too early D-Bus call on macOS

Move D-Bus call related code after daemonHook.
This should also keep compatibility on Windows.
parent 8356cf4e
Pipeline #67101 passed with stage
in 4 minutes and 1 second
......@@ -42,11 +42,6 @@ int main(int argc, char** argv)
i18n("(C) 2016 Aleix Pol Gonzalez"));
KAboutData::setApplicationData(about);
KDBusService dbusService(KDBusService::Unique);
// Trigger loading the KIconLoader plugin
about.setProgramLogo(QIcon(QStringLiteral(":/icons/kdeconnect/kdeconnect.svg")));
#ifdef Q_OS_WIN
KColorSchemeManager manager;
QApplication::setStyle(QStringLiteral("breeze"));
......@@ -58,11 +53,17 @@ int main(int argc, char** argv)
helper.preInit();
// Run Daemon initialization step
// When run from macOS app bundle, D-Bus call should be later than kdeconnectd and D-Bus daemon
QProcess kdeconnectd;
if (helper.daemonHook(kdeconnectd)) {
return -1;
}
KDBusService dbusService(KDBusService::Unique);
// Trigger loading the KIconLoader plugin
about.setProgramLogo(QIcon(QStringLiteral(":/icons/kdeconnect/kdeconnect.svg")));
DevicesModel model;
model.setDisplayFilter(DevicesModel::Reachable | DevicesModel::Paired);
QMenu* menu = new QMenu;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment