summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandcursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandcursor.cpp')
-rw-r--r--src/client/qwaylandcursor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp
index 1d3d88bea..4d540c5db 100644
--- a/src/client/qwaylandcursor.cpp
+++ b/src/client/qwaylandcursor.cpp
@@ -74,7 +74,7 @@ QWaylandCursorTheme::~QWaylandCursorTheme()
wl_cursor *QWaylandCursorTheme::requestCursor(WaylandCursor shape)
{
- if (struct wl_cursor *cursor = m_cursors.value(shape, nullptr))
+ if (struct wl_cursor *cursor = m_cursors[shape])
return cursor;
static Q_CONSTEXPR struct ShapeAndName {
@@ -206,7 +206,7 @@ wl_cursor *QWaylandCursorTheme::requestCursor(WaylandCursor shape)
ShapeAndName{shape, ""}, byShape);
for (auto it = p.first; it != p.second; ++it) {
if (wl_cursor *cursor = wl_cursor_theme_get_cursor(m_theme, it->name)) {
- m_cursors.insert(shape, cursor);
+ m_cursors[shape] = cursor;
return cursor;
}
}