Changeset View
Changeset View
Standalone View
Standalone View
tests/kwayland/waylandtestserver.cpp
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | |||||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | void WaylandTestServer::configurationChangeRequested(KWayland::Server::OutputConfigurationInterface* configurationInterface) | 123 | void WaylandTestServer::configurationChangeRequested(KWayland::Server::OutputConfigurationInterface* configurationInterface) | ||
124 | { | 124 | { | ||
125 | qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Server received change request, changes:" << configurationInterface->changes().count(); | 125 | qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Server received change request, changes:" << configurationInterface->changes().count(); | ||
126 | Q_EMIT configReceived(); | 126 | Q_EMIT configReceived(); | ||
127 | 127 | | |||
128 | auto changes = configurationInterface->changes(); | 128 | auto changes = configurationInterface->changes(); | ||
129 | Q_FOREACH (const auto &outputdevice, changes.keys()) { | 129 | for (auto it = changes.cbegin(); it != changes.cend(); ++it) { | ||
130 | auto c = changes[outputdevice]; | 130 | auto outputdevice = it.key(); | ||
131 | auto c = it.value(); | ||||
131 | if (c->enabledChanged()) { | 132 | if (c->enabledChanged()) { | ||
132 | qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Setting enabled:"; | 133 | qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Setting enabled:"; | ||
133 | outputdevice->setEnabled(c->enabled()); | 134 | outputdevice->setEnabled(c->enabled()); | ||
134 | } | 135 | } | ||
135 | if (c->modeChanged()) { | 136 | if (c->modeChanged()) { | ||
136 | qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Setting new mode:" << c->mode() << modeString(outputdevice, c->mode()); | 137 | qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Setting new mode:" << c->mode() << modeString(outputdevice, c->mode()); | ||
137 | outputdevice->setCurrentMode(c->mode()); | 138 | outputdevice->setCurrentMode(c->mode()); | ||
138 | } | 139 | } | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |