Get rid of unneeded gi::result wrap

This commit is contained in:
Ilya Fedin 2023-05-19 11:25:38 +04:00 committed by John Preston
parent 2ea50f5c85
commit 9514b0d1f1
1 changed files with 5 additions and 4 deletions

View File

@ -30,10 +30,10 @@ public:
private:
[[nodiscard]] XdpInhibit::Inhibit inhibit() {
return *_inhibitProxy;
return _inhibitProxy;
}
gi::result<XdpInhibit::InhibitProxy> _inhibitProxy;
XdpInhibit::InhibitProxy _inhibitProxy;
base::Platform::XDP::SettingWatcher _darkModeWatcher;
};
@ -43,7 +43,8 @@ LinuxIntegration::LinuxIntegration()
Gio::BusType::SESSION_,
Gio::DBusProxyFlags::DO_NOT_AUTO_START_AT_CONSTRUCTION_,
std::string(base::Platform::XDP::kService),
std::string(base::Platform::XDP::kObjectPath)))
std::string(base::Platform::XDP::kObjectPath),
nullptr))
, _darkModeWatcher([](
const Glib::ustring &group,
const Glib::ustring &key,
@ -67,7 +68,7 @@ void LinuxIntegration::init() {
return;
}
auto uniqueName = _inhibitProxy->get_connection().get_unique_name();
auto uniqueName = _inhibitProxy.get_connection().get_unique_name();
uniqueName.erase(0, 1);
uniqueName.replace(uniqueName.find('.'), 1, 1, '_');