[PATCH] Priority of Solid Actions

David Faure faure at kde.org
Fri May 29 13:18:30 BST 2009


On Friday 22 May 2009, Gökçen Eraslan wrote:
> Attached patch make comparisons based on InitialPreference key in desktop 
> files, if it can't find any, it looks at the name of the desktop file (better 
> than readdir order :) ). Maybe later, an option about ordering may be added to 
> "Device Actions" kcm.

The comparison function lessThan() creates two KDesktopFile, which means
parsing the files for each and every comparison. This is sloooooowwwww.

I suggest making a vector of KDesktopFiles and sorting that vector, instead.
And storing that vector as member var instead of "QStringList files;", since the code 
later on needs kdesktopfiles anyway.

-- 
David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list