Bug 284907

Summary: KPresence operator< code is nonsense
Product: [Unmaintained] telepathy Reporter: David Edmundson <kde>
Component: common-internalsAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: 0.4.0   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description David Edmundson 2011-10-25 00:44:06 UTC
it constructs a lookup table each time, and this is incorrectly called m_presenceSorting despite not being a member variable. Result of bad copy+pasting.

---

Needs moving to static variable, with a static initialiser. (and probably a static bool to say it's been initialised).

OR

get rid of the hash and replace it with a private method that returns an int based on a switch statement.
Comment 1 David Edmundson 2011-10-25 00:48:42 UTC
Edit: I meant KPresence not K
Comment 2 Martin Klapetek 2011-10-28 16:16:49 UTC
Git commit 751cf71a63996deff524573c9f46ab68371c809a by Martin Klapetek.
Committed on 28/10/2011 at 18:13.
Pushed by mklapetek into branch 'master'.

Fix KPresence operator< ineffectivness by splitting the priority checking to a separate method with switch()

BUG: 284907

M  +30   -17   kpresence.cpp
M  +3    -0    kpresence.h

http://commits.kde.org/telepathy-common-internals/751cf71a63996deff524573c9f46ab68371c809a