Review Request 128897: cursor model: look for cursors in correct place

Jason A. Donenfeld jason at zx2c4.com
Tue Sep 13 13:10:57 UTC 2016



> On Sept. 13, 2016, 1:08 p.m., Aleix Pol Gonzalez wrote:
> > src/cursorthemesmodel.cpp, line 47
> > <https://git.reviewboard.kde.org/r/128897/diff/3/?file=476796#file476796line47>
> >
> >     Why are we calling toSet? to remove duplicates? QStringList has a removeDuplicates method that will respect the ordering.

Because that's what the code did before to remove duplicates. I'll use removeDuplicates() instead. Note that the KCM that this code was inspired by does a horrible O(n^2) iteration for this...


- Jason A.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128897/#review99150
-----------------------------------------------------------


On Sept. 13, 2016, 1:06 p.m., Jason A. Donenfeld wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128897/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2016, 1:06 p.m.)
> 
> 
> Review request for Plasma, Aleix Pol Gonzalez and Thomas Pfeiffer.
> 
> 
> Bugs: 368724
>     http://bugs.kde.org/show_bug.cgi?id=368724
> 
> 
> Repository: kde-gtk-config
> 
> 
> Description
> -------
> 
> plasma-desktop's cursor theme kcm does the right thing, by consulting
> the libXcursor library for the right search paths. Unfortunately, the
> kcm here does a pretty butchered job of it. So, we copy, more or less,
> the same algorithm used by plasma-desktop. Now there's parity in cursor
> selection.
> 
> For reference, please see line 165 of:
> https://quickgit.kde.org/?p=plasma-desktop.git&a=blob&f=kcms%2Fcursortheme%2Fxcursor%2Fthememodel.cpp
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 07d313c0f6da20d0f0ad2b1e4db09d8b93395149 
>   src/cursorthemesmodel.h 7658bd56ae9517e29be513e379b012bd9ae3f417 
>   src/cursorthemesmodel.cpp 5238714671c36880a475da677302285a29b932d8 
>   src/gtkconfigkcmodule.cpp 7afe69841c321b93e59292e55af02eaa81e831b5 
> 
> Diff: https://git.reviewboard.kde.org/r/128897/diff/
> 
> 
> Testing
> -------
> 
> Works extremely well, and since this is the same algorithm as with the other KCM, with code written years ago, it's certainly received quite a bit of testing.
> 
> 
> Thanks,
> 
> Jason A. Donenfeld
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160913/7d051cee/attachment.html>


More information about the Plasma-devel mailing list