diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-05-17 11:22:27 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-05-17 11:44:56 +0200 |
commit | 5934e8ee931f6650189e3e86319f6d6e52cb6da0 (patch) | |
tree | 2f5ccae0d7a66b8348b15987108153a621bc8f64 /src/compositor/extensions/qwaylandxdgshellv5.cpp | |
parent | 14d37a53a674d7dbef32e718ae391e265fad5fac (diff) | |
download | qtwayland-5934e8ee931f6650189e3e86319f6d6e52cb6da0.tar.gz |
QWaylandXdgShellV5: make xdgSurfaceFromSurface() const-correct
... and replace a Q_FOREACH with a C++11 ranged-for loop.
Change-Id: I0e77bc51a53c5141217465152be1913539da0968
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshellv5.cpp')
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellv5.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp index 0628f55e..a85efbc5 100644 --- a/src/compositor/extensions/qwaylandxdgshellv5.cpp +++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp @@ -115,9 +115,9 @@ QWaylandXdgPopupV5 *QWaylandXdgShellV5Private::topmostPopupForClient(wl_client * return clientPopups.empty() ? nullptr : clientPopups.last(); } -QWaylandXdgSurfaceV5 *QWaylandXdgShellV5Private::xdgSurfaceFromSurface(QWaylandSurface *surface) +QWaylandXdgSurfaceV5 *QWaylandXdgShellV5Private::xdgSurfaceFromSurface(QWaylandSurface *surface) const { - Q_FOREACH (QWaylandXdgSurfaceV5 *xdgSurface, m_xdgSurfaces) { + for (QWaylandXdgSurfaceV5 *xdgSurface : m_xdgSurfaces) { if (surface == xdgSurface->surface()) return xdgSurface; } |