From: Shane Synan Date: Tue, 7 Aug 2018 17:01:39 +0000 (-0500) Subject: client: Fix duplicated query quit messages X-Git-Tag: 0.13-rc2~72 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=0bfeaf6b4f42062f1b889a9448a3616748977814;hp=0bfeaf6b4f42062f1b889a9448a3616748977814;ds=sidebyside client: Fix duplicated query quit messages Replace the .contains() check with std::binary_search on message timestamps, passing a custom comparator that provides +/- 1000 ms of fuzzy matching. If a quit message is received and doesn't exist within this time range, it gets forwarded to the query, otherwise discarded. Remove the QMultiHash method that tracked quit nicknames. Each query gets a unique MessageFilter, so there's no need to store and filter that. This will need modified if e.g. adding an option for quit messages in the Chat Monitor. This fixes an existing bug made much worse with millisecond timestamp precision. Before the 64-bit time changes, quit messages would only be duplicated if they got split over the turn of a second, a rare occurrence. Afterwards, they'd get duplicated if split over the turn of a millisecond, a much more common occurrence. Fixes regression from commit 6a63070246d89aa2a2474e3a9a1035fa889ad77e ---