diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp index 83f1f06787..773e93122c 100644 --- a/src/xdgshellclient.cpp +++ b/src/xdgshellclient.cpp @@ -1147,11 +1147,8 @@ void XdgToplevelClient::handlePingDelayed(quint32 serial) void XdgToplevelClient::handlePongReceived(quint32 serial) { - auto it = m_pings.find(serial); - if (it != m_pings.end()) { - setUnresponsive(false); - m_pings.erase(it); - } + m_pings.remove(serial); + setUnresponsive(false); } void XdgToplevelClient::sendPing(PingReason reason)