Fix porting bug to make Comparator actually compare correctly.
commit787af6e77142af8a831e54b578a938c757b8d21b
authorTill Adam <adam@kde.org>
Thu, 27 May 2010 19:35:22 +0000 (27 19:35 -0000)
committerTill Adam <adam@kde.org>
Thu, 27 May 2010 19:35:22 +0000 (27 19:35 -0000)
treeaa220dd85e738af7e0755bc66353277e41434d8b
parent2948e119bcc564a0feb6ef2a2e3eb2f2b93d5f02
Fix porting bug to make Comparator actually compare correctly.

This was crashing std::sort which apparenty for optimization reasons
requires a < b to imply !(b < a). qSort, on the other hand, avoids the
problem. The crash only showed up with sufficiently large keyrings, as
apparently std::sort, likely again for optimization reasons, uses a
simpler sort for shorter containers, which doesn't run into this issue.
Fun bug, took Volker and me most of the train ride from Osnabrueck to
Berlin to figure out why and how this happens, boring our travel
companion to tears in the process. Geek out!

BUG: 238708

svn path=/trunk/KDE/kdepim/libkpgp/; revision=1131243
libkpgp/kpgpkey.h