MCPcopy Create free account
hub / github.com/KDE/kwin / OrientationSensor

Method OrientationSensor

src/utils/orientationsensor.cpp:121–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121OrientationSensor::OrientationSensor()
122{
123 m_watcher = std::make_unique<QDBusServiceWatcher>(serviceName(), QDBusConnection::systemBus(), QDBusServiceWatcher::WatchForOwnerChange);
124 connect(m_watcher.get(), &QDBusServiceWatcher::serviceRegistered, this, &OrientationSensor::onServiceRegistered);
125 connect(m_watcher.get(), &QDBusServiceWatcher::serviceUnregistered, this, &OrientationSensor::onServiceUnregistered);
126
127 m_properties = std::make_unique<OrgFreedesktopDBusPropertiesInterface>(serviceName(), objectPath(), QDBusConnection::systemBus());
128 connect(m_properties.get(), &OrgFreedesktopDBusPropertiesInterface::PropertiesChanged, this, &OrientationSensor::onPropertiesChanged);
129
130 if (QDBusConnection::systemBus().interface()->isServiceRegistered(serviceName())) {
131 onServiceRegistered();
132 }
133}
134
135OrientationSensor::~OrientationSensor()
136{

Callers

nothing calls this directly

Calls 3

serviceNameFunction · 0.70
objectPathFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected