It works here (I tested it before commenting).
I don’t know what Windows thing you’re referring to, but yes.
Looking at src/tools/kquitapp/kquitapp.cpp · master · Frameworks / KDBusAddons · GitLab it seems to just call the quit()
D-Bus method of whatever D-Bus enabled process is running. In this case it’s equivalent to calling qdbus6 org.kde.plasmashell /MainApplication quit
.
This in turn is probably equivalent to using QCoreApplication::quit()
or qApp->exit()
, which just terminates the app successfully.
As for what plasmashell --replace
does, looking at shell/main.cpp · master · Plasma / Plasma Workspace · GitLab it just seems to use KDBusService::Replace (or maybe KDBusService::Unique), which is implemented in src/kdbusservice.cpp · master · Frameworks / KDBusAddons · GitLab and basically just calls qdbus6 org.kde.plasmashell /MainApplication quit
too (then goes on to start the process and register it in D-Bus again elsewhere).