mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-04 16:45:12 +00:00
Do a D-Bus request instead of systemctl command for D-Bus config reload
This commit is contained in:
@@ -382,11 +382,18 @@ bool GenerateServiceFile(bool silent = false) {
|
|||||||
md5Hash));
|
md5Hash));
|
||||||
}
|
}
|
||||||
|
|
||||||
QProcess::execute(u"systemctl"_q, {
|
try {
|
||||||
u"--user"_q,
|
const auto connection = Gio::DBus::Connection::get_sync(
|
||||||
u"reload"_q,
|
Gio::DBus::BusType::SESSION);
|
||||||
u"dbus"_q,
|
|
||||||
});
|
connection->call_sync(
|
||||||
|
base::Platform::DBus::kObjectPath,
|
||||||
|
base::Platform::DBus::kInterface,
|
||||||
|
"ReloadConfig",
|
||||||
|
{},
|
||||||
|
base::Platform::DBus::kService);
|
||||||
|
} catch (...) {
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user