Moves all the stuff that is needed to start DBus on macOS (which for some reason it needs several steps, involving the use of `launchctl`) into a single `startDBusDaemon()` function. Before, it was spread into `kdeconnectconfig.cpp`, `indicatorhelper_mac.cpp` and `dbushelper.cpp`.
It also removes checking for an existing DBus daemon and always starts our own, since in most cases we couldn't connect to it anyway. This, together with removing the sleep in the retries when polling for the DBus daemon from 3s to 100ms, makes the startup much faster, so I removed the loading splash screen.
This fixes the following compiler error with winrt headers using mingw-w64 gcc toolchain.
In file included from winrt/Windows.Foundation.h:12,
from kdeconnect-kde/plugins/sendnotifications/windowsnotificationslistener.h:11,
from kdeconnect-kde/plugins/sendnotifications/sendnotificationsplugin.cpp:12:
winrt/base.h:89:2: error: #error C++/WinRT requires coroutine support, which is currently missing. Try enabling C++20 in your compiler.
89 | #error C++/WinRT requires coroutine support, which is currently missing. Try enabling C++20 in your compiler.
| ^~~~~
We don't need to convert the data to an intermediate QVariantMap just to
make JSON out of it. This siginificantly improves performance.
The measurements were done with 3000000 iterations each:
Before serialization: 0.0045009 msecs
Before deserialization: 0.002293 msecs
After serialization: 0.0034216 msecs (32% faster)
After deserialization: 0.001776 msecs (29% faster)
The Add command dialog currently does not set a preferredWidth, which
seems to cause repeated binding loops and a lot of log spam until the
dialog is actually put on screen.
This change sets the preferredWidth to 20*gridUnit, which seems to be
the typical size used in small dialogs and is about the size that the
dialog has without a width explicitly set.
While the HIG is not quite clear on this, PlaceholderMessages throughout
KDE applications and kcms tend to have sentence capitalization in their
title and include a verb (e.g. "Playlist is empty", "No game controllers
found"). The runcommand plugin breaks with this; it uses title
capitalization and does not include a verb: "No Commands".
This change modifies the title to read "No commands configured".