mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Do a D-Bus request instead of systemctl command for D-Bus config reload
This commit is contained in:
parent
da55698a51
commit
0e3e0c5b81
1 changed files with 12 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue