[kio] src/filewidgets: Use QVector instead of QSet as Kévin suggested to help with QSet ordering unstability.

Kevin Ottens ervin at kde.org
Fri Aug 14 09:41:31 UTC 2015


Hello,

On Thursday 13 August 2015 22:49:45 David Faure wrote:
> On Sunday 09 August 2015 17:41:16 Kevin Ottens wrote:
> I thought this would impact the ordering seen by users, so I made it stable
> by adding a std::sort. Patch for review:
> http://www.davidfaure.fr/2015/solid_ordering.diff
> 
> But now I see that this doesn't actually affect users, at least with
> KFilePlacesModel, since it's apparently possible to reorder devices there
> and it gets remembered (looks like the solid query results gets stored into
> the bookmarks file - not sure how that works with appending/removing
> devices later on though).

It used to be that it memorized the device "forever" so that they'd appear at 
the right place if it ever comes back.

> So maybe the sorting should only be done in unittests, not in solid itself,
> if real apps are fine with random ordering?

Agreed.

> Input welcome.

You could also remove the QSet randomization using QT_HASH_SEED and 
potentially QT_NO_CPU_FEATURE.
 
> PS: who's the Solid maintainer? I thought I heard that was Lukáš, but the
> yaml file says afiestas.

I think Alex indeed passed the torch to Lukáš but the yaml might have been 
forgotten.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150814/c3da3e52/attachment.sig>


More information about the Kde-frameworks-devel mailing list