[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: PATCH: Faster sorting by status
From:       Ingo =?iso-8859-1?q?Kl=F6cker?= <kloecker () kde ! org>
Date:       2002-06-13 23:32:49
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 13 June 2002 20:44, Marc Mutz wrote:
> On Thursday 13 June 2002 20:11, Don Sanders wrote:
> <snip>
>
> > So I solved the problem by making sure the keys generated when
> > sorting by the status column are unique.
>
> <snip>
>
> Wouldn't overriding QListViewItem::compare( QListViewItem*, col,
> bool) be faster still? We could compare values directly, instead of
> hackily creating a QListViewItem::key(), which is a QString and is
> then compared using QString::localeAwareComapre(). Sounds slow to me.

The documentation of QListViewItem::key() says:
"If you want to sort on non-alphabetical data, e.g. dates, numbers, 
etc., reimplement compare()."

As we sort by date, by size, by serial number, etc. we should probably 
follow this advice.

Regards,
Ingo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9CSuqGnR+RTDgudgRAtlbAJ9PTRMufrPkDN0mLao8nNKT3PorrACgr2CJ
KKVYAaS7un/q/s9863u/jrw=
=WzpE
-----END PGP SIGNATURE-----
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic