kdeconnect-kde/core
Weixuan Xiao f1843cb492 Improve D-Bus implementation on macOS
Better patch to replace !218.

- Auto and quick detection of previous D-Bus instance;
- Remove private D-Bus compile definition, only use it on macOS without an existing D-Bus instance;
- Safe reboot after crashes because the indicator is not relating on the kdeconnectd to run a D-Bus session;
- Safe exit after clicking on `Quit` in the systray.


More details in commit logs:

Only enable private D-Bus on macOS because the other platforms do not
need them.
The app should be able to easily detect the session bus from the env
DBUS_LAUNCHD_SESSION_BUS_SOCKET from launchd through launchctl.
Because https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/dbus/dbus-sysdeps-unix.c#L4392
shows that it is the only probing method on macOS with launchd.

The D-Bus session bus can be easily found from launchd/launchctl
with DBUS_LAUNCHD_SESSION_BUS_SOCKET env. It can be an external one
(installed from HomeBrew) or an internal one (launched by a previous
instance followed by a crash).

The indicator helper on macOS can now automatically detect whether we can use a potentially
(with launchd/launchctl env set, or KDE Connect macOS
private_bus_address set) existed and usable session bus.
If previous bus is usable, just try to launch the kdeconnectd with us.
Otherwise, launch a private D-Bus daemon, export the launchd/launchctl
env, and run a kdeconnectd instance.

Everything works better and quicker now :)
2022-04-12 05:40:03 +00:00
..
backends GIT_SILENT: add missing override 2021-10-27 06:53:06 +02:00
CMakeLists.txt Replace manual include dir handling with interface target 2020-07-30 10:53:48 +02:00
compositefiletransferjob.cpp Fix CompositeFileTransferJob speed calculation 2021-01-31 23:50:14 +01:00
compositefiletransferjob.h Fix CompositeFileTransferJob speed calculation 2021-01-31 23:50:14 +01:00
core_debug.cpp Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
core_debug.h Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
daemon.cpp Improve D-Bus implementation on macOS 2022-04-12 05:40:03 +00:00
daemon.h Add API for opening the KCM to daemon 2020-10-18 18:40:48 +00:00
dbushelper.cpp Improve D-Bus implementation on macOS 2022-04-12 05:40:03 +00:00
dbushelper.h.in Improve D-Bus implementation on macOS 2022-04-12 05:40:03 +00:00
device.cpp Improve D-Bus implementation on macOS 2022-04-12 05:40:03 +00:00
device.h Add a verification key that's displayed when pairing 2020-11-26 11:28:49 +01:00
filetransferjob.cpp Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
filetransferjob.h Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
kdeconnectconfig.cpp Improve D-Bus implementation on macOS 2022-04-12 05:40:03 +00:00
kdeconnectconfig.h Improve D-Bus implementation on macOS 2022-04-12 05:40:03 +00:00
kdeconnectplugin.cpp Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
kdeconnectplugin.h Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
kdeconnectpluginconfig.cpp Improve D-Bus implementation on macOS 2022-04-12 05:40:03 +00:00
kdeconnectpluginconfig.h [app] Add plugin settings page 2020-09-08 20:33:20 +02:00
Messages.sh Do not extract messages from the non-existent .ui and .rc files 2019-12-21 10:04:31 +02:00
networkpacket.cpp Fix build error: invalid user-defined conversion from ‘QByteArray’ to ‘const char*’ 2021-11-24 10:22:42 +00:00
networkpacket.h Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
networkpackettypes.h Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
notificationserverinfo.cpp Improve D-Bus implementation on macOS 2022-04-12 05:40:03 +00:00
notificationserverinfo.h Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
pluginloader.cpp Fix warnings 2021-03-03 15:20:24 +01:00
pluginloader.h Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
qtcompat_p.h Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00