leinir added a comment.

  In D20198#442364 <https://phabricator.kde.org/D20198#442364>, @ngraham wrote:
  
  > Why do we need this do-it-once helper function?
  
  
  To avoid having the lambda being called multiple times for subsequent 
installations, especially with incorrect parameters... It's a bit of a 
workaround for some missing metaprogramming abilities in C++/Qt that Discover 
also uses in a couple of places, it's quite handy and i can't help but think it 
wants to be somewhere more centrally available, but i also am not sure where 
that'd want to be ;)

INLINE COMMENTS

> apol wrote in kcmcursortheme.cpp:466
> This reads weird: how about:
> 
>   if (selectedIndex().isValid()) {
>       const CursorTheme* theme = m_proxyModel->theme(selectedIndex());
>       ...
>   }

Thanks @ngraham :)

Good point @apol, it's a straight up copy from the save() function, and i'd 
just not unpacked it all the way. Yes, that definitely reads better, i'll swap 
it for that :)

> apol wrote in kcmcursortheme.h:150
> :) this sounds familiar.
> 
> Maybe we should keep this in the cpp file? it's only used there.

It certainly does ;) Hmm... true, it doesn't actually need moc-ing, at least 
when using the modern connect syntax like is being done here, so... yup, i'll 
pop it in there :)

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D20198

To: leinir, #plasma, ngraham, broulik
Cc: apol, plasma-devel, #plasma, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, mart

Reply via email to