diff options
Diffstat (limited to 'src/compositor/extensions/qwaylandxdgshell.cpp')
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp index f06fd793..eece3f3d 100644 --- a/src/compositor/extensions/qwaylandxdgshell.cpp +++ b/src/compositor/extensions/qwaylandxdgshell.cpp @@ -1279,7 +1279,9 @@ QWaylandXdgToplevel *QWaylandXdgToplevel::fromResource(wl_resource *resource) QList<int> QWaylandXdgToplevel::statesAsInts() const { QList<int> list; - Q_FOREACH (uint state, states()) { + const auto s = states(); + list.reserve(s.size()); + for (auto state : s) { list << static_cast<int>(state); } return list; |