/*! Compare this Event to the Event given by \a other. * Events are equal (returns true) if eventTypeId, deviceId and params match. */ bool Event::operator ==(const Event &other) const { bool paramsMatch = true; foreach (const Param &otherParam, other.params()) { Param param = this->param(otherParam.name()); if (!param.isValid() || param.value() != otherParam.value()) { paramsMatch = false; break; } } return m_eventTypeId == other.eventTypeId() && m_deviceId == other.deviceId() && paramsMatch; }